/* ==========================================================================
   AuraSynth AI — Master Studio Stylesheet
   Theme: Luxe Glassmorphism Dark & Aurora Cyber Glow
   ========================================================================== */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d111a;
  --bg-tertiary: #131926;
  --bg-glass: rgba(15, 22, 36, 0.75);
  --bg-glass-hover: rgba(22, 32, 52, 0.85);
  --bg-card: #111724;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(139, 92, 246, 0.5);
  --border-glow: rgba(168, 85, 247, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-purple: #8b5cf6;
  --accent-violet: #a855f7;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --gradient-main: linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #06b6d4 100%);
  --gradient-btn: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --header-height: 64px;
  --sidebar-width: 440px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.25);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

/* Reset & Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Lighting */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  animation: floatOrb 18s ease-in-out infinite alternate;
}
.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45) 0%, rgba(0,0,0,0) 70%);
  top: -100px;
  left: -100px;
}
.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, rgba(0,0,0,0) 70%);
  bottom: -150px;
  right: 10%;
  animation-delay: -6s;
}
.glow-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.25) 0%, rgba(0,0,0,0) 70%);
  top: 40%;
  left: 30%;
  animation-delay: -12s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, -20px) scale(0.95); }
}

/* ==========================================================================
   Top Header Navigation
   ========================================================================== */
.studio-header {
  position: relative;
  z-index: 20;
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.logo-text h1 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

.badge-tag {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 2px 7px;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c084fc;
  border-radius: var(--radius-full);
}

.privacy-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseDot 2s infinite;
}

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

/* Device Switcher */
.device-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.device-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.device-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.device-btn.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Buttons */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gradient-btn);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.55);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
}
.btn-icon:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ==========================================================================
   Main Studio Layout
   ========================================================================== */
