/* Digital Defense - Windows Hardening Script Generator - Modern Styles */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f7fa;
  --bg-card: #ffffff;
  --text-primary: #1a202c;
  --text-secondary: #718096;
  --border-color: #e2e8f0;
  --accent-color: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: #eef2ff;
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-color: #10b981;
  --success-light: #d1fae5;
  --warning-color: #f59e0b;
  --warning-light: #fef3c7;
  --danger-color: #ef4444;
  --danger-light: #fee2e2;
  --info-color: #3b82f6;
  --info-light: #dbeafe;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --accent-color: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-light: #312e81;
  --accent-gradient: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  --success-color: #34d399;
  --success-light: #065f46;
  --warning-color: #fbbf24;
  --warning-light: #78350f;
  --danger-color: #f87171;
  --danger-light: #7f1d1d;
  --info-color: #60a5fa;
  --info-light: #1e3a8a;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: var(--transition-slow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Top Bar */
.top-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .top-bar {
  background: rgba(30, 41, 59, 0.8);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.shield-icon {
  font-size: 1.75rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

.top-bar h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.02em;
}

.top-bar-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.icon-btn {
  padding: 0.625rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.icon-controls {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
}

.icon-theme {
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.icon-btn:hover .icon-theme {
  transform: rotate(180deg);
}

.icon-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--accent-light);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.icon-btn:hover::before {
  width: 300px;
  height: 300px;
}

.icon-btn:hover {
  border-color: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.icon-btn:active {
  transform: translateY(0);
}

.lang-text {
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}


.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Generator Card */
.generator-card {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent-light) 100%);
  border: none;
}

[data-theme="dark"] .generator-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent-light) 100%);
}

.generator-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  border: none;
  padding: 0;
  letter-spacing: -0.03em;
}

.hashtag {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shield-logo {
  font-size: 6rem;
  margin: 1.5rem 0 2.5rem;
  opacity: 0.9;
  filter: drop-shadow(0 10px 20px rgba(99, 102, 241, 0.3));
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.generator-flow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.flow-btn {
  padding: 1.5rem 2rem;
  border: 2px solid var(--accent-color);
  background: var(--bg-card);
  color: var(--accent-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-width: 160px;
  position: relative;
  overflow: hidden;
}

.flow-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--accent-light);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: 0;
}

.flow-btn:hover::after {
  width: 300px;
  height: 300px;
}

.flow-btn > * {
  position: relative;
  z-index: 1;
}

.flow-btn:hover {
  border-color: var(--accent-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.flow-btn:active {
  transform: translateY(-2px);
}

.flow-btn-primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
  box-shadow: var(--shadow-md);
}

.flow-btn-primary:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px) scale(1.02);
}

.flow-number {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--accent-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow);
}

