:root {
  --bg-primary: #090d16;
  --bg-surface: rgba(18, 24, 38, 0.75);
  --bg-surface-hover: rgba(28, 38, 60, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 189, 248, 0.35);
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-violet: #a855f7;
  --accent-violet-glow: rgba(168, 85, 247, 0.25);
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.15);
  --transition-smooth: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.5) 0%, transparent 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* App Container */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 5rem;
}

/* Header */
.app-header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .app-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 20px var(--accent-cyan-glow);
}

.brand-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--accent-cyan-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.btn-sparkle {
  background: linear-gradient(135deg, var(--accent-violet), #7c3aed);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--accent-violet-glow);
}
.btn-sparkle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

.btn-glass {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  backdrop-filter: blur(12px);
}
.btn-glass:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-active);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn-icon-only {
  padding: 0.65rem;
  border-radius: var(--radius-full);
}

/* Header Utility Segmented Pill Group */
.header-utility-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  backdrop-filter: blur(12px);
}

.util-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.util-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-count-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-left: 2px;
}

/* Hero / Action Bar */
.hero-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-violet), transparent);
}

.hero-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 650px;
}

.hero-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Search & Filter Bar */
.controls-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .controls-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 460px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow);
  background: rgba(15, 23, 42, 0.9);
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
  scrollbar-width: none;
}
.filter-pills::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

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

.pill-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Recipes Grid */
.recipes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .recipes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Recipe Card */
.recipe-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.recipe-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), var(--shadow-glow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.command-badge {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

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

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-pill {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.codex-item-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-smooth);
  text-align: left;
}

.codex-item-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.codex-item-btn .cmd-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
}

.codex-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
}
.codex-link:hover {
  text-decoration: underline;
  color: #fff;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

.card-actions .btn {
  flex: 1;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.82);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), var(--shadow-glow);
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

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

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

/* Upload Dropzone */
.dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
}

.dropzone-icon {
  font-size: 2.2rem;
  color: var(--accent-cyan);
}

.dropzone-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dropzone-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.preview-container {
  display: none;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 240px;
}

.preview-container.active {
  display: block;
}

.preview-image {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: #000;
}

.remove-image-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.8rem;
}

/* Form inputs inside modals */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px var(--accent-cyan-glow);
}

.form-textarea {
  min-height: 90px;
  resize: vertical;
}

/* Prompt Output Display & Editable Area */
.prompt-output-box {
  background: #070a12;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
}

.prompt-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #38bdf8;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.prompt-textarea {
  width: 100%;
  background: #070a12;
  border: 1.5px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.prompt-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 18px var(--accent-cyan-glow), 0 0 0 2px var(--accent-cyan);
  background: #090e1a;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  color: #fff;
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideUp 0.25s ease-out forwards;
}

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

/* Spinner / Progress */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

/* ==================== APP UPDATE STYLES ==================== */
.btn-header-update {
  font-size: 1.1rem;
  transition: all 0.25s ease;
}
.btn-header-update:hover {
  transform: rotate(180deg);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}

.updating {
  animation: spin 0.8s linear infinite !important;
  pointer-events: none;
  opacity: 0.8;
}

/* ==================== MASTER SECURITY PIN GATE (4201) ==================== */
.pin-lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.pin-lock-card {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(9, 13, 22, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.15);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: modalFadeIn 0.25s ease-out;
}

.pin-lock-icon {
  font-size: 2.8rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  width: 68px;
  height: 68px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.25);
}

.pin-lock-title {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.pin-lock-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.pin-lock-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.pin-lock-input {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1.5rem;
  letter-spacing: 0.4em;
  text-align: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-mono);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.pin-lock-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4), inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.pin-lock-btn {
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.pin-lock-error {
  font-size: 0.82rem;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  width: 100%;
}

/* AI Creator Launchpad Bar */
.launchpad-bar {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(12px);
}

.launchpad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.launchpad-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  color: #fff;
}

.launchpad-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.launchpad-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.launchpad-grid {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.launch-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.launch-chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

/* Designer Modifiers */
.modifier-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mod-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 95px;
  flex-shrink: 0;
}

.chip-group {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  flex: 1;
}

.mod-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: inherit;
}

.mod-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
}

.mod-chip:active {
  transform: translateY(0);
}

/* 1-Click Launch Generator Buttons */
.btn-launch-generator {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-launch-generator:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(168, 85, 247, 0.2));
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

/* ==========================================================================
   Global Ecosystem Hub Dock (Unified App Navigation)
   ========================================================================== */
.hub-dock-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  max-width: 600px;
}

.hub-dock-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted, #94a3b8);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  user-select: none;
}
.hub-dock-summary::-webkit-details-marker { display: none; }

