:root {
  --bg-base: #0B0E14;
  --bg-panel: rgba(17, 20, 28, 0.7);
  --bg-panel-solid: #11141C;
  --bg-input: rgba(0, 0, 0, 0.3);
  --bg-hover: rgba(255, 255, 255, 0.03);
  
  --text-primary: rgba(255, 255, 255, 0.9);
  --text-secondary: rgba(255, 255, 255, 0.5);
  --text-muted: rgba(255, 255, 255, 0.3);
  
  --accent-purple: #8B5CF6;
  --accent-cyan: #06B6D4;
  --accent-blue: #3B82F6;
  --accent-gradient: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.3));
  --accent-gradient-hover: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(59, 130, 246, 0.5));
  --accent-glow: rgba(139, 92, 246, 0.15);
  
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.1);
  --border-active: rgba(139, 92, 246, 0.4);
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.1);
  --shadow-glow-hover: 0 0 30px rgba(139, 92, 246, 0.3);
  
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;
  
  --font-sans: 'Exo 2', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --utility-bar-height: 56px;
  --control-panel-width: 320px;
}

/* Info Tooltip */
.info-tooltip {
  color: var(--text-muted);
  cursor: help;
  font-size: 0.85rem;
  transition: color var(--transition);
}

.info-tooltip:hover {
  color: var(--accent-purple);
}

/* Sidebar Attribution */
.sidebar-attribution {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.attribution-text {
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: center;
}

/* Generation Safety Note */
.generation-status {
  margin-top: 12px;
  padding: 14px 16px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-md);
  text-align: center;
}

.generation-status .status-main {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.generation-status .status-hint {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 4px;
  opacity: 0.85;
}

.generation-status .status-note {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 8px;
  opacity: 0.75;
}

.generation-status .status-brand {
  color: var(--accent-purple);
  font-size: 0.7rem;
  opacity: 0.6;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.generation-safety-note {
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
}

.generation-safety-note p {
  color: rgba(245, 158, 11, 0.9);
  font-size: 0.7rem;
  line-height: 1.4;
  text-align: center;
  margin: 0;
}

/* Error code display */
.error-code {
  display: inline-block;
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

/* Retry button */
.btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  margin-top: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-retry:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

.btn-retry svg {
  opacity: 0.8;
}

/* Video error styling enhancement */
.video-error {
  padding: 10px 12px;
  background: rgba(239, 68, 68, 0.1);
  border-top: 1px solid rgba(239, 68, 68, 0.2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.video-error p {
  color: rgba(239, 68, 68, 0.9);
  font-size: 0.8rem;
  margin: 0;
}

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

html {
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

#lights {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Large Logo Background */
.logo-background {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
}

.logo-bg-image {
  width: 600px;
  height: auto;
  filter: grayscale(100%);
}

@media (max-width: 768px) {
  .logo-bg-image {
    width: 350px;
  }
}

#lights canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Landing Page */
.landing-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  position: relative;
  z-index: 10;
}

.landing-content {
  text-align: center;
  max-width: 500px;
}

.landing-logo {
  margin-bottom: 24px;
}

.landing-title {
  font-family: var(--font-sans);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  background: linear-gradient(135deg, #8B5CF6, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
}

.landing-features {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.landing-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.landing-feature svg {
  color: var(--accent-purple);
}

.btn-landing-signin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-landing-signin:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(139, 92, 246, 0.5);
}

.landing-footer {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.landing-preview-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-purple);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

.app-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: ambientShift 20s ease-in-out infinite;
}

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

.utility-bar {
  height: var(--utility-bar-height);
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.utility-left,
.utility-center,
.utility-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.utility-left {
  flex: 0 0 auto;
}

.utility-center {
  flex: 1;
  justify-content: center;
}

.utility-right {
  flex: 0 0 auto;
}

.mobile-menu-btn {
  display: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.project-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-selector-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.project-selector-btn:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon-sm:hover {
  border-color: var(--border-active);
  color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.1);
}

.credits-display {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  color: var(--accent-purple);
}

.credits-display svg {
  opacity: 0.8;
}

.credits-value {
  font-weight: 600;
  font-size: 0.92rem;
}

.credits-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.limits-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.free-preview-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.free-preview-badge .preview-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.free-preview-badge .preview-count {
  color: var(--accent-cyan);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.limits-display.low .free-preview-badge .preview-count {
  color: #ef4444;
}

.limits-display .limit-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
}

.limits-display .limit-item.videos svg {
  color: var(--accent-purple);
}

.limits-display .limit-item.images svg {
  color: var(--accent-cyan);
}

.limits-display .limit-item svg {
  opacity: 0.85;
}

.limits-display.low .limit-item {
  color: #ef4444;
}

.limits-display .pro-badge {
  background: var(--accent-gradient);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Access Levels Section */
.access-levels-section {
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.access-levels-title {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.access-level-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
}

.access-level-card.disabled {
  opacity: 0.5;
}

.access-level-badge {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.access-level-free .access-level-badge {
  color: var(--accent-cyan);
}

.access-level-pro .access-level-badge {
  color: var(--accent-purple);
}

.coming-soon {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.access-level-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.access-level-features {
  margin: 0;
  padding-left: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.access-level-features li {
  margin-bottom: 2px;
}

.access-levels-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 8px 0 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-style: italic;
}

.free-preview-completed {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.free-preview-completed h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.free-preview-completed p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.free-preview-completed .pro-pitch {
  color: var(--accent-cyan);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.btn-unlock-pro {
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 24px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 12px;
}

.btn-unlock-pro:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.free-preview-completed .stability-note {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
}


.pro-info-dialog {
  max-width: 380px;
}

.pro-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pro-features-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.pro-features-list li::before {
  content: "✓";
  color: var(--accent-cyan);
  margin-right: 10px;
  font-weight: 600;
}

.pro-pricing-note {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.btn-credits {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--accent-gradient);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-glow);
}

.btn-credits:hover {
  background: var(--accent-gradient-hover);
  box-shadow: var(--shadow-glow-hover);
  transform: translateY(-1px);
}

.workspace {
  display: flex;
  margin-top: var(--utility-bar-height);
  min-height: calc(100vh - var(--utility-bar-height));
}

.control-panel {
  width: var(--control-panel-width);
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: fixed;
  top: var(--utility-bar-height);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 50;
}

.control-panel::-webkit-scrollbar {
  width: 6px;
}

.control-panel::-webkit-scrollbar-track {
  background: transparent;
}

.control-panel::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

.panel {
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 14px;
  box-shadow: var(--shadow-panel);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-header h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.char-counter {
  font-family: var(--font-mono);
  font-size: 0.77rem;
  color: var(--text-muted);
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.mode-selection-prompt {
  margin-top: 12px;
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.05);
}

.mode-selection-prompt p {
  margin: 0;
}

.mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.mode-tab .pixel-canvas {
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  width: calc(100% - 4px) !important;
  height: calc(100% - 4px) !important;
  pointer-events: none;
  z-index: 0;
}

.mode-tab svg,
.mode-tab span {
  position: relative;
  z-index: 1;
}

.mode-tab:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.15);
  transform: translateY(-1px);
}

.mode-tab.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--border-active);
  color: var(--text-primary);
}

.mode-tab.active svg {
  color: var(--accent-purple);
}

.model-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.model-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.model-option .pixel-canvas {
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  width: calc(100% - 4px) !important;
  height: calc(100% - 4px) !important;
  pointer-events: none;
  z-index: 0;
}

.model-option .model-icon,
.model-option .model-info {
  position: relative;
  z-index: 1;
}

.model-option:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: var(--bg-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
}

.model-option.active {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--border-active);
}

.model-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel-solid);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
}

.model-option.active .model-icon {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
}

.model-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.model-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
}

.model-desc {
  font-size: 0.77rem;
  color: var(--text-muted);
}

.panel-prompt {
  flex: 0 0 auto;
}

.preset-selector {
  margin-bottom: 10px;
}

.preset-dropdown {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.preset-dropdown:hover {
  border-color: var(--border-hover);
}

.preset-dropdown:focus {
  outline: none;
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.preset-dropdown option,
.preset-dropdown optgroup {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.prompt-input {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  resize: vertical;
  transition: all var(--transition);
}

.prompt-input::placeholder {
  color: var(--text-muted);
}

.prompt-input:focus {
  outline: none;
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.prompt-privacy-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 0;
  line-height: 1.4;
  opacity: 0.7;
}

.center-privacy-note {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 12px;
}

.settings-group {
  margin-bottom: 14px;
}

.settings-group:last-child {
  margin-bottom: 0;
}

.setting-label {
  display: block;
  font-size: 0.77rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.duration-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.duration-btn {
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.duration-btn .pixel-canvas {
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  width: calc(100% - 4px) !important;
  height: calc(100% - 4px) !important;
  pointer-events: none;
  z-index: 0;
}

.duration-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.duration-btn.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--border-active);
  color: var(--accent-purple);
}

.aspect-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.aspect-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  min-height: 60px;
}

.aspect-btn .pixel-canvas {
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  width: calc(100% - 4px) !important;
  height: calc(100% - 4px) !important;
  pointer-events: none;
  z-index: 0;
}

.aspect-btn .aspect-preview,
.aspect-btn > span {
  position: relative;
  z-index: 1;
}

.aspect-btn:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.aspect-btn.active {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--border-active);
}

.aspect-preview {
  background: var(--text-muted);
  border-radius: 2px;
  transition: all var(--transition);
}

.aspect-preview.landscape { width: 28px; height: 16px; }
.aspect-preview.portrait { width: 16px; height: 28px; }
.aspect-preview.square { width: 20px; height: 20px; }
.aspect-preview.standard { width: 24px; height: 18px; }

.aspect-btn.active .aspect-preview {
  background: var(--accent-purple);
}

.aspect-btn span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.aspect-btn.active span {
  color: var(--accent-purple);
}

.btn-generate {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--accent-gradient);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-glow);
  margin-top: auto;
}

.btn-generate:hover:not(:disabled) {
  background: var(--accent-gradient-hover);
  box-shadow: var(--shadow-glow-hover);
  transform: translateY(-1px);
}

.btn-generate:active:not(:disabled) {
  transform: scale(0.97);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.btn-generate:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.style-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.style-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.style-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.style-btn.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--border-active);
  color: var(--text-primary);
}

.style-icon {
  font-size: 1rem;
}

.canvas-area {
  flex: 1;
  margin-left: var(--control-panel-width);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: calc(100vh - var(--utility-bar-height));
}

.canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.canvas-title h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.canvas-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.canvas-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
}

.canvas-tab {
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.canvas-tab:hover {
  color: var(--text-secondary);
}

.canvas-tab.active {
  background: rgba(139, 92, 246, 0.15);
  color: var(--text-primary);
}

.preview-canvas {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  animation: ambientGlow 4s ease-in-out infinite;
}

#hyperspeed-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
}

#hyperspeed-container canvas {
  width: 100% !important;
  height: 100% !important;
  border-radius: var(--radius-lg);
}