.flow-btn-primary .flow-number {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.flow-label {
  font-size: 1rem;
  font-weight: 600;
}

.flow-connector {
  color: var(--text-secondary);
  font-size: 1.2rem;
  letter-spacing: 2px;
  opacity: 0.5;
}

.dropdown-panel {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  animation: slideDown 0.3s ease;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

.os-dropdown .os-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.level-dropdown .level-options-grid {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .os-dropdown .os-options-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
  }
  
  .level-dropdown .level-options-grid {
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .os-dropdown .os-options-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .os-dropdown .os-options-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.os-option, .level-option {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 500;
  text-align: center;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
}

.os-option:hover, .level-option:hover {
  background: var(--accent-light);
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.os-option.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.level-option {
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
}

.os-icon {
  font-size: 1.5rem;
}

.level-badge {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
}

/* Менші позначки для таблиці контролів */
.controls-table .level-badge {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  display: inline-block;
}

.level-base {
  background: #10b981;
  color: white;
}

.level-strong {
  background: #f59e0b;
  color: white;
}

.level-extreme {
  background: #ef4444;
  color: white;
}

/* Progress Cards Row */
.progress-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.progress-card {
  padding: 2rem;
}

.progress-summary {
  margin-bottom: 1.5rem;
}

.progress-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.progress-circles {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.progress-circle {
  flex: 1;
  min-width: 100px;
  display: flex;
  justify-content: center;
}

.circle-progress {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: conic-gradient(
    var(--success-color) 0deg,
    var(--success-color) calc(var(--percent) * 3.6deg),
    var(--bg-secondary) calc(var(--percent) * 3.6deg),
    var(--bg-secondary) 360deg
  );
  transition: var(--transition-slow);
}

.circle-progress::before {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
}

.circle-label {
  position: relative;
  z-index: 1;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.security-slider {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.slider-wrapper {
  position: relative;
  padding: 0.5rem 0;
}

.slider-input {
  width: 100%;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid var(--border-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 2;
}

.slider-marks {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding: 0 14px;
}

.slider-mark {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 1px var(--border-color);
}

.slider-input:hover {
  border-color: var(--accent-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06), 0 0 0 3px var(--accent-light);
}

.slider-input:focus {
  border-color: var(--accent-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06), 0 0 0 3px var(--accent-light);
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  cursor: pointer;
  box-shadow: var(--shadow-md), 0 0 0 2px var(--bg-card);
  transition: var(--transition);
  border: 2px solid var(--bg-card);
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: var(--shadow-lg), 0 0 0 2px var(--bg-card);
}

.slider-input::-webkit-slider-thumb:active {
  transform: scale(1.1);
}

.slider-input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  cursor: pointer;
  border: 2px solid var(--bg-card);
  box-shadow: var(--shadow-md), 0 0 0 2px var(--bg-card);
  transition: var(--transition);
}

.slider-input::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: var(--shadow-lg), 0 0 0 2px var(--bg-card);
}

.slider-input::-moz-range-thumb:active {
  transform: scale(1.1);
}

.slider-input::-moz-range-track {
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
}

/* Radar Chart */
.radar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  overflow: visible;
  position: relative;
  min-height: 500px;
}

#ttps-radar {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  width: 100%;
  aspect-ratio: 1;
  max-width: 500px;
}

@media (max-width: 768px) {
  .radar-container {
    min-height: 400px;
    padding: 1rem;
  }
  
  #ttps-radar {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .radar-container {
    min-height: 350px;
  }
}

/* Threat Actors */
.threat-actors-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.threat-actor-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.threat-actor-item:last-child {
  margin-bottom: 0;
}

.threat-actor-label {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.threat-actor-bar {
  height: 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--success-color) 0%, var(--success-color) var(--percent), var(--bg-secondary) var(--percent), var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.threat-actor-bar:hover {
  box-shadow: var(--shadow);
}

.techniques-list {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  padding-left: 0.5rem;
  line-height: 1.4;
  word-break: break-word;
}

/* Output Card */
.output-card {
  display: none;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.output-actions {
  display: flex;
  gap: 0.75rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg);
}

.btn-success {
  background: var(--success-color);
  color: white;
  border: none;
  box-shadow: var(--shadow);
}

.btn-success:hover {
  background: #059669;
  box-shadow: var(--shadow-md);
}

.script-output {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.7;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.script-output::-webkit-scrollbar {
  width: 8px;
}

.script-output::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.script-output::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius);
}

.script-output::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.output-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.detail-section h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--accent-color);
  font-weight: 600;
}

.list-output {
  list-style: none;
  padding-left: 0;
}

.list-output li {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  transition: var(--transition);
}

.list-output li:hover {
  background: var(--bg-secondary);
  padding-left: 1rem;
}

.list-output li:last-child {
  border-bottom: none;
}

/* Controls Page */
.controls-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 2rem;
}