.hub-dock-summary:hover {
  color: var(--text-primary, #ffffff);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.09);
}

.hub-dock-details[open] .hub-summary-arrow {
  transform: rotate(180deg);
}

.hub-summary-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.hub-dock-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #101524;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
  margin-top: 8px;
}
.hub-dock-pill::-webkit-scrollbar { display: none; }

.hub-dock-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.hub-dock-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.hub-dock-item.active {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.4);
  font-weight: 700;
}

/* ========================================================
   VIEW NAVIGATION TABS
======================================================== */
.vault-view-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  padding: 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.vault-view-tabs::-webkit-scrollbar { display: none; }

.view-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
  position: relative;
}

.view-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.view-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(168, 85, 247, 0.2));
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
  font-weight: 700;
}

.tab-hot-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #ffffff;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.06); opacity: 1; box-shadow: 0 0 16px rgba(239, 68, 68, 0.8); }
}

.tab-count-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

/* ========================================================
   MINIVERSE STUDIO STYLES
======================================================== */
.miniverse-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  animation: fadeIn 0.3s ease;
}

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

.miniverse-hero {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(56, 189, 248, 0.12), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.miniverse-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.miniverse-hero-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .miniverse-hero-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.miniverse-hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #38bdf8 70%, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.miniverse-hero-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin-top: 0.35rem;
}

.miniverse-builder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .miniverse-builder-grid {
    grid-template-columns: 1fr 1.1fr 0.9fr;
  }
}

.mv-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.mv-card:hover {
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.mv-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.65rem;
}

.mv-card-header span:first-child {
  font-size: 1.25rem;
}

.mv-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.mv-chips-wrap::-webkit-scrollbar {
  width: 4px;
}
.mv-chips-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.mv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.mv-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.mv-chip.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(168, 85, 247, 0.25));
  border-color: var(--accent-cyan);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.mv-custom-input-box {
  margin-top: 0.5rem;
}

.mv-custom-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
  display: block;
}

/* Studio Action & Live Canvas Area */
.mv-action-panel {
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.85), rgba(9, 13, 22, 0.95));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mv-prompt-preview-box {
  background: rgba(10, 15, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.mv-prompt-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.mv-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-generate-hero {
  flex: 2;
  min-width: 240px;
  padding: 14px 24px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6 50%, #f59e0b);
  background-size: 200% 200%;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.btn-generate-hero:hover:not(:disabled) {
  background-position: right center;
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
}

.btn-generate-hero:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* In-App Live Creation Showcase */
.mv-showcase {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 380px;
  position: relative;
}

.mv-showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mv-engine-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.mv-canvas-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(5, 8, 15, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  min-height: 320px;
  position: relative;
}

.mv-placeholder-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.mv-placeholder-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.8;
  animation: floatMini 3s ease-in-out infinite;
}

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

.mv-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2.5rem;
  text-align: center;
}

.mv-loading-spinner {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 4px solid rgba(56, 189, 248, 0.15);
  border-top-color: var(--accent-cyan);
  border-right-color: var(--accent-violet);
  animation: spin 0.8s linear infinite;
}

.mv-loading-step {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.mv-loading-subtext {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.mv-rendered-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mv-rendered-img {
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

.mv-rendered-img:hover {
  transform: scale(1.01);
}

.mv-image-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

/* ========================================================
   MY CREATIONS GALLERY
======================================================== */
.creations-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.creations-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.creations-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.creations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.creation-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.creation-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.creation-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  background: #000;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}

.creation-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.creation-card:hover .creation-thumb {
  transform: scale(1.04);
}

.creation-overlay-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  backdrop-filter: blur(4px);
}

.creation-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.creation-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.creation-prompt-snippet {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.creation-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.65rem;
  margin-top: auto;
}

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

.creation-actions {
  display: flex;
  gap: 5px;
}

/* Fullscreen Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(16px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-modal.active {
  display: flex;
}

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

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  object-fit: contain;
}

.lightbox-close-btn {
  position: absolute;
  top: -45px;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* In-Modal Generation Canvas for Prompt Forge */
.forge-image-canvas {
  background: rgba(10, 15, 26, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
  display: none;
}

.forge-image-canvas.active {
  display: block;
}

/* ========================================================
   MINIVERSE MULTI-MODE STUDIO & PLAYGROUND ENHANCEMENTS
======================================================== */
.mv-mode-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px 2px;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
}
.mv-mode-selector::-webkit-scrollbar {
  display: none;
}

.mv-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.mv-mode-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.mv-mode-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(168, 85, 247, 0.25));
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

.mv-mode-badge {
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.4px;
}

/* Photo Infiltration Upload Area */
.mv-photo-dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.45);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.mv-photo-dropzone:hover, .mv-photo-dropzone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
}