.preview-canvas .preview-empty,
.preview-canvas .preview-processing {
  position: relative;
  z-index: 1;
}

@keyframes ambientGlow {
  0%, 100% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.1); }
  50% { box-shadow: 0 0 60px rgba(139, 92, 246, 0.2); }
}

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

@keyframes subtlePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.95; }
}

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

.preview-canvas video,
.preview-canvas img {
  animation: fadeIn 0.5s ease-out, subtlePulse 3s ease-in-out infinite 0.5s;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-empty,
.preview-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 40px 20px;
}

.preview-empty-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-muted);
}

.preview-empty p {
  font-size: 0.92rem;
}

.preview-processing {
  animation: fadeIn 0.3s ease-out;
}

.preview-status {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.preview-prompt {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 400px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.empty-state svg {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.empty-state h4 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: 280px;
}

.empty-state.hidden {
  display: none;
}

.welcome-dialog {
  max-width: 420px;
}

.welcome-text {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.welcome-subtext {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.support-link {
  color: var(--accent-cyan);
}

.support-link:hover {
  color: var(--accent-purple);
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.gallery-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.video-card {
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.4s ease-out backwards;
}

.video-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(139, 92, 246, 0.15);
}

.video-card:nth-child(1) { animation-delay: 0s; }
.video-card:nth-child(2) { animation-delay: 0.05s; }
.video-card:nth-child(3) { animation-delay: 0.1s; }
.video-card:nth-child(4) { animation-delay: 0.15s; }
.video-card:nth-child(5) { animation-delay: 0.2s; }
.video-card:nth-child(6) { animation-delay: 0.25s; }
.video-card:nth-child(7) { animation-delay: 0.3s; }
.video-card:nth-child(8) { animation-delay: 0.35s; }

.sequence-card {
  padding-bottom: 12px;
}

.sequence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.sequence-badge {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sequence-progress {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.sequence-clips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
}

.sequence-clip {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.clip-thumbnail {
  aspect-ratio: 16/9;
  background: var(--bg-panel-solid);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clip-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clip-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel-solid);
}

.spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.clip-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-align: center;
}

.sequence-status {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 8px 0 0 0;
}

.video-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-panel-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-thumbnail video,
.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail .placeholder-icon {
  color: var(--text-muted);
}

.video-status-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.spinner-large {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.video-info {
  padding: 12px;
}

.video-prompt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.video-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-tag {
  padding: 3px 8px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.video-tag.enhanced {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-purple);
}

.video-time {
  font-size: 0.77rem;
  color: var(--text-muted);
}

.v30-metrics {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding: 8px;
  background: rgba(139, 92, 246, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.v30-metric {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: help;
}

.v30-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.v30-value {
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.v30-value.metric-high { color: var(--success); }
.v30-value.metric-medium { color: var(--warning); }
.v30-value.metric-low { color: var(--error); }

.video-error {
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border-top: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--error);
  font-size: 0.77rem;
}

.error-logged-notice {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 6px;
}

.video-actions {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border-subtle);
}

.btn-watch,
.btn-download,
.btn-enhance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.77rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-watch {
  flex: 1;
}

.btn-watch:hover,
.btn-download:hover,
.btn-enhance:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.1);
}

.btn-enhance {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--accent-purple);
  font-family: var(--font-mono);
  font-weight: 600;
}

.result-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: rgba(6, 182, 212, 0.05);
  border-top: 1px solid rgba(6, 182, 212, 0.15);
  font-size: 0.68rem;
  text-align: center;
}

.result-meta strong {
  color: rgba(6, 182, 212, 0.85);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.result-meta span {
  color: var(--text-muted);
  font-weight: 400;
}

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-panel);
  animation: modalIn 0.2s ease;
}

.modal-lg {
  max-width: 560px;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

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

.modal-body {
  padding: 20px;
}

.modal-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
}

.form-group {
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.77rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-label .optional {
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  transition: all var(--transition);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  outline: none;
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
  transition: all var(--transition);
}

.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent-gradient);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: var(--shadow-glow-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-secondary-sm {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.77rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary-sm:hover {
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

.project-dropdown {
  position: fixed;
  z-index: 200;
  min-width: 240px;
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  display: none;
  animation: dropdownIn 0.15s ease;
}

.project-dropdown.active {
  display: block;
}

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

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dropdown-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}

.dropdown-item {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}

.dropdown-item:hover {
  background: var(--bg-hover);
}

.dropdown-item.active {
  background: rgba(139, 92, 246, 0.1);
}

.dropdown-item h4 {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dropdown-item p {
  font-size: 0.77rem;
  color: var(--text-muted);
}

.dropdown-empty {
  padding: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 280px;
  padding: 14px 18px;
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  animation: toastIn 0.3s ease;
  transition: all 0.3s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--error);
}

.toast.info {
  border-left: 3px solid var(--accent-blue);
}

.toast-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.toast-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.credits-packs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.credit-pack {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
}

.credit-pack:hover {
  border-color: var(--border-active);
  background: rgba(139, 92, 246, 0.08);
}

.credit-pack.popular {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.1);
}

.pack-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pack-label {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pack-price {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-purple);
}

.loading-packs {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-muted);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.generated-images-section {
  margin-top: 24px;
}

.generated-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.generated-image-card {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.4s ease-out backwards;
}

.generated-image-card:nth-child(1) { animation-delay: 0s; }
.generated-image-card:nth-child(2) { animation-delay: 0.05s; }
.generated-image-card:nth-child(3) { animation-delay: 0.1s; }
.generated-image-card:nth-child(4) { animation-delay: 0.15s; }
.generated-image-card:nth-child(5) { animation-delay: 0.2s; }
.generated-image-card:nth-child(6) { animation-delay: 0.25s; }
.generated-image-card:nth-child(7) { animation-delay: 0.3s; }
.generated-image-card:nth-child(8) { animation-delay: 0.35s; }

.generated-image-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(139, 92, 246, 0.15);
}

.generated-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.low-credits {
  color: var(--error) !important;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.image-generator-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.image-generator-form .panel {
  width: 100%;
  box-sizing: border-box;
}

/* aXstudio ONE Engine Styles */
.panel-engine {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.1));
  border-color: rgba(139, 92, 246, 0.3);
}

.engine-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: var(--radius-md);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.engine-logo {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border-radius: var(--radius-sm);
  color: white;
}

.engine-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.engine-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.engine-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Quality Tier Selector */
.quality-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quality-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quality-btn:hover {
  border-color: var(--border-hover);
  background: rgba(139, 92, 246, 0.1);
}

.quality-btn.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.quality-icon {
  font-size: 1.2rem;
}

/* Create Mode Toggle */
.create-mode-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.create-mode-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.create-mode-btn:hover {
  color: var(--text-primary);
}

.create-mode-btn.active {
  background: var(--accent-purple);
  color: white;
}

/* Drone Preset Selector */
.drone-preset-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drone-preset-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.drone-preset-btn:hover {
  border-color: var(--border-hover);
  background: rgba(139, 92, 246, 0.1);
}

.drone-preset-btn.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-purple);
}

.preset-icon {
  font-size: 1.5rem;
  width: 40px;
  text-align: center;
}

.preset-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.preset-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Studio Create Sections */
.studio-options {
  display: none;
}

.studio-options.visible {
  display: block;
}

/* Assured Output Badge */
.assured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 500;
  color: #10b981;
}

.assured-badge.adjusted {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.assured-badge svg {
  width: 12px;
  height: 12px;
}

/* Fix Buttons */
.fix-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.fix-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fix-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

/* Optimize Button */
.optimize-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  margin-top: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  justify-content: center;
}

.optimize-btn:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(6, 182, 212, 0.3));
  border-color: var(--accent-purple);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.optimize-btn svg {
  width: 14px;
  height: 14px;
}