.studio-container {
  position: relative;
  z-index: 10;
  display: flex;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* Left Sidebar Studio */
.studio-sidebar {
  width: var(--sidebar-width);
  min-width: 380px;
  background: rgba(13, 17, 26, 0.9);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Custom Scrollbar */
.sidebar-scrollable::-webkit-scrollbar {
  width: 6px;
}
.sidebar-scrollable::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}
.sidebar-scrollable::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Panel Sections */
.panel-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.section-label .sub-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.section-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

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

.text-btn {
  background: none;
  border: none;
  color: var(--accent-purple);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.text-btn:hover {
  text-decoration: underline;
}

/* Presets Grid */
.presets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.preset-pill.active {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--accent-purple);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

/* Textarea Input */
.input-wrapper textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  min-height: 150px;
  transition: border-color 0.2s ease;
}

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

/* Theme Cards */
.theme-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-card:hover {
  background: var(--bg-tertiary);
  border-color: rgba(255, 255, 255, 0.15);
}

.theme-card input {
  position: absolute;
  opacity: 0;
}

.theme-card.active {
  background: rgba(139, 92, 246, 0.12);
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.theme-preview-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.aurora-dot {
  background: linear-gradient(135deg, #a855f7, #6366f1, #06b6d4);
}
.swiss-dot {
  background: linear-gradient(135deg, #09090b, #e4e4e7, #18181b);
}
.cyberpunk-dot {
  background: linear-gradient(135deg, #00f0ff, #ff0055, #000000);
}
.titanium-dot {
  background: linear-gradient(135deg, #0284c7, #10b981, #0f172a);
}
.sunset-dot {
  background: linear-gradient(135deg, #f97316, #fb7185, #facc15);
}

.theme-info {
  display: flex;
  flex-direction: column;
}

.theme-info strong {
  font-size: 13px;
  color: var(--text-primary);
}

.theme-info small {
  font-size: 11px;
  color: var(--text-muted);
}

/* Accordion Tuning */
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 8px 0;
  user-select: none;
}

.chevron-icon {
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.accordion-header.open .chevron-icon {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  flex-direction: column;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.accordion-body.open {
  display: flex;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.setting-row label {
  font-size: 12px;
  color: var(--text-secondary);
}

.color-picker-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-picker-group input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: none;
  cursor: pointer;
}

.color-picker-group input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-picker-group input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

#accent-color-val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.select-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.select-input:focus {
  outline: none;
  border-color: var(--accent-purple);
}

/* Toggles Grid */
.toggles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toggle-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.toggle-chip input {
  accent-color: var(--accent-purple);
}

.toggle-chip:has(input:checked) {
  border-color: rgba(139, 92, 246, 0.4);
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.08);
}

/* Sticky Action Area */
.sticky-action {
  margin-top: auto;
  padding-top: 10px;
}

.btn-action {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
  background: var(--gradient-main);
  color: #fff;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.4);
}

.btn-action:hover {
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.65);
  transform: translateY(-2px);
}

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

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-action.loading .btn-spinner {
  display: block;
}
.btn-action.loading .btn-icon {
  display: none;
}
.btn-action.loading .btn-text {
  opacity: 0.8;
}

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

.action-footer-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   Right Preview Stage & Device Mockups
   ========================================================================== */
.studio-preview-area {
  flex: 1;
  background: #04060a;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.preview-toolbar {
  height: 48px;
  padding: 0 20px;
  background: rgba(13, 17, 26, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

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

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.preview-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.preview-viewport-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Device Canvas Stage */
.device-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background: radial-gradient(circle at center, #0f1624 0%, #04060a 100%);
  position: relative;
}

/* Device Mockup Shell */
.device-mockup {
  display: flex;
  flex-direction: column;
  background: #181d29;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.8);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  position: relative;
}

/* Desktop Frame */
.device-mockup.desktop {
  width: 100%;
  max-width: 1200px;
  height: 94%;
}

/* Tablet Frame */
.device-mockup.tablet {
  width: 768px;
  height: 94%;
}

/* Mobile Frame */
.device-mockup.mobile {
  width: 390px;
  height: 844px;
  max-height: 94%;
  border-radius: 40px;
  border: 6px solid #2a3347;
}

.device-mockup.mobile .mockup-chrome {
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Chrome Window Bar */
.mockup-chrome {
  height: 38px;
  padding: 0 16px;
  background: #121722;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chrome-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.close { background-color: #ef4444; }
.dot.min { background-color: #f59e0b; }
.dot.max { background-color: #10b981; }

.chrome-address-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #090c13;
  padding: 4px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  max-width: 480px;
  width: 100%;
  margin: 0 20px;
}

.address-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-single {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Screen & Iframe */
.mockup-screen {
  flex: 1;
  width: 100%;
  height: 100%;
  background: #000;
  position: relative;
  overflow: hidden;
}

#preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #fff;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

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

.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 50px rgba(139, 92, 246, 0.2);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-dialog.modal-sm {
  max-width: 520px;
}

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

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

.modal-title-group h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-title-group p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.code-modal-body {
  padding: 0;
}

.code-header-bar {
  padding: 10px 20px;
  background: #090c13;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.code-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-display {
  background: #04060a;
  padding: 20px;
  margin: 0;
  max-height: 520px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: #e2e8f0;
  tab-size: 2;
}

/* Settings Inputs */
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.radio-card-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.radio-card input {
  margin-top: 3px;
  accent-color: var(--accent-purple);
}

.radio-card strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.radio-card p {
  font-size: 11px;
  color: var(--text-muted);
}

.text-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
}
.text-input:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.hint-text {
  font-size: 11px;
  color: var(--text-muted);
}
.hint-text a {
  color: var(--accent-cyan);
  text-decoration: none;
}
.hint-text a:hover {
  text-decoration: underline;
}

.w-full {
  width: 100%;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.3s ease 3.7s forwards;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.4);
}
.toast.success .toast-icon {
  color: var(--accent-emerald);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.4);
}
.toast.error .toast-icon {
  color: var(--accent-rose);
}

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

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

/* Responsive adjustments */
@media (max-width: 1024px) {
  .studio-container {
    flex-direction: column;
    overflow-y: auto;
  }
  .studio-sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .studio-preview-area {
    min-height: 600px;
  }
}