.mv-photo-preview-wrap {
  position: relative;
  max-height: 220px;
  display: none;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.mv-photo-preview-wrap img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.mv-btn-clear-photo {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
}

/* 3-Act Micro-Heist Story Strip */
.heist-story-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 768px) {
  .heist-story-strip {
    grid-template-columns: 1fr;
  }
}

.heist-act-card {
  background: rgba(10, 15, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.heist-act-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-amber);
}

.heist-act-thumb {
  width: 100%;
  height: 140px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: block;
}

/* Video AI Motion Button */
.btn-video-motion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(236, 72, 153, 0.4);
  border-radius: var(--radius-md);
  color: #f472b6;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-video-motion:hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(139, 92, 246, 0.3));
  color: #fff;
  border-color: #f472b6;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

/* ========================================================
   IN-FRAME ZOOM & PAN VIEWPORT
======================================================== */
.mv-zoom-viewport {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 480px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at center, #0e1726 0%, #030712 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  user-select: none;
  touch-action: none;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mv-zoom-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 0 0;
  will-change: transform;
  transition: transform 0.04s ease-out;
}

.mv-rendered-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.mv-zoom-hud {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(10, 15, 26, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 9999px;
  padding: 4px 8px;
  z-index: 20;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.mv-hud-btn {
  background: transparent;
  border: none;
  color: #e2e8f0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mv-hud-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  transform: scale(1.1);
}

.mv-hud-level {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent-cyan);
  min-width: 44px;
  text-align: center;
  font-family: monospace;
}

.mv-zoom-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(5, 8, 15, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 12px;
  border-radius: 9999px;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

/* ========================================================
   FULLSCREEN LIGHTBOX MODAL WITH DEEP PAN & ZOOM
======================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.96);
  backdrop-filter: blur(20px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-modal.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.lightbox-content {
  position: relative;
  width: 100%;
  max-width: 1300px;
  height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.lightbox-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all 0.2s ease;
}

.lightbox-close-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: #ef4444;
  transform: scale(1.1);
}

.lightbox-zoom-bar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 9999px;
  padding: 5px 14px;
  z-index: 90;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(14px);
}

.lb-zoom-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lb-zoom-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: var(--accent-cyan);
  color: #38bdf8;
  transform: scale(1.05);
}

.lb-zoom-level {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--accent-cyan);
  min-width: 50px;
  text-align: center;
  font-family: monospace;
}

.lightbox-viewport {
  width: 100%;
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at center, #111827 0%, #030712 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 54px 0 12px;
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
}

.lightbox-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 0 0;
  will-change: transform;
  transition: transform 0.04s ease-out;
}

.lightbox-img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  pointer-events: none;
  border-radius: var(--radius-md);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.85);
}

.lightbox-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 14px;
  border-radius: 9999px;
  pointer-events: none;
  white-space: nowrap;
}

.lightbox-footer-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 50;
}

/* ===== Character Studio (v2.9) ===== */
.cs-container { max-width: 720px; margin: 0 auto; padding: 0 0.5rem 3rem; }
.cs-form, #csDraftBox { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 1rem; }
#csDraftBox { margin-top: 1rem; }
.cs-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); margin: 0.65rem 0 0.25rem; }
.cs-input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 0.55rem 0.75rem; border-radius: 10px; border: 1px solid var(--border-subtle); background: rgba(255,255,255,0.04); color: inherit; font: inherit; }
textarea.cs-input { resize: vertical; }
.cs-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.6rem; }
.cs-status { margin: 0.75rem 0; font-size: 0.85rem; min-height: 1.2em; }
.cs-title { margin: 0 0 0.25rem; font-size: 1.1rem; }
.cs-scene { margin-top: 0.75rem; padding: 0.75rem; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle); }
.cs-scene-head { font-weight: 700; font-size: 0.85rem; }
.cs-tags { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.4rem; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.cs-char { display: block; width: 100%; max-width: 320px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 14px; margin: 1rem auto 0; }
.cs-clips { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1rem; }
.cs-clip { display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }
.cs-clip video { width: 100%; max-width: 280px; aspect-ratio: 9 / 16; border-radius: 14px; background: #000; }
.cs-limit { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--text-secondary); }
.cs-notice { margin: 0.75rem 0; padding: 0.75rem 1rem; border-radius: 12px; border: 1px solid rgba(251,191,36,0.5); background: rgba(251,191,36,0.1); font-size: 0.85rem; line-height: 1.4; }
.cs-photo { margin-top: 0.5rem; padding: 0.75rem; border-radius: 12px; border: 1px dashed var(--border-subtle); }
.cs-photo-row { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.6rem; }
.cs-photo-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; border: 2px solid var(--border-subtle); }
.cs-check { display: flex; align-items: center; gap: 0.4rem; min-height: 44px; font-size: 0.85rem; }
.cs-hint { font-size: 0.72rem; color: var(--text-secondary); margin: 0.5rem 0 0; }