/* Assured Output Section */
.assured-output-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.assured-version {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Duration Selector */
.duration-selector {
  display: flex;
  gap: 8px;
}

.duration-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.duration-btn:hover {
  border-color: var(--border-hover);
  background: rgba(139, 92, 246, 0.1);
}

.duration-btn.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

/* Style Selector */
.style-selector {
  display: flex;
  gap: 8px;
}

.style-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.style-btn:hover {
  border-color: var(--border-hover);
  background: rgba(139, 92, 246, 0.1);
}

.style-btn.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.style-icon {
  font-size: 1.2rem;
}

/* Settings Groups */
.settings-group {
  margin-bottom: 16px;
}

.setting-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.panel-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

@media (max-width: 1200px) {
  :root {
    --control-panel-width: 300px;
  }
  
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 1024px) {
  :root {
    --control-panel-width: 280px;
  }
  
  .preview-canvas {
    min-height: 300px;
  }
  
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 768px) {
  :root {
    --control-panel-width: 260px;
  }
  
  .utility-bar {
    padding: 0 12px;
  }
  
  .utility-center {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    margin-right: 8px;
  }
  
  .mobile-menu-btn:hover {
    background: var(--accent-purple);
  }
  
  .control-panel {
    position: fixed;
    left: -100%;
    width: 300px;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.5);
  }
  
  .control-panel.open {
    left: 0;
  }
  
  .panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
  }
  
  .panel-overlay.active {
    display: block;
  }
  
  .content-area {
    margin-left: 0;
  }
  
  .canvas-area {
    margin-left: 0;
    padding: 16px;
  }
  
  .preview-canvas {
    min-height: 250px;
  }
  
  .gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .canvas-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .utility-bar {
    padding: 0 10px;
  }
  
  .canvas-area {
    padding: 12px;
  }
  
  .credits-display {
    padding: 4px 8px;
  }
  
  .credits-label {
    display: none;
  }
  
  .btn-credits {
    padding: 4px 8px;
  }
}


/* Content Area - Welcome Section */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px;
  padding-top: 40px;
  text-align: center;
  margin-left: var(--control-panel-width);
  min-height: calc(100vh - var(--utility-bar-height));
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.nature-bg-container {
  position: fixed;
  top: 0;
  left: var(--control-panel-width);
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nature-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/nature-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.35;
}

.nature-logo {
  position: relative;
  width: 450px;
  height: auto;
  opacity: 0.25;
  filter: brightness(0) invert(1) brightness(2);
}

@media (max-width: 768px) {
  .nature-bg-container {
    left: 0;
  }
  
  .nature-logo {
    width: 300px;
  }
}

.welcome-hero {
  margin-bottom: 24px;
  padding: 20px 24px;
  background: transparent;
  border-radius: var(--radius-lg);
  border: none;
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.features-grid {
  position: relative;
  z-index: 1;
}

.welcome-icon {
  margin-bottom: 16px;
  opacity: 0.9;
}

.welcome-icon svg {
  width: 48px;
  height: 48px;
}

.welcome-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #a855f7 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 360px;
  line-height: 1.5;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 480px;
  margin-bottom: 32px;
}

.feature-item {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  transition: all 0.3s ease;
}

.feature-item:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.12);
}

.feature-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
  border-radius: var(--radius-sm);
  color: var(--accent-purple);
  margin-bottom: 10px;
}

.feature-icon svg {
  width: 18px;
  height: 18px;
}

.feature-item h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.get-started-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
  padding: 12px 20px;
  background: rgba(11, 14, 20, 0.85);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  margin-bottom: 24px;
}

.hint-arrow {
  font-size: 1.2rem;
  animation: bounce-left 1.5s ease-in-out infinite;
}

@keyframes bounce-left {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-6px); }
}

.center-prompt-section {
  margin: 24px 0;
  position: relative;
  z-index: 1;
}

.center-prompt-container {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.center-prompt-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.center-prompt-textarea {
  width: 100%;
  padding: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 80px;
  transition: all 0.2s ease;
}

.center-prompt-textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.center-prompt-textarea::placeholder {
  color: var(--text-muted);
}

.center-generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  align-self: center;
  min-width: 160px;
}