.header-left {
  flex: 1;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.category-icon {
  font-size: 2.5rem;
  opacity: 0.9;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.category-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  border: none;
  padding: 0;
  letter-spacing: -0.02em;
}

.category-description {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: flex-start;
}

.filters-toggle-btn {
  padding: 0.875rem 1.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.filters-toggle-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.filters-toggle-btn span:first-child {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.filters-toggle-btn.expanded span:first-child {
  transform: rotate(180deg);
}

.progress-summary-section {
  margin-bottom: 2rem;
}

.progress-bar-container {
  margin-bottom: 0.75rem;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.progress-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.filters-panel {
  margin-bottom: 2rem;
  animation: slideDown 0.3s ease;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.filter-group select {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
}

.filter-group select:hover {
  border-color: var(--accent-color);
}

.filter-group select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* Controls Table */
.controls-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.controls-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}

.controls-table thead {
  background: var(--bg-secondary);
}

.controls-table th {
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}

.controls-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.controls-table th.sortable:hover {
  background: var(--bg-primary);
  color: var(--accent-color);
}

.sort-icon {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.5;
  transition: var(--transition);
}

.controls-table th.sortable:hover .sort-icon {
  opacity: 1;
}

.controls-table td {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: top;
}

.controls-table tbody tr {
  transition: var(--transition);
}

.controls-table tbody tr:hover {
  background: var(--bg-secondary);
}

.controls-table tbody tr:last-child td {
  border-bottom: none;
}

/* Done Checkbox Column */
.done-cell {
  width: 60px;
  text-align: center;
}

.done-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
}

.done-checkbox:hover {
  border-color: var(--success-color);
  transform: scale(1.1);
}

.done-checkbox.checked {
  background: var(--success-color);
  border-color: var(--success-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.done-checkbox.checked::after {
  content: '✓';
  font-size: 0.9rem;
  font-weight: bold;
}

/* Advice Column */
.advice-cell {
  min-width: 200px;
}

.advice-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.ignore-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ignore-toggle-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid var(--border-color);
}

.toggle-switch.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: white;
  top: 1px;
  left: 1px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.toggle-switch.active::after {
  transform: translateX(20px);
}

/* Level Column */
.level-cell {
  width: 120px;
}

/* MITRE Column */
.mitre-cell {
  width: 150px;
  min-width: 150px;
}

.mitre-techniques {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.mitre-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: var(--accent-color);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
}

/* Details Column */
.details-cell {
  max-width: 600px;
}

.details-text {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.details-text a {
  color: var(--accent-color);
  text-decoration: underline;
  transition: var(--transition);
}

.details-text a:hover {
  color: var(--accent-hover);
}

/* Table Container (for other pages) */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-card);
}

table th {
  background-color: var(--bg-secondary);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-primary);
}

table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

table tr:hover {
  background-color: var(--bg-secondary);
}

table tr:last-child td {
  border-bottom: none;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--bg-card);
  margin: 2rem auto;
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 800px;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: slideUp 0.4s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 1rem;
}

.modal-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.modal-section {
  margin-bottom: 1.5rem;
}

.modal-section h3 {
  color: var(--accent-color);
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.modal-section p,
.modal-section ul {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.modal-section code {
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9rem;
}

.modal-script {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 300px;
  overflow-y: auto;
  color: var(--text-primary);
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
  .top-bar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .top-bar-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .container {
    padding: 1rem;
  }
  
  .generator-flow {
    flex-direction: column;
  }
  
  .flow-connector {
    transform: rotate(90deg);
  }
  
  .progress-row {
    grid-template-columns: 1fr;
  }
  
  .output-details {
    grid-template-columns: 1fr;
  }
  
  .filters {
    grid-template-columns: 1fr;
  }
  
  .table-container {
    overflow-x: scroll;
  }
  
  table {
    min-width: 600px;
  }
  
  .controls-header {
    flex-direction: column;
  }
  
  .generator-title {
    font-size: 1.75rem;
  }
  
  .shield-logo {
    font-size: 4rem;
  }
  
  .os-dropdown .os-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .level-dropdown .level-options-grid {
    justify-content: center;
  }
  
  .dropdown-panel {
    max-width: 100%;
    padding: 1rem;
  }
  
  .os-option, .level-option {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

/* Loading states */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.loading {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(to right, var(--bg-secondary) 4%, var(--bg-primary) 25%, var(--bg-secondary) 36%);
  background-size: 1000px 100%;
}

/* Focus states for accessibility */
*:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}