.center-generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.center-generate-btn:disabled {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.center-quota-indicator {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.center-quota-indicator.exhausted {
  color: var(--warning);
}

@media (max-width: 768px) {
  .content-area {
    padding: 16px;
    margin-left: 0;
  }
  
  .welcome-title {
    font-size: 1.4rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.image-model-selector {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}

@media (min-width: 400px) {
  .image-model-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.image-model-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  min-width: 0;
  overflow: hidden;
}

.image-model-btn:hover {
  border-color: var(--border-hover);
  background: rgba(139, 92, 246, 0.1);
}

.image-model-btn.active {
  border-color: var(--accent-purple);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.1));
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.model-icon-sm {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-sm);
  color: var(--accent-purple);
}

.image-model-btn.active .model-icon-sm {
  background: var(--accent-purple);
  color: white;
}

.model-info-sm {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.model-name-sm {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.model-desc-sm {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gallery-section {
  margin-top: 40px;
  width: 100%;
  max-width: 900px;
  padding: 20px 24px;
  background: rgba(11, 14, 20, 0.9);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 1;
}

.gallery-section .gallery-header {
  margin-bottom: 16px;
}

.gallery-section .gallery-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.generated-images-section {
  margin-top: 32px;
  margin-bottom: 32px;
}

.generated-images-section .gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.generated-images-section .gallery-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-clear {
  padding: 6px 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: #ef4444;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear:hover {
  background: rgba(239, 68, 68, 0.2);
}

.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.image-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lightbox-zoom 0.3s ease;
}

@keyframes lightbox-zoom {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: white;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.lightbox-image {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
  margin-top: 20px;
  text-align: center;
  max-width: 600px;
}

.lightbox-prompt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.lightbox-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.lightbox-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-violet));
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lightbox-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-download-img {
  background: rgba(139, 92, 246, 0.2) !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
}

.btn-download-img:hover {
  background: rgba(139, 92, 246, 0.4) !important;
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  display: flex;
  gap: 8px;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.generated-image-card:hover .image-overlay {
  opacity: 1;
  transform: translateY(0);
}

.generated-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .lightbox-close {
    top: 10px;
    right: 10px;
  }
  
  .lightbox-content {
    max-width: 95vw;
  }
}

/* Site Footer - Compact Single Line */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(11, 14, 20, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-subtle);
  padding: 6px 24px;
  z-index: 90;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links a {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-divider {
  color: var(--border-subtle);
  font-size: 0.65rem;
}

.footer-notice {
  font-size: 0.65rem;
  color: var(--accent-purple);
  opacity: 0.8;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 4px 12px;
  }
  
  .footer-content {
    gap: 8px;
  }
  
  .footer-links {
    gap: 4px;
  }
}

.wizard-modal .modal-backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}

.spinner-large {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-subtle);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.wizard-dialog {
  max-width: 580px;
  width: 95%;
  background: linear-gradient(135deg, var(--bg-panel-solid) 0%, rgba(17, 20, 28, 0.98) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(139, 92, 246, 0.15);
  animation: wizard-appear 0.4s ease;
}

@keyframes wizard-appear {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.wizard-step {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 2px solid var(--border-subtle);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.wizard-step.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border-color: transparent;
  color: white;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.wizard-step.completed {
  background: var(--success);
  border-color: transparent;
  color: white;
}

.wizard-step-line {
  width: 40px;
  height: 2px;
  background: var(--border-subtle);
  border-radius: 1px;
}

.wizard-header {
  text-align: center;
  margin-bottom: 24px;
}

.wizard-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wizard-header p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.wizard-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.wizard-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.wizard-option:hover {
  border-color: var(--border-active);
  background: rgba(139, 92, 246, 0.08);
  transform: translateX(4px);
}

.wizard-option.selected {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.2);
}

.wizard-option-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.wizard-option-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.wizard-option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.wizard-trust-note {
  text-align: center;
  padding: 12px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-md);
}

.wizard-trust-note p {
  color: rgba(34, 197, 94, 0.9);
  font-size: 0.8rem;
  margin: 0;
}

.wizard-summary {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}

.wizard-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.wizard-summary-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.wizard-summary-item:first-child {
  padding-top: 0;
}

.summary-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.summary-value {
  font-size: 0.85rem;
  color: var(--text-primary);
  text-align: right;
  max-width: 65%;
}

.summary-value.wizard-prompt {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.wizard-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 20px;
}

.wizard-back {
  padding: 10px 16px;
}

.wizard-continue {
  padding: 10px 24px;
}

.wizard-final-summary {
  text-align: center;
  margin-bottom: 24px;
}

.wizard-final-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.wizard-final-type {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.wizard-final-settings {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.wizard-generate {
  width: 100%;
  padding: 16px 24px;
  font-size: 1rem;
  margin-bottom: 12px;
}

.wizard-stable-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.wizard-refund-text {
  text-align: center;
  font-size: 0.75rem;
  color: var(--success);
  margin-bottom: 16px;
}

.wizard-processing-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
}

.wizard-video-preview {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}

.wizard-video-preview video {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.wizard-success-panel {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}

.wizard-success-panel h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.wizard-success-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wizard-success-panel li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 6px 0 6px 20px;
  position: relative;
}

.wizard-success-panel li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

.wizard-next-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.wizard-next-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wizard-next-btn:hover {
  border-color: var(--border-active);
  background: rgba(139, 92, 246, 0.1);
  color: var(--text-primary);
}

.wizard-next-btn.wizard-next-primary {
  background: var(--accent-gradient);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

.wizard-next-btn.wizard-next-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: var(--shadow-glow-hover);
}

.wizard-next-icon {
  font-size: 1.1rem;
}

.wizard-failure-icon {
  font-size: 4rem;
  text-align: center;
  margin: 20px 0;
}

.wizard-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.wizard-footer p {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 0;
}

.wizard-success-header h2 {
  background: linear-gradient(135deg, var(--success) 0%, #4ade80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 600px) {
  .wizard-dialog {
    padding: 20px;
    margin: 10px;
  }

  .wizard-option {
    padding: 12px 14px;
  }

  .wizard-option-icon {
    font-size: 1.6rem;
  }

  .wizard-next-actions {
    flex-direction: column;
  }

  .wizard-next-btn {
    width: 100%;
    justify-content: center;
  }
}

/* NeuroPause Mode Selector */
.panel-neuropause-mode {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-xl);
  padding: 12px;
}

.neuropause-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.neuropause-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
}

.neuropause-mode-btn:hover {
  border-color: var(--border-hover);
  background: rgba(139, 92, 246, 0.1);
}

.neuropause-mode-btn.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

.neuropause-mode-btn .mode-icon {
  font-size: 1.3rem;
}

.neuropause-mode-btn .mode-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

.neuropause-mode-btn.active .mode-label {
  color: var(--text-primary);
}

.neuropause-mode-info {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
}

.neuropause-mode-info p {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

.neuropause-mode-info.active {
  background: rgba(139, 92, 246, 0.1);
}

.neuropause-mode-info.active p {
  color: var(--accent-purple);
}

/* Public Preview Badge */
.public-preview-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.preview-badge-icon {
  color: var(--success);
  font-size: 0.85rem;
}

.preview-badge-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Pre-Generation Stability Panel */
.stability-panel {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.stability-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.stability-icon {
  font-size: 0.9rem;
}

.stability-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stability-metrics {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stability-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stability-metric .metric-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.stability-metric .metric-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.stability-metric .metric-value.high {
  color: var(--success);
}

.stability-metric .metric-value.medium {
  color: var(--warning);
}

.stability-metric .metric-value.low {
  color: var(--error);
}

.stability-metric .metric-value.active {
  color: var(--accent-purple);
}

.stability-note {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: center;
  line-height: 1.4;
}

/* AI Transparency Panel */
.ai-transparency-panel {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ai-transparency-toggle {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  list-style: none;
}

.ai-transparency-toggle::-webkit-details-marker {
  display: none;
}

.ai-transparency-toggle:hover {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.05);
}

.ai-transparency-toggle .toggle-icon {
  font-size: 0.85rem;
}

.ai-transparency-panel[open] .ai-transparency-toggle {
  border-bottom: 1px solid var(--border-subtle);
}

.ai-transparency-list {
  padding: 10px 12px;
  margin: 0;
  list-style: none;
}

.ai-transparency-list li {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-transparency-list .ai-step {
  color: var(--accent-cyan);
  font-weight: 500;
}

/* NeuroPause Options Toggles */
.neuropause-options {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.neuropause-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.neuropause-toggle:hover {
  border-color: var(--border-hover);
  background: rgba(139, 92, 246, 0.05);
}

.neuropause-toggle input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  position: relative;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.25s ease;
}

.neuropause-toggle input:checked + .toggle-slider {
  background: rgba(139, 92, 246, 0.4);
}

.neuropause-toggle input:checked + .toggle-slider::after {
  left: 18px;
  background: var(--accent-purple);
}

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

.neuropause-toggle input:checked ~ .toggle-label {
  color: var(--text-primary);
}

/* Coherence Feedback Panel */
.coherence-panel {
  margin-top: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.coherence-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.coherence-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.coherence-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-purple);
  border-radius: 4px;
  font-weight: 500;
}

.coherence-metrics {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.coherence-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coherence-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.coherence-value {
  font-size: 0.72rem;
  font-weight: 500;
}

.coherence-value.high {
  color: var(--success);
}

.coherence-value.medium {
  color: var(--warning);
}

.coherence-value.low {
  color: var(--error);
}

/* Multi-clip Sequence Display */
.multiclip-container {
  margin-top: 10px;
  padding: 10px;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
}

.multiclip-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.multiclip-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-purple);
}

.multiclip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.multiclip-item {
  aspect-ratio: 16/9;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.multiclip-item:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.multiclip-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.multiclip-item .clip-number {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-size: 0.6rem;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-primary);
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: 500;
}

.multiclip-item.processing {
  display: flex;
  align-items: center;
  justify-content: center;
}

.multiclip-item.processing .spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.multiclip-playback {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.multiclip-play-btn {
  flex: 1;
  padding: 6px 10px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.multiclip-play-btn:hover {
  background: rgba(139, 92, 246, 0.25);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.feedback-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 16px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 90;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.feedback-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.feedback-modal .modal-content {
  max-width: 440px;
}

.feedback-modal-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feedback-intro {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.feedback-field {
  margin-bottom: 20px;
}

.feedback-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.feedback-field textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color var(--transition);
}

.feedback-field textarea::placeholder {
  color: var(--text-muted);
}

.feedback-field textarea:focus {
  outline: none;
  border-color: var(--border-active);
}

.feedback-options {
  display: flex;
  gap: 8px;
}

.feedback-option {
  flex: 1;
  padding: 10px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.feedback-option:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.feedback-option.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--border-active);
  color: var(--text-primary);
}

.feedback-submit {
  width: 100%;
  margin-top: 8px;
}

.feedback-success {
  text-align: center;
  padding: 40px 20px;
}

.feedback-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--success);
}

.feedback-success h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feedback-success p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Preview Badge in Header */
.preview-badge {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 8px;
  white-space: nowrap;
}

/* Panel Subtitle */
.panel-subtitle {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  font-weight: 400;
}

/* NeuroPause Optimize Section */
.neuropause-optimize-section {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.neuropause-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.neuropause-toggle-btn:hover {
  border-color: var(--border-hover);
  background: rgba(139, 92, 246, 0.1);
  color: var(--text-primary);
}

.neuropause-toggle-btn.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-purple);
  color: var(--text-primary);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3), inset 0 0 15px rgba(139, 92, 246, 0.1);
}

.neuropause-toggle-btn .neuropause-icon {
  font-size: 1.1rem;
}

.neuropause-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

.neuropause-status {
  font-size: 0.75rem;
  color: var(--success);
  text-align: center;
  margin: 0;
  font-weight: 500;
  min-height: 1em;
}

.neuropause-philosophy {
  font-size: 0.68rem;
  color: var(--accent-cyan);
  text-align: center;
  margin: 0;
  font-style: italic;
  opacity: 0.8;
}

/* Result Meta - Preview Mode Label */
.result-meta {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: var(--radius-md);
}

.result-meta-badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.result-meta-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.8;
  margin-bottom: 4px;
}

.result-meta-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
  line-height: 1.4;
}

/* Result Analysis Panel */
.result-analysis {
  margin-top: 10px;
  padding: 12px;
  background: rgba(139, 92, 246, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-md);
}

.result-analysis h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.analysis-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.analysis-row .label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.analysis-row .value {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.analysis-row .value.high,
.analysis-row .value.stable,
.analysis-row .value.locked {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.analysis-row .value.medium,
.analysis-row .value.variable,
.analysis-row .value.partial {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.analysis-footer {
  font-size: 0.68rem;
  color: var(--accent-purple);
  text-align: center;
  margin: 10px 0 0 0;
  font-style: italic;
}

/* Auth Dialog Styles */
.auth-dialog {
  max-width: 420px;
}

.auth-section {
  margin-bottom: 0;
}

.auth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.auth-status {
  font-size: 0.85rem;
  text-align: center;
  margin-top: 12px;
  min-height: 1.2em;
  color: var(--text-secondary);
}

.auth-status.success {
  color: var(--success);
}

.auth-status.error {
  color: var(--error);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-divider span {
  padding: 0 16px;
}

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
}

.oauth-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.oauth-btn:active {
  transform: scale(0.98);
}

.oauth-google:hover {
  border-color: rgba(66, 133, 244, 0.5);
  background: rgba(66, 133, 244, 0.1);
}

.oauth-facebook:hover {
  border-color: rgba(24, 119, 242, 0.5);
  background: rgba(24, 119, 242, 0.1);
}

.oauth-apple:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
}

.auth-footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-footer a {
  color: var(--accent-purple);
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.age-gate-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.age-gate-checkbox:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
}

.age-gate-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-purple);
  cursor: pointer;
}

.age-gate-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* User Menu */
.user-menu-wrapper {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

.user-menu-btn:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
}

.user-email {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  min-width: 180px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.user-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.user-dropdown-item.danger:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

/* Drone Mode Styles */
.drone-generator-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
}

.drone-generator-form .btn-generate {
  margin-top: 16px;
  z-index: 100;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.drone-upload-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-input);
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drone-upload-zone:hover {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
}

.drone-upload-zone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.upload-placeholder svg {
  color: var(--text-muted);
  transition: color var(--transition);
}

.drone-upload-zone:hover .upload-placeholder svg {
  color: var(--accent-purple);
}

.upload-placeholder p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.upload-hint {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.upload-preview {
  position: relative;
  width: 100%;
  max-width: 280px;
}

.upload-preview img {
  width: 100%;
  border-radius: var(--radius-md);
  display: block;
}

.remove-image-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.remove-image-btn:hover {
  background: var(--error);
  border-color: var(--error);
}

.drone-motion-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.drone-motion-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.drone-motion-btn:hover {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
}

.drone-motion-btn.active {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.motion-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--accent-purple);
  transition: all 0.2s ease;
}

.motion-icon svg {
  width: 18px;
  height: 18px;
}

.drone-motion-btn.active .motion-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
  border-color: var(--accent-purple);
  color: var(--accent-cyan);
}

.drone-motion-btn:hover .motion-icon {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
}

.motion-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.motion-name {
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
}

.motion-desc {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.btn-drone {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
}

.btn-drone:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

#droneDurationOptions .duration-btn {
  flex: 1;
}

.transform-generator-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
}

.transform-generator-form .btn-generate {
  margin-top: 16px;
  z-index: 100;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.transform-upload-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-input);
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transform-upload-zone:hover {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
}

.transform-upload-zone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
}

.transform-upload-zone:hover .upload-placeholder svg {
  color: var(--accent-purple);
}

.btn-transform {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
}

.btn-transform:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.voice-options {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.form-select {
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

.form-select:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.form-select:hover {
  border-color: var(--accent-purple);
}

.optional {
  color: var(--text-muted);
  font-weight: normal;
  font-size: 0.8rem;
}

/* Privacy and Safety UI Elements */
.private-workspace-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: #22c55e;
  font-weight: 500;
}

.private-workspace-badge svg {
  opacity: 0.8;
}

.privacy-safety-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}

.safety-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.safety-banner-content > svg {
  flex-shrink: 0;
  color: #ef4444;
  margin-top: 2px;
}

.safety-banner-text {
  flex: 1;
}

.safety-banner-text strong {
  display: block;
  color: #ef4444;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.safety-banner-text p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.4;
}

.safety-banner-text a {
  color: var(--accent-purple);
}

.signed-in-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.signed-in-indicator svg {
  color: #22c55e;
}

/* UBE-Aligned System Status Indicator */
.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition);
}

.system-status-indicator .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: all var(--transition);
}

.system-status-indicator .status-text {
  color: var(--text-secondary);
  transition: color var(--transition);
}

/* Normal/Stable State - Green */
.system-status-indicator[data-status="normal"] {
  border-color: rgba(34, 197, 94, 0.3);
}

.system-status-indicator[data-status="normal"] .status-dot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.system-status-indicator[data-status="normal"] .status-text {
  color: #22c55e;
}

/* Caution State - Amber */
.system-status-indicator[data-status="caution"] {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
}

.system-status-indicator[data-status="caution"] .status-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
  animation: cautionPulse 2s ease-in-out infinite;
}

.system-status-indicator[data-status="caution"] .status-text {
  color: #f59e0b;
}

/* Protected State - Red */
.system-status-indicator[data-status="protected"] {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

.system-status-indicator[data-status="protected"] .status-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: protectedPulse 1.5s ease-in-out infinite;
}

.system-status-indicator[data-status="protected"] .status-text {
  color: #ef4444;
}

@keyframes cautionPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes protectedPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* NRRP Safe Degraded State - Orange */
.system-status-indicator[data-status="safe-degraded"] {
  border-color: rgba(251, 146, 60, 0.4);
  background: rgba(251, 146, 60, 0.1);
}

.system-status-indicator[data-status="safe-degraded"] .status-dot {
  background: #fb923c;
  box-shadow: 0 0 8px rgba(251, 146, 60, 0.6);
  animation: safeDegradedPulse 2s ease-in-out infinite;
}

.system-status-indicator[data-status="safe-degraded"] .status-text {
  color: #fb923c;
}

@keyframes safeDegradedPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* NRRP Fallback Panel */
#nrrpFallbackPanel {
  width: 100%;
  z-index: 100;
}

#nrrpFallbackPanel button:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

#nrrpPromptInput:focus {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Pre-Generate Guard Text */
.pre-generate-guard {
  margin-bottom: 10px;
  text-align: center;
}

.pre-generate-guard p {
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.4;
  margin: 0;
  font-style: italic;
}

/* Predictive Risk Message */
.predictive-risk-message {
  margin-bottom: 12px;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  text-align: center;
}

.predictive-risk-message .risk-main {
  color: #f59e0b;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0 0 6px 0;
}

.predictive-risk-message .risk-secondary {
  color: rgba(245, 158, 11, 0.8);
  font-size: 0.75rem;
  margin: 0;
}

/* UBE Safe Mode Protected Message */
.ube-safe-mode-message {
  padding: 24px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 16px;
}

.ube-safe-mode-message .protected-icon {
  margin-bottom: 12px;
}

.ube-safe-mode-message .protected-main {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.ube-safe-mode-message .protected-secondary {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

/* UBE Post-Failure Learning Message */
.ube-failure-message {
  padding: 14px 16px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  text-align: center;
}

.ube-failure-message .failure-main {
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0 0 6px 0;
}

.ube-failure-message .failure-learning {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 0;
  font-style: italic;
}

/* Cost & Quota Bar */
.cost-quota-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.quota-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quota-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.quota-value {
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
}

.quota-separator {
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0.25rem;
}

/* Intent Refine Panel */
.intent-refine-panel {
  background: rgba(120, 53, 15, 0.2);
  border: 1px solid rgba(217, 119, 6, 0.4);
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
}

.intent-refine-panel.hidden {
  display: none;
}

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

.intent-icon {
  font-size: 1.25rem;
}

.intent-title {
  color: #fcd34d;
  font-weight: 600;
  font-size: 1rem;
}

.intent-description {
  color: rgba(252, 211, 77, 0.8);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.intent-warning {
  color: #fef3c7;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.intent-reasons {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.intent-reasons li {
  color: rgba(254, 243, 199, 0.9);
  font-size: 0.875rem;
  margin: 0.25rem 0;
}

.intent-fixes {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.intent-fix {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.intent-fix.hidden {
  display: none;
}

.fix-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.fix-checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1rem;
  height: 1rem;
  accent-color: #8b5cf6;
}

.fix-content {
  flex: 1;
}

.fix-label {
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

.fix-hint {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.camera-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.camera-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem;
  color: white;
  font-size: 0.875rem;
}

.camera-select option {
  background: #1a1a2e;
  color: white;
}

/* Intent-based Generation Status */
.intent-generation-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-top: 0.75rem;
}

.intent-generation-status.hidden {
  display: none;
}

.intent-generation-status.normal {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.intent-generation-status.warning {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.intent-generation-status.blocked {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.intent-generation-status span:last-child {
  font-size: 0.875rem;
  color: white;
}

/* Age Confirmation Modal */
.age-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.age-confirm-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.age-confirm-content {
  position: relative;
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-panel);
}

.age-confirm-icon {
  margin-bottom: 16px;
  color: var(--accent-purple);
}

.age-confirm-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.age-confirm-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.age-confirm-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  margin-bottom: 20px;
}

.age-confirm-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-purple);
  cursor: pointer;
}

.age-confirm-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.age-confirm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.age-confirm-btn:not(:disabled):hover {
  background: var(--accent-gradient-hover);
  box-shadow: var(--shadow-glow-hover);
}

.age-confirm-policy {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.age-confirm-policy a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.age-confirm-policy a:hover {
  text-decoration: underline;
}

/* ========================================
   aXstudio ONE - Unified Interface Styles
   ======================================== */

/* Create Mode Toggle */
.create-mode-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}

.create-mode-btn {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.create-mode-btn:hover {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.1);
}

.create-mode-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

/* Engine Panel */
.panel-engine {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(59, 130, 246, 0.06));
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.engine-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-md);
}

.engine-logo {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border-radius: var(--radius-md);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.engine-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.engine-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  background: linear-gradient(135deg, #8B5CF6, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.engine-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Quality Selector Panel */
.panel-quality {
  background: rgba(17, 20, 28, 0.7);
}

.quality-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quality-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.quality-btn:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
  color: var(--text-primary);
}

.quality-btn.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-purple);
  color: var(--text-primary);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.quality-icon {
  font-size: 1.25rem;
}

/* Studio Options Panel */
.panel-studio-options {
  background: rgba(17, 20, 28, 0.6);
  border: 1px dashed rgba(139, 92, 246, 0.3);
}

.panel-studio-options .panel-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.panel-studio-options .panel-subtitle {
  font-size: 0.75rem;
  color: var(--accent-purple);
  margin-left: 8px;
}

/* Drone Presets Panel */
.drone-presets-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 14px;
  margin-bottom: 12px;
}

.drone-preset-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drone-preset-btn {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
}

.drone-preset-btn:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
}

.drone-preset-btn.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
}

.drone-preset-btn .preset-icon {
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}

.drone-preset-btn.active .preset-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.3));
}

.drone-preset-btn .preset-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.drone-preset-btn .preset-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.drone-preset-btn.active .preset-name {
  color: var(--accent-purple);
}

/* Responsive adjustments for new components */
@media (max-width: 768px) {
  .create-mode-toggle {
    flex-direction: column;
    gap: 6px;
  }
  
  .quality-selector {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .quality-btn {
    padding: 12px 8px;
    font-size: 0.8rem;
  }
  
  .drone-preset-selector {
    gap: 6px;
  }
  
  .drone-preset-btn {
    padding: 10px 12px;
  }
}

/* ========================================
   LEONARDO AI-STYLE LAYOUT
   ======================================== */

.leonardo-layout {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

.leonardo-layout .hidden-panel {
  display: none !important;
}

/* Icon Sidebar */
.icon-sidebar {
  width: 92px;
  min-width: 92px;
  background: rgba(17, 20, 28, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

/* World-class Brand Header */
.ax-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 8px 8px 8px;
  margin-bottom: 4px;
}

.ax-brand .sidebar-logo-img {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  transition: transform 0.2s ease;
}

.ax-brand:hover .sidebar-logo-img {
  transform: scale(1.05);
}

.ax-brand .brand-text {
  text-align: center;
}

.ax-brand .wordmark {
  font-weight: 800;
  letter-spacing: -0.2px;
  font-size: 13px;
  line-height: 1;
  color: rgba(233, 238, 255, 0.95);
}

.ax-brand .tagline {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(106, 228, 255, 0.7);
}

/* Legacy support */
.sidebar-logo {
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.sidebar-nav-item {
  width: 54px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.sidebar-nav-item:hover {
  background: rgba(139, 92, 246, 0.1);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent-purple);
  border-radius: 0 2px 2px 0;
}

.sidebar-nav-item svg {
  flex-shrink: 0;
}

.nav-label {
  font-size: 0.6rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  background: var(--accent-purple);
  color: white;
  font-size: 0.45rem;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: 92px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100vw - 92px);
  overflow: visible;
}

/* Top Bar */
.top-bar {
  height: 56px;
  background: rgba(17, 20, 28, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-bar-left,
.top-bar-center,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-left {
  flex: 0 0 auto;
}

.top-bar-center {
  flex: 1;
  justify-content: center;
}

.top-bar-right {
  flex: 0 0 auto;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: clamp(520px, 80vh, 760px);
  height: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 40px;
  overflow: hidden;
  z-index: 20;
  background: 
    linear-gradient(180deg, rgba(11, 14, 20, 0.15) 0%, rgba(11, 14, 20, 0.5) 100%),
    url('images/futuristic_architectural_hero_background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  box-sizing: border-box;
}



.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 30% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, rgba(11, 14, 20, 0.3) 0%, rgba(11, 14, 20, 0.9) 100%);
  animation: heroGradientShift 15s ease-in-out infinite;
}

@keyframes heroGradientShift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.hero-content {
  position: relative;
  z-index: 25;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 800px;
  padding: 20px;
  visibility: visible !important;
  opacity: 1 !important;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: 3.5rem;
  font-weight: 300;
  color: #FFFFFF !important;
  letter-spacing: -0.02em;
  text-align: center;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* Prompt Bar */
.prompt-bar-container {
  width: 100%;
  max-width: 680px;
}

.prompt-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(40, 35, 30, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 50px;
  padding: 8px 8px 8px 12px;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
  transition: all var(--transition);
  min-height: 52px;
}

.prompt-bar:focus-within {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.prompt-bar-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.prompt-bar-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(60, 55, 50, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.prompt-bar-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  padding: 8px 0;
  min-width: 0;
}

.prompt-bar-input::placeholder {
  color: var(--text-muted);
}

.prompt-bar-generate {
  background: rgba(90, 85, 80, 0.9);
  border: none;
  border-radius: 50px;
  padding: 10px 24px;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.prompt-bar-generate:hover:not(:disabled) {
  background: rgba(100, 95, 90, 0.95);
  transform: translateY(-1px);
}

.prompt-bar-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mode Icons Row */
.mode-icons-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px;
  background: rgba(17, 20, 28, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mode-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.mode-icon-btn:hover .mode-icon-circle {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.mode-icon-btn.active .mode-icon-circle {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--accent-purple);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.3);
}

.mode-icon-circle {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.mode-icon-btn:hover .mode-icon-circle,
.mode-icon-btn.active .mode-icon-circle {
  color: var(--text-primary);
}

.mode-icon-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}

.mode-icon-btn:hover .mode-icon-label,
.mode-icon-btn.active .mode-icon-label {
  color: var(--text-primary);
}

.mode-new-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #EF4444;
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

/* Options Panel */
.options-panel {
  padding: 20px 40px;
  background: rgba(17, 20, 28, 0.5);
  border-bottom: 1px solid var(--border-subtle);
}

.options-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.neuropause-option {
  flex-direction: row;
  align-items: center;
}

.neuropause-option .neuropause-toggle-btn {
  padding: 10px 16px;
  font-size: 0.85rem;
}

/* Gallery Section in Leonardo Layout */
.leonardo-layout .gallery-section {
  flex: 1;
  padding: 32px 40px;
}

.leonardo-layout .gallery-header {
  margin-bottom: 20px;
}

.leonardo-layout .gallery-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.gallery-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.gallery-subheader h4 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Footer in Leonardo Layout */
.leonardo-layout .site-footer {
  margin-top: auto;
  padding: 16px 40px;
  background: rgba(17, 20, 28, 0.7);
  border-top: 1px solid var(--border-subtle);
}

/* Responsive for Leonardo Layout */
@media (max-width: 900px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .mode-icons-row {
    gap: 12px;
    padding: 12px;
  }
  
  .mode-icon-circle {
    width: 44px;
    height: 44px;
  }
  
  .mode-icon-circle svg {
    width: 20px;
    height: 20px;
  }
  
  .options-row {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* Hide sidebar completely on mobile */
  .icon-sidebar {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  .leonardo-layout {
    display: block !important;
  }
  
  .hero-section {
    min-height: auto;
    padding: 24px 16px;
  }
  
  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 16px;
  }
  
  /* Stack prompt bar vertically on mobile */
  .prompt-bar {
    flex-direction: column;
    padding: 12px;
    border-radius: 16px;
    gap: 12px;
  }
  
  .prompt-bar-input {
    width: 100%;
    min-height: 44px;
  }
  
  .prompt-bar-generate {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
    border-radius: 12px;
    justify-content: center;
  }
  
  .prompt-bar-icon {
    display: none;
  }
  
  /* Mode icons: smaller and scroll horizontally */
  .mode-icons-row {
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  
  .mode-icon-btn {
    flex-shrink: 0;
  }
  
  .mode-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  
  .mode-icon-circle svg {
    width: 16px;
    height: 16px;
  }
  
  .mode-icon-label {
    font-size: 0.6rem;
  }
  
  /* Options panel mobile */
  .options-panel {
    padding: 12px 16px;
  }
  
  .options-row {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .option-group {
    width: 100%;
  }
  
  .option-group label {
    font-size: 0.7rem;
  }
  
  .quality-options,
  .duration-options,
  .aspect-options {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .quality-btn,
  .duration-btn,
  .aspect-btn {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
  
  .leonardo-layout .gallery-section {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  /* Sidebar already hidden at 768px */
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .prompt-bar-input {
    font-size: 0.85rem;
  }
  
  .mode-icon-btn {
    padding: 2px;
  }
  
  .mode-icon-circle {
    width: 32px;
    height: 32px;
  }
  
  .mode-icon-label {
    font-size: 0.55rem;
  }
  
  .top-bar {
    padding: 0 10px;
  }
  
  .top-bar-title {
    font-size: 0.85rem;
  }
}

/* Featured Blueprints Section */
.featured-blueprints-section {
  padding: 32px 40px;
  background: transparent;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  margin: 0;
}

.text-gradient {
  background: linear-gradient(135deg, #D946EF, #8B5CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.view-more-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition);
}

.view-more-link:hover {
  color: var(--text-primary);
}

.blueprints-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.blueprints-carousel::-webkit-scrollbar {
  height: 6px;
}

.blueprints-carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.blueprints-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.blueprint-card {
  flex-shrink: 0;
  width: 160px;
  cursor: pointer;
  transition: transform var(--transition);
}

.blueprint-card:hover {
  transform: translateY(-4px);
}

.blueprint-image {
  width: 160px;
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.blueprint-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
}

.new-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #D946EF;
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 1;
}

.blueprint-title {
  display: block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Community Creations Section */
.community-creations-section {
  padding: 32px 40px;
  background: transparent;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}

.filter-tab.active {
  background: #D946EF;
  border-color: #D946EF;
  color: white;
}

.filter-tab.category {
  background: rgba(255, 255, 255, 0.03);
}

.filter-icon {
  font-size: 0.9rem;
}

.filter-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 8px;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 45%), 1fr));
  gap: 16px;
}

.community-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform var(--transition);
}

.community-card:hover {
  transform: scale(1.02);
}

.community-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive for new sections */
@media (max-width: 768px) {
  .featured-blueprints-section,
  .community-creations-section {
    padding: 20px 16px;
  }
  
  .section-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .section-header h2 {
    font-size: 1.1rem;
  }
  
  .view-more-link {
    font-size: 0.8rem;
  }
  
  /* Blueprints carousel with scroll snap */
  .blueprints-carousel {
    gap: 12px;
    scroll-snap-type: x mandatory;
    padding-left: 4px;
    padding-right: 16px;
  }
  
  .blueprint-card {
    width: 120px;
    scroll-snap-align: start;
  }
  
  .blueprint-image {
    width: 120px;
    height: 150px;
  }
  
  .blueprint-title {
    font-size: 0.75rem;
  }
  
  .new-badge {
    font-size: 0.55rem;
    padding: 2px 6px;
  }
  
  /* Filter tabs: horizontal scroll */
  .filter-tabs {
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  
  .filter-tab {
    padding: 6px 10px;
    font-size: 0.75rem;
    flex-shrink: 0;
    white-space: nowrap;
  }
  
  .filter-divider {
    display: none;
  }
  
  /* Community grid: smaller items, 2 columns */
  .community-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .community-card {
    aspect-ratio: 1;
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .featured-blueprints-section,
  .community-creations-section {
    padding: 16px 12px;
  }
  
  .section-header h2 {
    font-size: 1rem;
  }
  
  .blueprint-card {
    width: 100px;
  }
  
  .blueprint-image {
    width: 100px;
    height: 125px;
  }
  
  .blueprint-title {
    font-size: 0.7rem;
  }
  
  /* Hide some filter tabs on very small screens */
  .filter-tab.category {
    display: none;
  }
  
  .community-grid {
    gap: 8px;
  }
}

/* Slow Rotation Carousel Animation */
.blueprints-carousel-wrapper {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.blueprints-carousel {
  display: flex;
  gap: 16px;
  animation: scrollCarousel 40s linear infinite;
  width: max-content;
}

.blueprints-carousel:hover {
  animation-play-state: paused;
}

@keyframes scrollCarousel {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Community Grid Slow Scroll */
.community-grid-wrapper {
  overflow: hidden;
  position: relative;
}

.community-grid {
  display: flex;
  gap: 16px;
  animation: scrollCommunity 50s linear infinite;
  width: max-content;
}

.community-grid:hover {
  animation-play-state: paused;
}

@keyframes scrollCommunity {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Hot Badge */
.hot-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #F97316, #EF4444);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 1;
}

/* Override community grid for carousel mode */
.community-grid-wrapper .community-grid {
  display: flex;
  flex-wrap: nowrap;
  grid-template-columns: unset;
}

.community-grid-wrapper .community-card {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
}

.community-grid-wrapper .community-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.community-grid-wrapper .community-card:hover img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .blueprints-carousel {
    animation-duration: 30s;
  }
  
  .community-grid-wrapper .community-card {
    width: 150px;
    height: 150px;
  }
  
  .community-grid {
    animation-duration: 35s;
  }
}

@media (max-width: 480px) {
  .blueprints-carousel {
    animation-duration: 25s;
  }
  
  .community-grid-wrapper .community-card {
    width: 120px;
    height: 120px;
  }
  
  .community-grid {
    animation-duration: 30s;
  }
}

/* Quality Controls Panel */
.quality-controls-panel {
  background: rgba(30, 25, 35, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.quality-controls-header {
  margin-bottom: 18px;
  text-align: center;
}

.quality-controls-title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.quality-controls-helper {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.quality-controls-content {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.quality-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
  flex: 1;
  max-width: 200px;
}

.quality-control-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.quality-control-select {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.quality-control-select:hover {
  border-color: var(--border-active);
}

.quality-control-select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.quality-control-select option {
  background: var(--bg-panel-solid);
  color: var(--text-primary);
}

.quality-control-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  appearance: none;
  cursor: pointer;
  transition: all var(--transition);
}

.quality-control-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-purple);
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all var(--transition);
}

.quality-control-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.quality-control-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-purple);
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.quality-control-slider-helper {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 768px) {
  .quality-controls-panel {
    padding: 16px 18px;
    margin-top: 18px;
  }
  
  .quality-controls-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .quality-control-group {
    max-width: none;
  }
}

.quality-controls-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.quality-controls-chevron {
  transition: transform var(--transition);
  color: var(--text-muted);
}

.quality-controls-panel.expanded .quality-controls-chevron {
  transform: rotate(180deg);
}

.quality-controls-panel:not(.expanded) .quality-controls-content {
  display: none;
}

.quality-controls-panel:not(.expanded) .quality-controls-helper {
  display: none;
}

.quick-prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 8px;
}

.quick-prompt-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 20px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.quick-prompt-chip:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.quick-prompt-chip:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .quick-prompt-chips {
    gap: 6px;
    margin-top: 16px;
  }
  
  .quick-prompt-chip {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

/* Templates Panel */
.templates-panel {
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.templates-header {
  text-align: center;
  margin-bottom: 16px;
}

.templates-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.templates-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.templates-chevron {
  transition: transform var(--transition);
  color: var(--text-muted);
}

.templates-panel.expanded .templates-chevron {
  transform: rotate(180deg);
}

.templates-panel:not(.expanded) .templates-content {
  display: none;
}

.templates-panel:not(.expanded) .templates-helper {
  display: none;
}

.templates-helper {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.template-select-group {
  margin-bottom: 16px;
}

.template-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.template-select:hover {
  border-color: var(--border-active);
}

.template-select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.template-select option {
  background: #1a1d26;
  color: #ffffff;
  padding: 12px;
}

/* Mobile select fix - use system colors for better compatibility */
@media (max-width: 768px) {
  .template-select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
  }
  
  .template-select option {
    background: #1a1d26;
    color: #ffffff;
  }
}

.template-fields-container {
  animation: fadeIn 0.2s ease;
}

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

.template-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .template-fields-grid {
    grid-template-columns: 1fr;
  }
}

.template-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.template-field.full-width {
  grid-column: 1 / -1;
}

.template-field-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.template-field-label .required-indicator {
  color: #ef4444;
  margin-left: 2px;
}

.template-field-input,
.template-field-textarea,
.template-field-select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  transition: all var(--transition);
}

.template-field-textarea {
  min-height: 70px;
  resize: vertical;
}

.template-field-input:hover,
.template-field-textarea:hover,
.template-field-select:hover {
  border-color: var(--border-hover);
}

.template-field-input:focus,
.template-field-textarea:focus,
.template-field-select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

.template-field-input::placeholder,
.template-field-textarea::placeholder {
  color: var(--text-muted);
}

.template-field-input.error,
.template-field-textarea.error,
.template-field-select.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.template-field-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
}

.template-field-select option {
  background: var(--bg-panel-solid);
  color: var(--text-primary);
}

.template-defaults-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px 0;
  margin-bottom: 14px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.template-default-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.template-default-item svg {
  color: var(--accent-purple);
  opacity: 0.7;
}

.btn-template-generate {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-template-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

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

.btn-template-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.template-trust-line {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

@media (max-width: 768px) {
  .templates-panel {
    padding: 16px 18px;
    margin-top: 18px;
  }
  
  .template-defaults-row {
    gap: 12px;
    flex-wrap: wrap;
  }
}


/* ========== IMAGE → VIDEO (I2V) PANEL STYLES ========== */
.i2v-upload-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
}

.i2v-header {
  margin-bottom: 16px;
}

.i2v-title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.i2v-helper {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.i2v-drop-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-input);
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.i2v-drop-zone:hover,
.i2v-drop-zone.drag-over {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
}

.i2v-drop-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.i2v-drop-placeholder svg {
  color: var(--text-muted);
  opacity: 0.5;
}

.i2v-drop-placeholder p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.i2v-browse-link {
  color: var(--accent-purple);
  cursor: pointer;
  text-decoration: underline;
}

.i2v-formats {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.i2v-preview {
  position: relative;
  width: 100%;
  max-height: 200px;
}

.i2v-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.i2v-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.i2v-remove-btn:hover {
  background: var(--error);
}

.i2v-remove-btn svg {
  color: white;
}

.i2v-tip {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.i2v-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.i2v-upload-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.i2v-upload-icon svg {
  color: var(--accent-purple);
  opacity: 0.8;
}

.i2v-motion-section,
.i2v-duration-section {
  margin-top: 16px;
}

.i2v-section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.i2v-motion-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.i2v-motion-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  min-width: 70px;
}

.i2v-motion-btn:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.1);
}

.i2v-motion-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.2));
  border-color: var(--accent-purple);
  color: white;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

.i2v-motion-btn.active svg {
  stroke: var(--accent-purple);
}

.i2v-motion-btn svg {
  opacity: 0.7;
}

.i2v-duration-btns {
  display: flex;
  gap: 8px;
}

.i2v-duration-btn {
  padding: 8px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition);
}

.i2v-duration-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

.i2v-duration-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(139, 92, 246, 0.2));
  border-color: var(--accent-cyan);
  color: white;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

/* ========== IDENTITY PIPELINE STYLES ========== */
.identity-pipeline-form {
  padding: 20px;
}

.identity-pipeline-form .panel {
  margin-bottom: 16px;
}

.identity-upload-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.identity-upload-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-input);
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.identity-upload-zone:hover {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
}

.identity-upload-zone .upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.identity-upload-zone .upload-placeholder svg {
  opacity: 0.5;
}

.identity-upload-zone .upload-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.identity-upload-zone .upload-preview {
  position: relative;
  width: 100%;
  max-width: 200px;
}

.identity-upload-zone .upload-preview img {
  width: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.style-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.style-chip {
  padding: 8px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.875rem;
}

.style-chip:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.style-chip.active {
  background: var(--accent-gradient);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.identity-lock-section {
  margin-bottom: 16px;
}

.identity-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-input);
  outline: none;
  -webkit-appearance: none;
  margin: 8px 0;
}

.identity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-purple);
  cursor: pointer;
  border: 2px solid var(--bg-panel-solid);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.video-options-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-group .form-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.prompt-section {
  margin-bottom: 16px;
}

.prompt-section .form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.status-text {
  display: inline-block;
  margin-left: 12px;
  font-size: 0.875rem;
  color: var(--accent-cyan);
}

.assured-badge {
  display: inline-block;
  padding: 4px 8px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--success);
  margin-top: 8px;
}

#dronePresetGroup {
  display: none;
}

@media (max-width: 768px) {
  .identity-pipeline-form {
    padding: 12px;
  }
  
  .video-options-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .style-chips {
    justify-content: center;
  }
}

/* ==================== MOBILE LAYOUT FIXES ==================== */
@media (max-width: 768px) {
  /* Fix main content area on mobile */
  .content-area {
    padding: 16px 12px;
    padding-top: 20px;
  }
  
  /* Fix hero content width */
  .hero-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 8px;
  }
  
  /* Templates panel - proper mobile layout */
  .templates-panel {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px 0 !important;
    padding: 14px !important;
    box-sizing: border-box;
  }
  
  .templates-panel .templates-header {
    padding: 0 !important;
  }
  
  .templates-panel .templates-content {
    padding: 12px 0 0 0 !important;
  }
  
  .templates-dropdown {
    width: 100% !important;
  }
  
  /* I2I Generator Form Mobile */
  .i2i-generator-form {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .i2i-generator-form .panel {
    padding: 16px !important;
    margin: 12px 0 !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  
  /* Quick Style Presets grid */
  .i2i-generator-form .style-presets-grid,
  .style-presets-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
  }
  
  .i2i-generator-form .style-preset-chip,
  .style-preset-chip {
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
  }
  
  /* Custom style prompt textarea */
  .i2i-generator-form textarea,
  .custom-style-prompt {
    width: 100% !important;
    min-height: 100px !important;
    box-sizing: border-box;
  }
  
  /* Upload area on mobile */
  .i2i-generator-form .upload-area,
  .upload-area {
    padding: 20px 16px !important;
  }
  
  /* Transform button */
  .i2i-generator-form .btn-generate {
    width: 100% !important;
    padding: 14px 20px !important;
  }
  
  /* Quality tier buttons mobile */
  .quality-tiers {
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
  }
  
  .quality-tier-btn {
    flex: 1 1 calc(33% - 8px) !important;
    min-width: 90px !important;
    padding: 12px 8px !important;
  }
  
  /* Featured Blueprints section */
  .featured-blueprints {
    padding: 0 8px;
  }
  
  .featured-blueprints-scroll {
    gap: 12px !important;
  }
  
  .blueprint-card {
    min-width: 140px !important;
    max-width: 160px !important;
  }
  
  /* Community Creations section */
  .community-creations {
    padding: 0 8px;
  }
  
  .creations-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  
  /* Mode icons row */
  .mode-icons-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
    padding: 0 8px !important;
  }
  
  .mode-icon-btn {
    width: 48px !important;
    height: 48px !important;
  }
  
  .mode-icon-label {
    font-size: 0.65rem !important;
  }
  
  /* Prompt bar mobile */
  .prompt-bar-unified {
    flex-direction: column !important;
    padding: 12px !important;
    gap: 12px !important;
  }
  
  .prompt-bar-unified input,
  .prompt-bar-unified textarea {
    width: 100% !important;
  }
  
  .prompt-bar-unified .btn-generate {
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .content-area {
    padding: 12px 8px;
  }
  
  .hero-content {
    padding: 0 4px;
  }
  
  .templates-panel {
    padding: 12px !important;
  }
  
  .quality-tier-btn {
    padding: 10px 6px !important;
    font-size: 0.75rem !important;
  }
  
  .quality-tier-btn .tier-icon {
    font-size: 1rem !important;
  }
  
  .creations-grid {
    grid-template-columns: 1fr !important;
  }
  
  .blueprint-card {
    min-width: 120px !important;
    max-width: 140px !important;
  }
  
  /* I2I form extra small */
  .i2i-generator-form .panel {
    padding: 12px !important;
  }
  
  .style-preset-chip {
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
  }
}

/* ========================================
   NEW SCREEN-BASED LAYOUT (Whitepaper v30.5)
   ======================================== */

/* App Shell */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg-base);
}

/* Icon Sidebar - Updated for screen-based nav */
.icon-sidebar {
  width: 72px;
  min-width: 72px;
  background: var(--bg-panel-solid);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  z-index: 100;
}

.ax-brand {
  display: flex;
  justify-content: center;
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.sidebar-logo-img {
  width: 36px;
  height: 36px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.sidebar-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.sidebar-nav-item svg {
  width: 22px;
  height: 22px;
  transition: all var(--transition);
}

.sidebar-nav-item .nav-label {
  font-size: 0.65rem;
  font-weight: 500;
  white-space: nowrap;
}

.sidebar-nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent-purple);
  border-radius: 0 2px 2px 0;
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  background: var(--accent-purple);
  color: white;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

.sidebar-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

/* Main Content Area */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-left: 92px;
  width: calc(100% - 92px);
}

/* Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--bg-panel-solid);
  border-bottom: 1px solid var(--border-subtle);
  height: 52px;
  gap: 16px;
}

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.project-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 0.8rem;
}

.project-pill .pill-label {
  color: var(--text-muted);
}

.project-pill .pill-value {
  color: var(--text-primary);
  font-weight: 500;
}

.btn-icon-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon-sm:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Content Area */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  position: relative;
}

/* Screens */
.screen {
  display: none;
  padding: 24px;
  min-height: 100%;
}

.screen.active {
  display: block;
}

.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.screen-head h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.screen-actions {
  display: flex;
  gap: 12px;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 48px 24px 32px;
  text-align: center;
  margin: -24px -24px 24px;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.08) 0%, transparent 100%);
}

.hero-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-gradient {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
  filter: blur(60px);
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #8B5CF6, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

/* Mode Tabs */
.mode-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.mode-tab:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
}

.mode-tab.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(59, 130, 246, 0.25));
  border-color: rgba(139, 92, 246, 0.5);
  color: white;
}

.mode-tab svg {
  width: 18px;
  height: 18px;
}

.mode-badge {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mode-badge.new {
  background: linear-gradient(135deg, #22C55E, #10B981);
  color: white;
}

/* Prompt Bar */
.prompt-bar-container {
  max-width: 720px;
  margin: 0 auto 24px;
}

.prompt-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: all var(--transition);
}

.prompt-bar:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.prompt-bar-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 10px;
  color: var(--accent-purple);
  flex-shrink: 0;
}

.prompt-bar-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}

.prompt-bar-input::placeholder {
  color: var(--text-muted);
}

.prompt-bar-generate {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.prompt-bar-generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.prompt-bar-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Quick Panels */
.quick-panels {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.panel-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* Workspace Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

/* Cards */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-body {
  padding: 18px;
}

.btn-ghost {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Empty State */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-text {
  font-size: 0.85rem;
}

/* Right Drawer */
.drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--bg-panel-solid);
  border-left: 1px solid var(--border-subtle);
  z-index: 200;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.drawer.open {
  right: 0;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Settings styles */
.settings-section {
  margin-bottom: 32px;
}

.settings-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.field input[type="email"],
.field input[type="text"],
.field select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.field.inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field.inline input[type="checkbox"] {
  width: auto;
}

.field.inline label {
  margin-bottom: 0;
}

/* Text gradient utility */
.text-gradient {
  background: linear-gradient(135deg, #8B5CF6, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Featured blueprints section */
.featured-blueprints-section {
  margin-top: 32px;
}

.featured-blueprints-section .section-header {
  margin-bottom: 20px;
}

.featured-blueprints-section .section-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
}

.blueprints-scroll-wrapper {
  overflow-x: auto;
  padding-bottom: 10px;
}

.blueprints-grid {
  display: flex;
  gap: 16px;
}

.blueprint-card {
  min-width: 150px;
  max-width: 180px;
  cursor: pointer;
  transition: all var(--transition);
}

.blueprint-card:hover {
  transform: translateY(-4px);
}

.blueprint-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  position: relative;
  margin-bottom: 8px;
}

.blueprint-title {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

.hot-badge,
.new-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.hot-badge {
  background: linear-gradient(135deg, #EF4444, #F97316);
  color: white;
}

.new-badge {
  background: linear-gradient(135deg, #22C55E, #10B981);
  color: white;
}

/* Responsive adjustments for new layout */
@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .icon-sidebar {
    width: 60px;
    min-width: 60px;
  }
  
  .main {
    margin-left: 60px;
    width: calc(100% - 60px);
  }
  
  .sidebar-nav-item .nav-label {
    display: none;
  }
  
  .mode-tabs {
    gap: 6px;
  }
  
  .mode-tab {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .drawer {
    width: 100%;
    right: -100%;
  }
  
  .quick-panels {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .icon-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--border-subtle);
    padding: 4px 8px;
    z-index: 100;
  }
  
  .ax-brand {
    display: none;
  }
  
  .sidebar-nav {
    flex-direction: row;
    justify-content: space-around;
  }
  
  .sidebar-bottom {
    display: none;
  }
  
  .sidebar-nav-item {
    padding: 6px;
  }
  
  .sidebar-nav-item.active::before {
    display: none;
  }
  
  .main {
    padding-bottom: 60px;
    margin-left: 0;
    width: 100%;
  }
  
  .top-bar {
    padding: 8px 12px;
  }
  
  .top-bar-center {
    display: none;
  }
}

/* Job status chip colors */
.job-chip.queued{background:rgba(255,204,102,.10);color:#ffcc66;border-color:rgba(255,204,102,.25)}
.job-chip.running{background:rgba(124,92,255,.10);color:#d7d0ff;border-color:rgba(124,92,255,.25)}
.job-chip.completed{background:rgba(55,214,122,.10);color:#8ff0b3;border-color:rgba(55,214,122,.25)}
.job-chip.failed{background:rgba(255,77,77,.10);color:#ffd2d2;border-color:rgba(255,77,77,.25)}

/* Button links styling */
a.btn-ghost {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Certificate chips */
.cert-chip {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(55,214,122,.10);
  color: #8ff0b3;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.cert-chip.low { background: rgba(255,204,102,.10); color: #ffcc66; border-color: rgba(255,204,102,.25); }
.cert-chip.bad { background: rgba(255,77,77,.10); color: #ffd2d2; border-color: rgba(255,77,77,.25); }

/* Certificate row styling */
.cert-row {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}
.cert-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.cert-id {
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.cert-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Jobs Filter Controls */
.jobs-filters {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color var(--transition);
  min-width: 130px;
}

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

.filter-select:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.filter-select option {
  background: var(--bg-panel-solid);
  color: var(--text-primary);
}

.filter-stats {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .jobs-filters {
    flex-direction: column;
    align-items: flex-start;
  }
  .filter-stats {
    margin-left: 0;
    margin-top: 8px;
  }
}

/* Pipeline State Badge Styles */
.pipeline-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.25);
  transition: all var(--transition);
}

.pipeline-state-badge:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Pipeline state color variants */
.pipeline-state-badge.processing {
  border: 1px solid #3b82f6;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.pipeline-state-badge.success {
  border: 1px solid #22c55e;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.pipeline-state-badge.warning {
  border: 1px solid #eab308;
  color: #eab308;
  background: rgba(234, 179, 8, 0.1);
}

.pipeline-state-badge.error {
  border: 1px solid #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.pipeline-state-badge.unknown {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
}

/* Processing indicator for pipeline states */
.processing-indicator {
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 6px;
  color: #3b82f6;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.processing-indicator::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Pipeline state info in drawer */
.pipeline-info-section {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}

.pipeline-info-section .info-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pipeline-info-section .info-row:last-child {
  border-bottom: none;
}

.pipeline-info-section .info-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
}

.pipeline-info-section .info-value {
  color: var(--text-primary);
  font-size: 12px;
}

.pipeline-info-section .termination-reason {
  padding: 8px;
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
  border-radius: 4px;
  color: #ef4444;
  font-size: 11px;
  font-family: var(--font-mono);
}
