/* 
 * TUNE AI | Neural Interface Theme
 * Futuristic Glassmorphism Design System
 */

:root {
  /* --- CORE PALETTE (Matched to Landing Page) --- */
  --void-bg: #09090b;
  /* Landing --bg */
  --void-deep: #000000;

  --glass-panel: rgba(255, 255, 255, 0.03);
  /* Landing --glass */
  --glass-panel-hover: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.06);
  /* Landing --glass-border */
  --glass-highlight: rgba(255, 255, 255, 0.1);

  /* --- ACCENTS (Matched to Landing Page) --- */
  --neon-purple: #a855f7;
  /* Landing --accent */
  --neon-cyan: #22d3ee;
  /* Landing --cyan */
  --neon-blue: var(--neon-blue);
  /* Kept as tertiary */

  /* Updated Gradient to match Landing Page Vibe */
  --gradient-primary: linear-gradient(135deg, #a855f7 0%, #22d3ee 100%);
  --gradient-glow: linear-gradient(135deg, rgba(168, 85, 247, 0.4) 0%, rgba(34, 211, 238, 0.3) 100%);

  /* --- TYPOGRAPHY (Premium Selection) --- */
  --font-head: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', 'Plus Jakarta Sans', sans-serif;

  --text-main: #fafafa;
  /* Landing --text */
  --text-muted: #a1a1aa;
  /* Landing --text-secondary */
  --text-dark: #71717a;
  /* Landing --text-muted */

  /* --- SPACING & LAYOUT --- */
  --sidebar-width: 280px;
  --header-height: 70px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
}

/* --- RESET & BASE --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
}

body {
  background-color: var(--void-bg);
  color: var(--text-main);
  font-family: var(--font-body);
  height: 100vh;
  overflow: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* --- AMBIENT EFFECTS --- */
.ambient-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
}

.glow-1 {
  top: -200px;
  left: -200px;
  background: var(--neon-blue);
}

.glow-2 {
  bottom: -200px;
  right: -200px;
  background: var(--neon-purple);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  opacity: 0.2;
  z-index: -1;
  pointer-events: none;
}

/* --- APP SHELL --- */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100%;
  scrollbar-gutter: stable;
}

/* --- GLASS SIDEBAR --- */
.glass-sidebar {
  width: var(--sidebar-width);
  background: var(--glass-panel);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-sidebar.hidden-mobile {
  transform: translateX(-100%);
}

/* Sidebar collapsed state */
.glass-sidebar.collapsed {
  width: 0;
  padding: 0;
  overflow: hidden;
  border: none;
}

.glass-sidebar.collapsed * {
  opacity: 0;
  visibility: hidden;
}

.sidebar-header {
  min-height: 60px;
  /* Reduced from 70px */
  padding: 12px 16px;
  /* Reduced from 16px 20px */
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

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

.logo-icon-wrapper {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.logo-icon {
  color: white;
  font-size: 20px;
}

.logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
}

.logo-highlight {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 2px;
}

.sidebar-actions {
  padding: 8px 12px;
  /* Reduced from 12px 10px */
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Sidebar Action Items (Buttons & Search) Base Design */
.sidebar-action-btn,
.sidebar-search {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* Align text to the start (left) */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  /* Muted color to match search placeholder */
  font-size: 13px;
  /* Reduced to match search input */
  font-weight: 500;
  /* Regular weight to match search placeholder */
  cursor: pointer;
  height: 44px;
  /* Reduced from 48px */
  width: 100%;
  margin-top: 8px;
  /* Reduced from 10px */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-action-btn:hover,
.sidebar-search:focus-within {
  background: rgba(255, 255, 255, 0.08);
  /* Removed translateY jitter */
}

/* Specific Accents - Simplified to match search box */
#emptyNewChat {
  background: rgba(255, 255, 255, 0.03);
  /* Match search box base */
  border-color: rgba(255, 255, 255, 0.08);
}

#emptyNewChat:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

#emptyNewChat .material-symbols-outlined {
  color: var(--neon-purple);
  /* Keep purple icon for identity */
}

#viewSavedPrompts {
  background: rgba(255, 255, 255, 0.03);
  /* Match search box base */
  border-color: rgba(255, 255, 255, 0.08);
}

#viewSavedPrompts:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

#viewSavedPrompts .material-symbols-outlined {
  color: var(--neon-cyan);
  /* Keep cyan icon for identity */
}

.sidebar-search:focus-within {
  border-color: var(--neon-purple);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

/* Duplicate sidebar-search removed */

.sidebar-search .material-symbols-outlined {
  font-size: 18px;
  color: var(--text-muted);
}

.sidebar-search input {
  background: transparent !important;
  border: none !important;
  color: white !important;
  font-size: 13px;
  width: 100%;
  outline: none !important;
  box-shadow: none !important;
}

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

.sidebar-filters {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  overflow-x: auto;
}

.filter-chip {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-chip:hover {
  background: rgba(168, 85, 247, 0.05);
  border-color: rgba(168, 85, 247, 0.2);
  color: white;
}

.filter-chip.active {
  background: rgba(168, 85, 247, 0.15);
  border-color: var(--neon-purple);
  color: white;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.floating-sidebar-trigger {
  position: fixed;
  top: 15px;
  left: 15px;
  width: 40px;
  height: 40px;
  background: rgba(168, 85, 247, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-sidebar.collapsed~.floating-sidebar-trigger {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.floating-sidebar-trigger:hover {
  background: rgba(168, 85, 247, 0.4);
  transform: scale(1.05);
}

.floating-sidebar-trigger .material-symbols-outlined {
  font-size: 24px;
}

/* Header Title */
.header-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 450px;
  transition: all 0.3s ease;
}

.chat-meta-badge {
  display: inline-block;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.1);
  color: var(--neon-purple);
  margin-left: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.chat-meta-badge.hidden {
  display: none;
}

/* Light Theme */
body.light-theme .sidebar-search {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .sidebar-search input {
  color: #1a1a2e;
}

body.light-theme .sidebar-action-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
  color: #1a1a2e;
}

body.light-theme .sidebar-action-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

body.light-theme .header-title {
  color: #1a1a2e;
}

.new-chat-btn-glass {
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(168, 85, 247, 0.05) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-head);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: rocketPulse 3s infinite ease-in-out;
}

@keyframes rocketPulse {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.1);
  }

  50% {
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.5);
  }
}

.new-chat-btn-glass:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.6);
  transform: translateY(-2px);
}

/* 🎁 Pro Trial Glass Tag & Pills */
.trial-glass-tag,
.trial-pill,
.trial-indicator-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  margin-left: 6px;
  background: rgba(168, 85, 247, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 4px;
  color: #a855f7 !important;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.trial-pill span {
  margin-right: 2px;
  font-size: 9px;
}

/* Glassmorphism version for Active Mode Label */
.trial-indicator-pill {
  background: rgba(168, 85, 247, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow: none;
  font-size: 8px;
  padding: 1px 4px;
}

/* Micro-animation for updates */
.pulse-update {
  animation: pill-pulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pill-pulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.15);
    filter: brightness(1.4);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.6);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

/* Pro User State & Exhausted Trial */
.trial-pill.is-pro-user,
.trial-pill.exhausted {
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #a855f7 !important;
  box-shadow: none;
}

.trial-glass-tag::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--neon-purple);
  border-radius: 50%;
  margin-right: 5px;
  box-shadow: 0 0 5px var(--neon-purple);
}

.group-header {
  padding: 12px 14px 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent);
}

.conversation-list {
  flex: 1;
  overflow-y: overlay;
  padding: 4px;
  /* Normalized padding */
  margin-top: 12px;
  /* Add some separation from buttons */
}

.conversation-list::-webkit-scrollbar {
  width: 4px;
}

.conversation-list::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.2);
  border-radius: 10px;
}

.conversation-list:hover::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
}

.conversation-item {
  padding: 10px 14px;
  /* Reduced from 12px for density */
  margin-bottom: 4px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  background: transparent;
  border: 1px solid transparent;
}

.conversation-item .material-symbols-outlined {
  font-size: 16px;
  opacity: 0.6;
}

.conversation-item .conv-icon {
  font-size: 14px;
  opacity: 0.4;
  flex-shrink: 0;
}

.conversation-item:hover {
  background: rgba(168, 85, 247, 0.05);
  border-color: rgba(168, 85, 247, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-main);
  /* Removed translateX flow */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.conversation-item.active {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.12), rgba(168, 85, 247, 0.05)) !important;
  border-color: rgba(168, 85, 247, 0.4) !important;
  color: white !important;
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.15);
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  overflow: hidden;
}

/* Active Item Shimmer */
.conversation-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: sidebarShimmer 3s infinite linear;
}

@keyframes sidebarShimmer {
  to {
    left: 200%;
  }
}

.conversation-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: var(--neon-purple);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 8px var(--neon-purple);
}

/* Sidebar Delete Button */
.conv-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  opacity: 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.conv-delete-btn .material-symbols-outlined {
  font-size: 14px;
}

.conversation-item:hover .conv-delete-btn {
  opacity: 0.6;
}

.conv-delete-btn:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
  opacity: 1 !important;
}

.conversation-item .conversation-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.conv-meta {
  font-size: 10px;
  color: var(--text-dark);
  opacity: 0.6;
  font-weight: 400;
  transition: opacity 0.2s;
}

.conversation-item:hover .conv-meta {
  opacity: 1;
}

/* Light Theme */
body.light-theme .conversation-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

body.light-theme .conversation-item.active {
  background: rgba(0, 0, 0, 0.02);
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--glass-border);
}

.user-profile-glass {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}

.avatar-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 13px;
}

.user-plan {
  font-size: 10px;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

/* --- SIDEBAR FOOTER --- */
.sidebar-footer {
  padding: 8px 12px;
  /* Reduced from 12px */
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-upgrade-area {
  padding: 0 12px 8px;
  /* Reduced and consolidated */
}

.user-profile-glass {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  /* Reduced from 14px */
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  /* More compact */
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
}

.user-profile-glass:hover {
  background: rgba(168, 85, 247, 0.05);
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.icon-btn-ghost {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: rotate(45deg);
}

.icon-btn-ghost.small {
  width: 32px;
  height: 32px;
}

.icon-btn-ghost.small .material-symbols-outlined {
  font-size: 20px;
}

/* --- MAIN WORKSPACE --- */
.main-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: radial-gradient(circle at top center, rgba(59, 130, 246, 0.05), transparent 70%);
}

.glass-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Space between left and right elements */
  padding: 0 32px;
  z-index: 500;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide header in active chat */
.main-workspace.chat-active .glass-header {
  opacity: 0;
  pointer-events: none;
  height: 0;
  padding: 0;
  overflow: hidden;
  border: none;
}

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

/* Unified Header Pill */
.unified-nav-pill {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 4px 12px;
  gap: 12px;
  height: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.unified-nav-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(168, 85, 247, 0.3);
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 4px;
}

.pill-logo {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}

.pill-brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  letter-spacing: -0.01em;
}

.pill-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
}


/* Remove nested borders inside unified pill */
.unified-nav-pill .tune-trigger {
  background: transparent;
  backdrop-filter: none;
  border: none;
  padding: 0;
  height: auto;
  box-shadow: none;
}

.unified-nav-pill .tune-trigger:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

.version-select .material-symbols-outlined {
  font-size: 16px;
  color: var(--text-muted);
  transition: transform 0.3s var(--ease);
}

.version-select.open .material-symbols-outlined {
  transform: rotate(180deg);
}

.version-select .tune-dropdown-menu {
  top: calc(100% + 8px);
  min-width: 140px;
}

.search-glass {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 18px;
  border-radius: 50px;
  width: 280px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-glass:focus-within {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.4);
  width: 340px;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}

.search-glass .material-symbols-outlined {
  font-size: 18px;
  color: var(--text-muted);
  transition: color 0.3s;
}

.search-glass:focus-within .material-symbols-outlined {
  color: var(--neon-purple);
}

.search-glass input {
  background: transparent !important;
  border: none !important;
  color: white !important;
  font-size: 14px;
  width: 100%;
  outline: none !important;
  box-shadow: none !important;
}

.search-glass input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.header-right {
  display: flex;
  gap: 12px;
}

/* Notification System */
.notification-wrapper {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: rgba(15, 15, 25, 0.4);
  /* More transparent for liquid glass */
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  /* Curved type */
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.98);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  overflow: hidden;
}

.notification-dropdown::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

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

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notif-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}

.notif-clear {
  background: none;
  border: none;
  color: var(--neon-blue);
  font-size: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.notif-clear:hover {
  opacity: 0.7;
}

.notif-list {
  max-height: 300px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.2s;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notif-item.unread {
  background: rgba(59, 130, 246, 0.05);
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--neon-blue);
  border-radius: 50%;
}

.notif-icon {
  font-size: 20px;
  color: var(--neon-blue);
  flex-shrink: 0;
}

.notif-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-text {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.4;
}

.notif-time {
  font-size: 11px;
  color: var(--text-muted);
}

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

.notif-empty .material-symbols-outlined {
  font-size: 32px;
  opacity: 0.5;
}

/* Light Theme Notifications */
body.light-theme .notification-dropdown {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .notif-header {
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .notif-item {
  border-color: rgba(0, 0, 0, 0.04);
}

body.light-theme .notif-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .notif-item.unread {
  background: rgba(59, 130, 246, 0.05);
}

.icon-btn-glass {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.icon-btn-glass:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  transform: translateY(-2px);
}

.icon-btn-ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.icon-btn-ghost:hover {
  color: white;
}

/* --- CONTENT CONTAINER --- */
.content-container {
  flex: 1;
  position: relative;
  overflow-y: auto;
  scrollbar-gutter: stable;
  /* Enable scrolling for the whole area */
  padding-bottom: 60px;
  /* Reduced from 100px */
}

/* Custom Scrollbar for Content Container to match the theme */
.content-container::-webkit-scrollbar {
  width: 6px;
}

.content-container::-webkit-scrollbar-track {
  background: transparent;
}

.content-container::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.2);
  border-radius: 10px;
}

.content-container:hover::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
}

/* --- HERO LANDING --- */
.landing-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 15vh;
}

.landing-content {
  max-width: 800px;
  text-align: center;
  animation: fadeUp 0.6s ease-out;
}

.hero-title {
  font-family: var(--font-head);
  font-size: 112px;
  font-weight: 900;
  margin-bottom: 24px;
  line-height: 1;
  letter-spacing: -0.05em;
  color: #ffffff;
  text-transform: none;
  filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.6));
}

@keyframes heroTextGlow {

  0%,
  100% {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  }

  50% {
    filter: drop-shadow(0 4px 25px rgba(168, 85, 247, 0.3));
  }
}

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

.hero-subtitle {
  font-size: 18px;
  /* Reverted to 18px */
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 60px;
  font-weight: 400;
}

.stats-glass-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.stat-glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  /* Reverted to 20px */
  border-radius: 28px;
  /* High curvature */
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-glass-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--neon-blue);
}

.stat-icon.purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--neon-purple);
}

.stat-value {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  display: block;
}

.stat-label {
  font-size: 12px;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Workspace Actions */
.workspace-actions {
  display: flex;
  gap: 8px;
}

.workspace-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.workspace-action-btn .material-symbols-outlined {
  font-size: 16px;
}

.workspace-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.1);
}

.workspace-action-btn.danger {
  color: var(--text-muted);
}

.workspace-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.action-label {
  font-size: 12px;
}

/* Light Theme Workspace Actions */
body.light-theme .workspace-action-btn {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
  color: #666;
}

body.light-theme .workspace-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #1a1a2e;
}

.suggestion-chips {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.chip {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: white;
}

/* --- CHAT WORKSPACE --- */
.chat-workspace {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Obsolete workspace-header removed - unified with glass-header */

.chat-title-wrapper h2 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
}

.chat-meta-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--neon-cyan);
  margin-left: 8px;
}

.split-view-container {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.chat-feed-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 40px;
  scroll-behavior: smooth;
}

.message-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.feed-spacer {
  height: 120px;
}

/* Space for floating command bar */

/* --- MESSAGES --- */
.conversation-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.conversation-meta {
  font-size: 11px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* --- MESSAGES --- */
.message {
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 24px;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  padding: 0 8px;
}

.message-time {
  font-size: 11px;
  color: var(--text-dark);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.message.user .message-header {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.message.user .message-content {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px 18px 4px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.message.user {
  align-items: flex-end;
}

.message-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.message-avatar.ai {
  background: var(--gradient-primary);
  color: white;
  border-radius: 8px;
}

.badge-glass-purple {
  background: rgba(168, 85, 247, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #d8b4fe;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.badge-glass-purple:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
}

.sender-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sender-pill.user {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.sender-pill.ai {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
}

.sender-pill .material-symbols-outlined {
  font-size: 14px;
}

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

.message-avatar.user {
  background: #333;
  color: #fff;
}

.message-content {
  padding: 18px 28px;
  background: rgba(10, 10, 12, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px 18px 18px 18px;
  line-height: 1.7;
  font-size: 15px;
  color: #f1f5f9;
  max-width: 85ch;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  white-space: pre-wrap;
  font-family: var(--font-body);
  transition: all 0.3s ease;
  word-wrap: break-word;
}

.message.ai .message-content {
  background: rgba(168, 85, 247, 0.03);
  border: 1px solid rgba(168, 85, 247, 0.15);
  position: relative;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', var(--font-body);
  letter-spacing: 0.1px;
}

/* Markdown Element Styling inside Messages */
.message-content h1,
.message-content h2,
.message-content h3 {
  color: #fff;
  margin: 16px 0 8px 0;
  font-family: 'Outfit', sans-serif;
  line-height: 1.3;
}

.message-content h1 {
  font-size: 1.5rem;
}

.message-content h2 {
  font-size: 1.3rem;
}

.message-content h3 {
  font-size: 1.15rem;
}

.message-content ul,
.message-content ol {
  margin: 12px 0;
  padding-left: 20px;
}

.message-content li {
  margin-bottom: 6px;
  position: relative;
}

.message-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 20px 0;
}

.message-content strong {
  color: #fff;
  font-weight: 700;
}

.message-content code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  color: #d8b4fe;
}

.message.ai .message-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.5), transparent);
  animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.message-content pre,
.message-content code {
  font-family: 'SF Mono', 'Roboto Mono', monospace !important;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-stage {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
  color: white;
  font-weight: 600;
  white-space: nowrap;
}

/* --- COMMAND BAR (FLOATING) --- */
.input-layer {
  position: fixed;
  bottom: 0px;
  left: var(--sidebar-width);
  right: 0;
  height: 140px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  pointer-events: none;
  background: linear-gradient(to top, var(--void-bg) 20%, transparent 100%);
  transition: right 0.25s ease-out, background 0.25s ease-out;
  /* Fast, specific transitions */
}

/* Landing State Positioning - DEAD CENTER (Only for Empty State) */
.main-workspace:not(.chat-active):not(.saved-prompts-active) .input-layer {
  top: 50% !important;
  bottom: unset !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
}

/* Position input layer at bottom for Saved Prompts */
.main-workspace.saved-prompts-active .input-layer {
  top: unset !important;
  bottom: 0px !important;
  transform: none !important;
  background: linear-gradient(to top, var(--void-bg) 20%, transparent 100%) !important;
}

/* When in chat mode (chatArea visible), offset input bar from right panel */
body:has(#chatArea:not(.hidden)) .input-layer {
  right: 300px !important;
  /* Account for context panel width */
}

.command-bar-wrapper {
  width: 850px;
  max-width: 95%;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.command-bar-wrapper:hover {
  /* Removed scale/translateY as it triggers layout loops on borders */
  filter: brightness(1.05);
}

.command-bar-glass {
  background: rgba(15, 15, 20, 0.65);
  backdrop-filter: blur(40px) saturate(210%);
  -webkit-backdrop-filter: blur(40px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  width: 100%;
}

/* Integrated Input Container */
.command-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px 14px 24px;
  width: 100%;
}

.active-workflow-badge-footer {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  padding-bottom: 12px;
  padding-right: 24px;
  box-sizing: border-box;
  animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.badge-content {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  padding: 4px 12px;
  border-radius: 10px;
  color: white;
}

.active-workflow-badge-footer .material-symbols-outlined {
  font-size: 16px;
  color: var(--neon-purple);
}

.active-workflow-badge-footer span:not(.material-symbols-outlined) {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.close-workflow-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-left: 4px;
  transition: all 0.2s;
}

.close-workflow-btn:hover {
  color: white;
  transform: scale(1.1);
}

.close-workflow-btn .material-symbols-outlined {
  font-size: 14px;
}

.command-bar-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%, rgba(168, 85, 247, 0.03) 100%);
  pointer-events: none;
}

.command-bar-glass:focus-within {
  background: rgba(20, 20, 28, 0.45);
  border-color: rgba(168, 85, 247, 0.5);
  /* Purple accent focus */
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(168, 85, 247, 0.2),
    inset 0 0 10px rgba(168, 85, 247, 0.05);
  transform: translateY(-2px);
}

.command-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 4px;
}

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

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.tool-btn.active {
  color: var(--neon-blue);
  background: rgba(59, 130, 246, 0.1);
}

#promptInput {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  resize: none;
  max-height: 300px;
  padding: 10px 0;
  line-height: 1.5;
  /* Hide scrollbar */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE, Edge */
}

#promptInput::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Brave, Opera */
}

#promptInput::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-style: italic;
  letter-spacing: 0.2px;
}

.run-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  /* Lighter base */
  backdrop-filter: blur(12px) saturate(180%);
  /* Core Glass Effect */
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  /* Finer border */
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: not-allowed;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.run-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
}

.run-btn span {
  position: relative;
  z-index: 1;
}

#promptInput:not(:placeholder-shown)~.command-actions .run-btn {
  background: rgba(168, 85, 247, 0.1);
  color: #ffffff;
  cursor: pointer;
  border-color: rgba(168, 85, 247, 0.5);
  /* Stronger border on focus */
  box-shadow:
    0 8px 32px rgba(168, 85, 247, 0.25),
    inset 0 0 10px rgba(168, 85, 247, 0.1);
}

#promptInput:not(:placeholder-shown)~.command-actions .run-btn::before {
  opacity: 0.6;
  /* Subtle gradient background */
}

#promptInput:not(:placeholder-shown)~.command-actions .run-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 25px rgba(168, 85, 247, 0.4);
}

#promptInput:not(:placeholder-shown)~.command-actions .run-btn:hover::before {
  opacity: 1;
  filter: saturate(1.2);
}

.command-footer {
  text-align: center;
  font-size: 10px;
  color: var(--text-dark);
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* --- UTILITIES --- */
.hidden {
  display: none !important;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Keep Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Context Panel (Right) */
.context-panel {
  width: 300px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 12, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
  transition: all 0.3s ease;
}

/* --- TUNE AI SELECT (CUSTOM DROPDOWN) --- */
.tune-select {
  position: relative;
  z-index: 100;
  /* Higher priority */
}

.tune-trigger {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  /* Curved edges */
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  user-select: none;
}

.tune-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(168, 85, 247, 0.3);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.1);
}

.tune-trigger .material-symbols-outlined {
  font-size: 18px;
  opacity: 0.6;
  transition: transform 0.3s;
}

.tune-select.open .tune-trigger .material-symbols-outlined {
  transform: rotate(180deg);
}

.tune-select.locked {
  opacity: 0.6;
  filter: grayscale(0.4);
}

.tune-select.locked .tune-trigger {
  cursor: default !important;
  pointer-events: none !important;
}

/* Homepage Selectors open DOWNWARDS (Dropdown) */
body:has(#emptyState:not(.hidden)) .tune-dropdown-menu {
  bottom: auto !important;
  top: calc(100% + 10px) !important;
  /* Move down */
  transform: translateY(-10px) scale(0.95);
  /* Animate from slightly above */
}

body:has(#emptyState:not(.hidden)) .tune-dropdown-menu:not(.hidden) {
  transform: translateY(0) scale(1) !important;
}

/* Default (Chat Mode) Selectors open UPWARDS (Dropup) */
.tune-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  z-index: 9999;
  min-width: 160px;
  background: rgba(15, 15, 20, 0.85);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tune-dropdown-menu:not(.hidden) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.tune-option {
  padding: 10px 16px;
  border-radius: 16px;
  /* Inside curved items */
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tune-option:hover {
  background: rgba(168, 85, 247, 0.15);
  color: #ffffff;
  padding-left: 20px;
}

.tune-option.active {
  background: rgba(168, 85, 247, 0.25);
  color: white;
}

/* Dark transparent dropdown options */
.format-select-glass option {
  background: rgba(20, 20, 25, 0.98);
  color: rgba(255, 255, 255, 0.9);
  padding: 12px 16px;
  border: none;
}

/* Command Actions - tight alignment */
.command-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- RIGHT PANEL TABS --- */
.panel-intro {
  padding: 24px;
  border-bottom: 1px solid var(--glass-border);
}

.panel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.panel-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 500;
}

.panel-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.panel-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.error-state {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- PROCESS LOG ACCORDION --- */
.process-log-container {
  padding: 12px;
  border-bottom: 1px solid var(--glass-border);
  animation: slideIn 0.3s ease-out;
}

.process-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.process-step {
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
}

.process-step-header {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  user-select: none;
}

.process-step-header:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.process-step-icon {
  font-size: 16px;
  color: var(--neon-blue);
}

.process-step-status {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dark);
}

.process-step-content {
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--glass-border);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: none;
  /* Collapsed by default */
}

.process-step.open .process-step-content {
  display: block;
}

.step-summary {
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.step-expanded {
  margin: 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11px;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  border-left: 3px solid var(--accent-primary);
}

.process-step.open .process-step-header {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

/* --- TYPING INDICATOR --- */
.typing-indicator {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 4px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

/* ============================================
   SETTINGS MODAL STYLES
   ============================================ */

/* ============================================
   SETTINGS MODAL (PREMIUM LAYOUT)
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  /* Ensure it sits above everything */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  will-change: opacity;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.settings-modal.premium-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  width: 900px;
  max-width: calc(100% - 40px);
  height: 600px;
  max-height: 85vh;
  background: rgba(18, 18, 24, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  /* FIX: Smooth ease-out instead of bouncy overshoot curve */
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  transform: scale(0.95) translateY(8px);
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.modal-overlay:not(.hidden) .settings-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* --- SIDEBAR --- */
.settings-sidebar {
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
}

.settings-sidebar-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 24px;
  padding-left: 12px;
  font-family: var(--font-head);
  letter-spacing: -0.5px;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  /* FIX: Only transition color and background, not ALL properties */
  transition: background 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
}

.settings-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.settings-tab.active {
  background: rgba(168, 85, 247, 0.15) !important;
  color: white;
  border: 1px solid rgba(168, 85, 247, 0.3);
  /* FIX: Removed backdrop-filter — unnecessary GPU load */
}

.settings-tab .material-symbols-outlined {
  font-size: 20px;
}

/* --- CONTENT AREA --- */
.settings-content-area {
  position: relative;
  padding: 32px 40px;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-close-abs {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  /* FIX: Only transition color and background */
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 10;
}

.modal-close-abs:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  /* FIX: Removed transform rotate — it shifts layout and triggers repaints */
}

/* --- PAGES --- */
.settings-page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.settings-page.active {
  display: block;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  font-family: var(--font-head);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.setting-group {
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  /* overflow: hidden; REMOVED to allow dropdowns */
}

/* --- LIGHT THEME PRESETS --- */
body.light-theme .settings-modal.premium-layout {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.12);
  border-radius: 32px;
  /* Highly curved */
}

body.light-theme .settings-sidebar {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .settings-sidebar-header h2 {
  color: #1a1a2e;
}

body.light-theme .settings-tab {
  color: #64748b;
}

body.light-theme .settings-tab:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #1a1a2e;
}

body.light-theme .settings-tab.active {
  color: white;
}

body.light-theme .page-title {
  color: #1a1a2e;
}

body.light-theme .setting-group {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .modal-close-abs {
  background: rgba(0, 0, 0, 0.05);
  color: #64748b;
}

body.light-theme .modal-close-abs:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: calc(80vh - 80px);
}

.settings-section {
  margin-bottom: 24px;
}

.settings-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 12px;
  /* FIX: Only transition background and border, not ALL */
  transition: background 0.2s ease, border-color 0.2s ease;
}

.setting-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.setting-item.danger {
  border-color: rgba(239, 68, 68, 0.2);
}

.setting-item.danger:hover {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.3);
}

.setting-info {
  flex: 1;
}

.setting-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: white;
  margin-bottom: 4px;
}

.setting-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

/* Theme Toggle Buttons */
.theme-toggle {
  display: flex;
  gap: 8px;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.theme-btn.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border-color: rgba(102, 126, 234, 0.4);
  color: white;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  cursor: pointer;
  transition: all 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(22px);
}

/* Settings Select Dropdown */
.settings-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  min-width: 140px;
  /* FIX: Specific transitions only */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-select:hover {
  border-color: var(--neon-blue);
}

.settings-select:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

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

/* Keyboard Shortcuts Grid */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 4px;
}

.shortcut-keys kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: monospace;
  color: var(--text-main);
}

.shortcut-action {
  font-size: 12px;
  color: var(--text-muted);
}

/* Danger Zone */
.danger-zone {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.03);
}

.setting-item.danger .setting-label {
  color: #f87171;
}

.setting-btn.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.setting-btn.danger:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
}

/* Light Theme for new components */
body.light-theme .settings-select {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

body.light-theme .settings-select option {
  background: white;
  color: #1a1a2e;
}

body.light-theme .shortcut-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .shortcut-keys kbd {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

body.light-theme .danger-zone {
  background: rgba(239, 68, 68, 0.02);
}

/* Setting Buttons */
.setting-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.setting-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.setting-btn.danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.setting-btn.danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* About Section - Designer Polish */
.about-card.formal-layout {
  background: linear-gradient(135deg, rgba(20, 18, 35, 0.8) 0%, rgba(30, 25, 50, 0.8) 100%);
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: 24px;
  padding: 2px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.about-card-inner {
  background: rgba(15, 12, 28, 0.6);
  border-radius: 22px;
  padding: 48px 32px;
  position: relative;
  z-index: 2;
}

.about-card.formal-layout::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(168, 85, 247, 0.1) 25%, transparent 50%);
  animation: rotateGlow 20s linear infinite;
  /* Slowed down from 10s to reduce redraw frequency */
  z-index: 1;
  transform: translateZ(0);
  /* Force new layer */
  pointer-events: none;
  /* Prevent interference with mouse events */
}

@keyframes rotateGlow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.app-logo-official {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.official-logo-img {
  width: 64px;
  height: 64px;
}

.app-branding {
  margin-bottom: 24px;
}

.app-name-premium {
  font-family: 'Outfit', sans-serif;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(to bottom, #fff 30%, rgba(255, 255, 255, 0.6) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.app-tagline {
  font-size: 14px;
  color: var(--accent-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  opacity: 0.8;
}

.app-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-purple);
  margin-bottom: 24px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--neon-purple);
  border-radius: 50%;
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(168, 85, 247, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  }
}

.app-mission {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* --- ENHANCED PROFILE STYLES --- */

.settings-scroll-container {
  height: calc(100vh - 200px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

/* Custom Scrollbar for Settings */
.settings-scroll-container::-webkit-scrollbar,
.settings-content-area::-webkit-scrollbar {
  width: 6px;
}

.settings-scroll-container::-webkit-scrollbar-track,
.settings-content-area::-webkit-scrollbar-track {
  background: transparent;
}

.settings-scroll-container::-webkit-scrollbar-thumb,
.settings-content-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.settings-scroll-container::-webkit-scrollbar-thumb:hover,
.settings-content-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Firefox scrollbar */
.settings-scroll-container,
.settings-content-area {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin: 24px 0 16px 0;
}

.section-label:first-child {
  margin-top: 0;
}

.user-profile-card {
  display: flex;
  gap: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.profile-avatar-large .material-symbols-outlined {
  font-size: 40px;
  color: white;
}

.avatar-edit-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: #a855f7 !important;
  border: 3px solid #1a1a2e !important;
  /* Stand out against avatar */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  z-index: 10;
}

.avatar-edit-badge:hover {
  transform: scale(1.15) rotate(5deg);
  background: #c084fc !important;
}

.avatar-edit-badge span {
  font-size: 16px !important;
  color: white !important;
}

body.light-theme .avatar-edit-badge {
  border-color: white !important;
}

.profile-details-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: white;
  font-size: 14px;
  transition: all 0.2s;
  width: 100%;
}

.profile-input:focus {
  outline: none;
  border-color: #a855f7 !important;
  background: rgba(168, 85, 247, 0.05);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
}

/* Stats Grid */
.stats-grid-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card-mini {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon-mini {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
}

.stat-icon-mini span {
  font-size: 20px;
}

.stat-icon-mini.blue {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
}

.stat-icon-mini.purple {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
}

.stat-icon-mini.green {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.stat-info-mini {
  display: flex;
  flex-direction: column;
}

.stat-value-mini {
  font-size: 18px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.stat-label-mini {
  font-size: 11px;
  color: var(--text-muted);
}

/* Subscription Card */
.subscription-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(168, 85, 247, 0.05));
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.sub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.sub-plan-name {
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.sub-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.sub-status.active {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.sub-details {
  font-size: 13px;
  color: var(--text-muted);
}

.setting-btn.outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.setting-btn.outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: white;
}

.setting-item.clickable {
  cursor: pointer;
  transition: all 0.2s;
}

.setting-item.clickable:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chevron {
  color: var(--text-muted);
  font-size: 20px;
}

.profile-actions {
  margin-top: 32px;
}

/* Light Theme Enhancements */
body.light-theme .settings-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

body.light-theme .user-profile-card,
body.light-theme .stat-card-mini {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .profile-avatar-large {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light-theme .avatar-edit-badge {
  background: white;
  border-color: white;
}

body.light-theme .avatar-edit-badge span {
  color: #1a1a2e;
}

body.light-theme .input-group label {
  color: #64748b;
}

body.light-theme .profile-input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

body.light-theme .profile-input:focus {
  background: white;
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.1);
}

body.light-theme .stat-value-mini {
  color: #1a1a2e;
}

body.light-theme .stat-label-mini {
  color: #64748b;
}

body.light-theme .subscription-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(168, 85, 247, 0.04));
  border-color: rgba(168, 85, 247, 0.25);
}

body.light-theme .sub-plan-name {
  color: #1a1a2e;
}

body.light-theme .sub-status.active {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

body.light-theme .sub-details {
  color: #64748b;
}

body.light-theme .setting-btn.outline {
  border-color: rgba(0, 0, 0, 0.2);
  color: #1a1a2e;
}

body.light-theme .setting-btn.outline:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: #1a1a2e;
}

body.light-theme .setting-item.clickable:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* ============================================
   LIGHT THEME
   ============================================ */

body.light-theme {
  --void-bg: #f5f7fa;
  --void-deep: #ffffff;
  --glass-panel: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --text-primary: #1a1a2e;
  --text-muted: #64748b;
  --text-dark: #94a3b8;
}

body.light-theme .glass-sidebar {
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .command-bar-glass {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme #promptInput {
  color: #1a1a2e;
}

body.light-theme #promptInput::placeholder {
  color: #94a3b8;
}

body.light-theme .message-content {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1a1a2e;
}

body.light-theme .settings-modal {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .modal-header {
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .modal-header h2 {
  color: #1a1a2e;
}

body.light-theme .modal-close {
  background: rgba(0, 0, 0, 0.05);
  color: #64748b;
}

body.light-theme .modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

body.light-theme .settings-section h3 {
  color: #64748b;
}

body.light-theme .setting-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .setting-label {
  color: #1a1a2e;
}

body.light-theme .setting-desc {
  color: #64748b;
}

body.light-theme .theme-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #64748b;
}

body.light-theme .theme-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a2e;
}

body.light-theme .theme-btn.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
  border-color: rgba(102, 126, 234, 0.4);
  color: #1a1a2e;
}

body.light-theme .setting-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

body.light-theme .toggle-slider {
  background: rgba(0, 0, 0, 0.15);
}

body.light-theme .about-info .app-version,
body.light-theme .about-info .app-desc {
  color: #64748b;
}

body.light-theme .context-panel {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .panel-tab {
  color: #64748b;
}

body.light-theme .panel-tab.active {
  color: #1a1a2e;
  border-color: #667eea;
}

body.light-theme .conversation-item {
  background: transparent;
  color: #1a1a2e;
}

body.light-theme .conversation-item:hover {
  background: rgba(102, 126, 234, 0.08);
}

body.light-theme .conversation-item.active {
  background: rgba(102, 126, 234, 0.12);
}

body.light-theme .conv-title {
  color: #1a1a2e;
}

body.light-theme .conv-preview {
  color: #64748b;
}

body.light-theme .conv-time {
  color: #94a3b8;
}

body.light-theme .sidebar-section-label {
  color: #64748b;
}

body.light-theme .user-name {
  color: #1a1a2e;
}

body.light-theme .user-profile-glass {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .icon-btn-ghost {
  background: rgba(0, 0, 0, 0.05);
  color: #64748b;
}

body.light-theme .icon-btn-ghost:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

body.light-theme .ambient-glow {
  opacity: 0.03;
}

body.light-theme .stat-value,
body.light-theme .stat-label {
  color: #1a1a2e;
}

body.light-theme .hero-title {
  color: #1a1a2e;
}

body.light-theme .hero-subtitle {
  color: #64748b;
}

body.light-theme .suggestion-chip {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1a1a2e;
}

body.light-theme .suggestion-chip:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.3);
}

body.light-theme .process-step-header {
  background: rgba(0, 0, 0, 0.02);
  color: #1a1a2e;
}

body.light-theme .process-step-content {
  background: rgba(0, 0, 0, 0.03);
  color: #64748b;
}

body.light-theme .format-select-glass {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

body.light-theme .enhance-btn-glass {
  color: white;
}

/* ============================================================================ */
/* CONSISTENCY MODE TEST PANEL */
/* ============================================================================ */

.consistency-test-panel {
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.consistency-test-panel .panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  border-bottom: 1px solid var(--glass-border);
}

.consistency-test-panel .panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.consistency-test-panel .panel-header .material-symbols-outlined {
  color: var(--neon-purple);
  font-size: 24px;
}

.consistency-test-panel .panel-body {
  padding: 20px;
}

.consistency-textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.2s ease;
}

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

.consistency-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.consistency-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--neon-purple) 0%, #6366f1 50%, var(--neon-blue) 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.consistency-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35);
}

.consistency-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.consistency-result {
  margin-top: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
}

.consistency-result .result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(139, 92, 246, 0.1);
  border-bottom: 1px solid var(--glass-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--neon-purple);
}

.consistency-result pre {
  margin: 0;
  padding: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
}

/* Light theme support */
body.light-theme .consistency-test-panel {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .consistency-textarea {
  background: rgba(0, 0, 0, 0.03);
  color: #1a1a2e;
}

body.light-theme .consistency-result {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .consistency-result pre {
  color: #374151;
}

/* ============================================================================ */
/* MODE SELECTOR */
/* ============================================================================ */

.mode-select-glass {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-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='%238b5cf6' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.mode-select-glass:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
}

.mode-select-glass:focus {
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.mode-select-glass option {
  background: #1a1a2e;
  color: var(--text-main);
  padding: 8px;
}

/* Light theme */
body.light-theme .mode-select-glass {
  background: rgba(139, 92, 246, 0.1);
  color: #1a1a2e;
}

body.light-theme .mode-select-glass option {
  background: white;
  color: #1a1a2e;
}

/* ============================================================================ */
/* CHARACTER PANEL */
/* ============================================================================ */

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

.characters-header h4 {
  margin: 0;
  font-size: 14px;
  color: var(--text-main);
}

.add-character-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--neon-purple) 0%, #6366f1 100%);
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  color: white;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.add-character-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.add-character-btn .material-symbols-outlined {
  font-size: 16px;
}

.characters-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.characters-list .empty-message {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  padding: 20px;
  line-height: 1.5;
}

.character-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px;
  transition: all 0.2s;
}

.character-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--neon-purple);
}

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

.character-card-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}

.character-card-actions {
  display: flex;
  gap: 4px;
}

.character-card-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.character-card-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.character-card-actions button.delete:hover {
  color: #ef4444;
}

.character-card-details {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================================ */
/* CHARACTER MODAL */
/* ============================================================================ */

.character-modal {
  max-width: 500px;
}

/* Support Chat */
.support-chat-container {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: 20px;
}

.support-chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.support-message {
  max-width: 80%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.support-message.system {
  align-self: flex-start;
}

.support-message.user {
  align-self: flex-end;
}

.support-message .message-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.support-message.system .message-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-bottom-left-radius: 2px;
}

.support-message.user .message-bubble {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  border-bottom-right-radius: 2px;
}

.support-message .message-time {
  font-size: 10px;
  color: var(--text-muted);
}

.support-message.user .message-time {
  align-self: flex-end;
}

.support-chat-input-wrapper {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 12px;
}

#supportChatInput {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px 14px;
  color: white;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

#supportChatInput:focus {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.05);
}

.support-send-btn {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.support-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

/* Light Theme Support Chat */
body.light-theme .support-chat-container {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .support-message.system .message-bubble {
  background: white;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

body.light-theme #supportChatInput {
  background: white;
  color: #1a1a2e;
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme #supportChatInput:focus {
  background: white;
  border-color: #a855f7;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

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

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

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--neon-purple) 0%, #6366f1 100%);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.btn-primary .material-symbols-outlined {
  font-size: 18px;
}

/* --- MODE SELECTOR --- */
.mode-selector {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px 16px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.1);
}

.mode-btn .material-symbols-outlined {
  font-size: 18px;
  opacity: 0.7;
}

.mode-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--text-main);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.mode-btn.active .material-symbols-outlined {
  color: var(--neon-blue);
  opacity: 1;
}

/* Light Theme Mode Selector */
body.light-theme .mode-btn {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.04);
}

body.light-theme .mode-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.light-theme .mode-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

/* ============================================
   COLLAPSIBLE AI MESSAGE STYLES
   ============================================ */

.message-collapsible {
  width: auto;
  max-width: 100%;
}

.message-preview {
  cursor: pointer;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: fit-content;
  max-width: 85%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.message-preview:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--neon-blue);
}

.preview-text {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  display: inline;
}

.expand-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--neon-blue);
  font-size: 13px;
  font-weight: 500;
}

.expand-toggle .material-symbols-outlined {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.message-content-full {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Styled Copy Button */
.copy-btn-styled {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn-styled:hover {
  background: rgba(168, 85, 247, 0.25);
  color: white;
  border-color: var(--neon-purple);
}

.copy-btn-styled .material-symbols-outlined {
  font-size: 16px;
  color: var(--neon-purple);
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}

.save-btn-styled {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 10px;
  color: var(--neon-cyan);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-btn-styled:hover {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%);
  border-color: var(--neon-cyan);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(34, 211, 238, 0.2);
}

.save-btn-styled .material-symbols-outlined {
  font-size: 18px;
}

/* Light Theme */
body.light-theme .message-preview {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .message-preview:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.light-theme .message-content-full {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
  color: #1a1a2e;
}

body.light-theme .copy-btn-styled {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

/* ============================================
   PROCESS STEP COLLAPSIBLE STYLES
   ============================================ */

.process-step {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.process-step-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}

.process-step-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.process-step.open .process-step-header {
  border-bottom-color: var(--border-color);
  background: rgba(255, 255, 255, 0.05);
}

.process-step-icon {
  font-size: 20px;
  color: var(--neon-blue);
  opacity: 0.8;
}

.process-step span:nth-child(2) {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.process-step-status {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.process-step-content {
  padding: 0 16px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-step.open .process-step-content {
  padding: 16px;
  max-height: 500px;
  opacity: 1;
  overflow: visible;
  /* Override inline display:none if present */
  display: block !important;
}

/* Light Theme Support */
body.light-theme .process-step {
  background: white;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .process-step-header {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .process-step-header:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.light-theme .process-step.open .process-step-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .process-step span:nth-child(2) {
  color: #1a1a2e;
}

/* ============================================
   PRICING MODAL STYLES
   ============================================ */

.pricing-modal {
  max-width: 700px;
  padding: 32px;
}

.pricing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.pricing-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateY(-4px);
}

.pricing-card.featured {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-color: rgba(102, 126, 234, 0.4);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

.plan-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.plan-header h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.plan-price {
  font-size: 40px;
  font-weight: 700;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.plan-price span {
  font-size: 16px;
  font-weight: 400;
  opacity: 0.7;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.plan-features li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-main);
}

.plan-features li.disabled {
  color: var(--text-muted);
  text-decoration: line-through;
}

.plan-btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.plan-btn.current {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: not-allowed;
}

.plan-btn.upgrade {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.plan-btn.upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* Plan badges */
.plan-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.plan-badge.free {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.plan-badge.pro {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.pro-badge,
.free-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-right: 8px;
}

.pro-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.free-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

/* Light theme support */
body.light-theme .pricing-card {
  background: white;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .pricing-card.featured {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

body.light-theme .plan-features li {
  color: #1a1a2e;
}

@media (max-width: 600px) {
  .pricing-cards {
    grid-template-columns: 1fr;
  }
}

/* LIQUID GLASS OVERRIDES */

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
.page-title,
.section-label,
.sub-plan-name {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
}

/* --- BUTTONS --- */
.primary-btn,
.setting-btn,
.plan-btn,
.cta-button,
.mode-btn,
.action-btn,
button.upgrade {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.2) 0%, rgba(168, 85, 247, 0.05) 100%) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(168, 85, 247, 0.4) !important;
  border-top: 1px solid rgba(168, 85, 247, 0.6) !important;
  box-shadow:
    0 4px 24px rgba(168, 85, 247, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  font-weight: 600 !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  /* Ensure rounded corners */
}

.primary-btn:hover,
.setting-btn:hover,
.plan-btn:hover,
.cta-button:hover,
.mode-btn:hover,
.action-btn:hover,
button.upgrade:hover {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.35) 0%, rgba(168, 85, 247, 0.15) 100%) !important;
  border-color: rgba(168, 85, 247, 0.7) !important;
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(168, 85, 247, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.primary-btn:active,
.setting-btn:active,
.plan-btn:active,
.cta-button:active,
.mode-btn:active,
.action-btn:active,
button.upgrade:active {
  transform: translateY(0) !important;
}

/* --- PURPLE DOMINANCE --- */
.sidebar-item.active {
  background: rgba(168, 85, 247, 0.15) !important;
  border-right: 3px solid var(--neon-purple) !important;
  border-left: none !important;
}

.sidebar-item.active .material-symbols-outlined {
  color: var(--neon-purple) !important;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}

.feature-card:hover {
  border-color: rgba(168, 85, 247, 0.4) !important;
  box-shadow: 0 4px 24px rgba(168, 85, 247, 0.15) !important;
}

.toggle-switch input:checked+.toggle-slider {
  background-color: var(--neon-purple) !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3) !important;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.5) !important;
}

/* --- AUTO-RESIZE INPUT --- */
#promptInput {
  overflow-y: hidden;
  /* Hide scrollbar initially */
  resize: none;
  /* Disable manual resize */
  min-height: 50px;
  /* Match initial height */
  max-height: 200px;
  /* Cap growth */
  transition: height 0.1s ease;
}

#promptInput.scrollable {
  overflow-y: auto;
  /* Show scrollbar only when max-height reached */
}

/* --- SAVED PROMPTS GRID --- */
.saved-prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 32px;
  width: 100%;
}

.saved-prompt-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.saved-prompt-card:hover {
  background: rgba(255, 255, 255, 0.05);
  /* Subtle background lift instead of glow */
  transform: translateY(-2px);
  /* Reduced lift */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.saved-prompt-content {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
  max-height: 160px;
  /* Restored previous size constraint */
  overflow-y: auto;
  /* Restored internal scrolling */
  scrollbar-width: none;
  /* Hide scrollbar for Firefox */
  -ms-overflow-style: none;
  /* Hide scrollbar for IE/Edge */
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
}

.saved-prompt-content::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar for Chrome/Safari */
}

/* Removed max-height and internal scrolling to unify with page scroll */

.saved-prompt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.saved-prompt-date {
  font-size: 11px;
  color: var(--text-dark);
}

.saved-prompt-actions {
  display: flex;
  gap: 8px;
}

.action-btn-mini {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, 0.2);
  background: rgba(168, 85, 247, 0.1);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn-mini:hover {
  background: rgba(168, 85, 247, 0.25);
  color: var(--neon-purple);
  border-color: rgba(168, 85, 247, 0.4);
}

.action-btn-mini.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.action-btn-mini .material-symbols-outlined {
  font-size: 18px;
}

/* --- MESSAGE ACTIONS --- */
.save-btn-styled {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.save-btn-styled:hover {
  background: rgba(168, 85, 247, 0.25);
  color: white;
  border-color: var(--neon-purple);
}

.save-btn-styled .material-symbols-outlined {
  font-size: 16px;
  color: var(--neon-cyan);
}

/* Global Utilities */
.hidden {
  display: none !important;
}

/* =================================================================
   HOMEPAGE CENTERED INPUT BAR
   Only affects the homepage when #emptyState is visible
   ================================================================= */

/* When on homepage, move the input bar to the center (accounting for sidebar) */
body:has(#emptyState:not(.hidden)) .input-layer {
  position: absolute;
  top: 50%;
  /* Positioned at 50% (vertical center) */
  left: calc(50% + 140px);
  transform: translate(-50%, -50%);
  bottom: auto;
  width: 90%;
  max-width: 850px;
  padding: 0 20px;
  background: transparent !important;
  box-shadow: none !important;
}

/* Clean up wrapper shadows on homepage */
body:has(#emptyState:not(.hidden)) .command-bar-wrapper {
  background: transparent !important;
  box-shadow: none !important;
}

/* Make the input bar clean with proper glass styling on homepage */
body:has(#emptyState:not(.hidden)) .command-bar-glass {
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

body:has(#emptyState:not(.hidden)) .command-bar-glass textarea {
  min-height: 80px;
  font-size: 16px;
  background: transparent !important;
}

/* Make homepage content area center the title above input */
body:has(#emptyState:not(.hidden)) .content-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  overflow: hidden;
  /* Remove scrollbar on homepage */
}

/* Position heading directly above input bar */
body:has(#emptyState:not(.hidden)) #emptyState {
  position: absolute;
  top: 49.5%;
  /* Tightly positioned just above the input bar (50%) */
  left: calc(50% - 20px);
  transform: translate(-50%, -50%);
  z-index: 100;
  /* High z-index to ensure visibility */
  text-align: center;
}

/* Heading styling logic */

/* Premium typography for homepage heading */

body:has(#emptyState:not(.hidden)) .hero-title {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: 72px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  background: linear-gradient(135deg, #fafafa 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 60px rgba(168, 85, 247, 0.3);
}

body:has(#emptyState:not(.hidden)) .hero-title .text-gradient {
  background: linear-gradient(135deg, #a855f7 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================================
   🎬 CONSISTENCY MODE: Image Upload Panel Styles
   ============================================================================ */

.consistency-upload-panel {
  width: 100%;
  background: rgba(9, 9, 11, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
  animation: slideDown 0.3s ease;
  backdrop-filter: blur(20px);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.consistency-upload-panel .upload-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(34, 211, 238, 0.1) 100%);
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
  font-weight: 600;
  color: var(--text-main);
  font-size: 14px;
}

.consistency-upload-panel .upload-header .material-symbols-outlined {
  color: #a855f7;
  font-size: 20px;
}

.consistency-upload-panel .close-panel-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.consistency-upload-panel .close-panel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.consistency-upload-panel .upload-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.consistency-upload-panel .name-input-row input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.2s ease;
}

.consistency-upload-panel .name-input-row input:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.consistency-upload-panel .name-input-row input::placeholder {
  color: var(--text-muted);
}

.consistency-upload-panel .upload-zone {
  border: 2px dashed rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.consistency-upload-panel .upload-zone:hover {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.05);
}

.consistency-upload-panel .upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.consistency-upload-panel .upload-label:hover {
  color: var(--text-main);
}

.consistency-upload-panel .upload-label .material-symbols-outlined {
  font-size: 32px;
  color: #a855f7;
}

.consistency-upload-panel .upload-hint {
  font-size: 12px;
  opacity: 0.6;
}

.consistency-upload-panel .image-preview-container {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.consistency-upload-panel .image-preview-container img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  object-fit: contain;
}

.consistency-upload-panel .clear-image-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(239, 68, 68, 0.9);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.consistency-upload-panel .clear-image-btn:hover {
  background: rgba(239, 68, 68, 1);
  transform: scale(1.1);
}

.consistency-upload-panel .clear-image-btn .material-symbols-outlined {
  font-size: 18px;
  color: white;
}

.consistency-upload-panel .extract-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #a855f7 0%, #22d3ee 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.consistency-upload-panel .extract-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
}

.consistency-upload-panel .extract-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.consistency-upload-panel .extract-btn .material-symbols-outlined {
  font-size: 18px;
}

.consistency-upload-panel .extraction-result {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.consistency-upload-panel .extraction-success {
  color: var(--text-main);
}

.consistency-upload-panel .extraction-success h4 {
  margin: 0 0 8px 0;
  color: #22c55e;
}

.consistency-upload-panel .extraction-success pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: 4px;
  font-size: 11px;
  overflow-x: auto;
  max-height: 120px;
  color: var(--text-muted);
}

.consistency-upload-panel .extraction-success .tip {
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 6px;
  font-size: 13px;
  color: #a855f7;
}

.consistency-upload-panel .extraction-error {
  color: #ef4444;
  font-size: 13px;
}

.consistency-upload-panel .upload-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(34, 211, 238, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: var(--text-muted);
}

.consistency-upload-panel .upload-footer .material-symbols-outlined {
  font-size: 16px;
  color: #22d3ee;
}

/* Mode Selection Tabs */
.consistency-mode-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.consistency-mode-tabs .mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.consistency-mode-tabs .mode-tab:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.consistency-mode-tabs .mode-tab.active {
  color: var(--text-main);
  background: rgba(168, 85, 247, 0.1);
}

.consistency-mode-tabs .mode-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(135deg, #a855f7 0%, #22d3ee 100%);
}

.consistency-mode-tabs .mode-tab .material-symbols-outlined {
  font-size: 18px;
}

.consistency-mode-tabs .mode-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.consistency-mode-tabs .mode-badge.free {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.consistency-mode-tabs .mode-badge.premium {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(34, 211, 238, 0.2) 100%);
  color: #a855f7;
}

/* Text Mode Info Box */
.text-mode-info {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: rgba(34, 211, 238, 0.05);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 10px;
}

.text-mode-info .material-symbols-outlined {
  font-size: 24px;
  color: #22d3ee;
  flex-shrink: 0;
}

.text-mode-info strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-main);
}

.text-mode-info p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.text-mode-tip,
.image-mode-tip {
  padding: 10px 14px;
  background: rgba(168, 85, 247, 0.08);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================================
   🎬 CONSISTENCY MODE: Initial Choice Modal
   ============================================================================ */

.consistency-choice-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.choice-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.choice-modal-container {
  position: relative;
  background: linear-gradient(135deg, rgba(9, 9, 11, 0.98) 0%, rgba(24, 24, 27, 0.95) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 24px;
  padding: 32px;
  max-width: 520px;
  width: 90%;
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.1),
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 100px rgba(168, 85, 247, 0.15);
  animation: modalSlideUp 0.3s ease;
}

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

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.choice-modal-header {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

.modal-back-btn {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-back-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  color: white;
  border-color: rgba(168, 85, 247, 0.4);
}

.choice-modal-header .material-symbols-outlined:not(.modal-back-btn *) {
  font-size: 40px;
  background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.choice-modal-header h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

.choice-modal-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Choice Cards */
.choice-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.choice-card:hover {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateX(4px);
}

.choice-card:hover .choice-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.choice-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(34, 211, 238, 0.1) 100%);
  border-radius: 14px;
  flex-shrink: 0;
}

.choice-card-icon .material-symbols-outlined {
  font-size: 28px;
  color: #a855f7;
}

.choice-card-content {
  flex: 1;
}

.choice-card-content h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.choice-card-content p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.choice-example {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(168, 85, 247, 0.7);
  font-style: italic;
}

.choice-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.choice-card-badge.free {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.choice-card-badge.premium {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(236, 72, 153, 0.2) 100%);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.choice-card-arrow {
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.2s ease;
  color: var(--text-muted);
}

.choice-card-arrow .material-symbols-outlined {
  font-size: 20px;
}

/* Skip Button */
.choice-modal-skip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.choice-modal-skip:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-main);
}

.choice-modal-skip .material-symbols-outlined {
  font-size: 18px;
}

/* Responsive */
@media (max-width: 600px) {
  .choice-modal-container {
    padding: 24px 20px;
    margin: 16px;
  }

  .choice-card {
    padding: 16px;
  }

  .choice-card-icon {
    width: 48px;
    height: 48px;
  }

  .choice-card-icon .material-symbols-outlined {
    font-size: 24px;
  }
}

/* ============================================
   CONSISTENCY COMPACT CHIP BAR
   ============================================ */
.consistency-chip-bar {
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  animation: chipSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chipSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chip-bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip-group {
  display: flex;
  gap: 3px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 2px;
}

.mode-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mode-chip .material-symbols-outlined {
  font-size: 14px;
}

.mode-chip:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.mode-chip.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(217, 70, 239, 0.12));
  color: #c084fc;
}

.chip-divider {
  color: rgba(255, 255, 255, 0.15);
  font-size: 16px;
  line-height: 1;
  user-select: none;
}

.chip-pro {
  font-size: 7px;
  font-weight: 700;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: white;
  padding: 1px 4px;
  border-radius: 3px;
}

.chip-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.chip-close .material-symbols-outlined {
  font-size: 16px;
}

.chip-close:hover {
  color: var(--text-main);
}

/* Muse inline preview (thumbnail after upload) */
.muse-inline-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 4px;
  animation: chipSlideIn 0.2s ease;
}

.muse-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.muse-file-name {
  font-size: 11px;
  color: var(--text-muted);
  flex: 1;
}

.muse-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 2px;
  display: flex;
  transition: color 0.2s;
}

.muse-remove-btn .material-symbols-outlined {
  font-size: 14px;
}

.muse-remove-btn:hover {
  color: #ef4444;
}

/* Muse upload icon (inside input row) */
.muse-upload-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.muse-upload-icon .material-symbols-outlined {
  font-size: 20px;
}

.muse-upload-icon:hover {
  color: #a855f7;
  background: rgba(168, 85, 247, 0.1);
}

.muse-upload-icon.has-image {
  color: #22c55e;
}

/* Responsive */
@media (max-width: 600px) {
  .chip-bar-row {
    gap: 4px;
  }

  .mode-chip {
    padding: 3px 7px;
    font-size: 10px;
  }
}

/* Settings Modal Mobile Optimization */
@media (max-width: 768px) {
  .settings-modal.premium-layout {
    grid-template-columns: 1fr;
    height: 90vh;
    max-height: 90vh;
    border-radius: 20px;
  }

  .settings-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px;
  }

  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .settings-tab {
    white-space: nowrap;
    padding: 8px 12px;
  }

  .settings-content-area {
    padding: 24px 16px;
  }

  .profile-details-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FOCUSED CONSISTENCY PANELS
   ============================================ */
.consistency-focused-panel {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px 28px 0 0;
  /* Match bar top curvature */
  margin-bottom: 0;
  overflow: hidden;
  animation: slideDownFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

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

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.panel-header-focused {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  font-size: 24px;
  color: var(--neon-purple);
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.4));
}

.header-text {
  display: flex;
  flex-direction: column;
}

.panel-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: white;
  letter-spacing: 0.3px;
}

.panel-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.close-panel-btn-mini {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.close-panel-btn-mini:hover {
  color: white;
  transform: rotate(90deg);
}

.focused-content-area {
  padding: 16px 20px;
}

.info-card-glass {
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.1);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.info-card-glass .material-symbols-outlined {
  color: var(--neon-purple);
  font-size: 20px;
}

.info-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.scenario-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.example-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s;
}

.example-tag:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  color: var(--neon-purple);
}

/* Muse Specific */
.muse-workflow-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.name-input-wrapper-focused {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0 16px;
}

.name-input-wrapper-focused input {
  background: transparent;
  border: none;
  color: white;
  padding: 14px 0;
  font-size: 14px;
  width: 100%;
}

.upload-zone-focused {
  border: 2px dashed rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  background: rgba(168, 85, 247, 0.03);
  cursor: pointer;
  transition: all 0.3s;
}

.upload-zone-focused:hover {
  border-color: var(--neon-purple);
  background: rgba(168, 85, 247, 0.06);
}

.upload-label-focused {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.upload-icon-pulse {
  width: 48px;
  height: 48px;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-icon-pulse .material-symbols-outlined {
  color: var(--neon-purple);
  font-size: 24px;
}

.upload-details {
  font-size: 11px;
  color: var(--text-muted);
}

.image-preview-focused {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 220px;
  width: fit-content;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.2);
}

.preview-frame {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-frame img {
  max-height: 220px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.remove-btn-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(220, 38, 38, 0.8);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.btn-action-primary {
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
}

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

.extraction-result-focused {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 16px;
  font-size: 13px;
  color: var(--text-muted);

  /* --- AI RESPONSE FORMATTING --- */
  .formatted-text {
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--text-main);
  }

  .code-block-json,
  .code-block-xml,
  pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    overflow-x: auto;
    position: relative;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13.5px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  .code-block-json::before {
    content: 'JSON';
    position: absolute;
    top: 0;
    right: 12px;
    font-size: 10px;
    color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 0 0 4px 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  .code-block-xml::before {
    content: 'XML PROMPT';
    position: absolute;
    top: 0;
    right: 12px;
    font-size: 10px;
    color: var(--neon-purple);
    background: rgba(168, 85, 247, 0.1);
    padding: 2px 6px;
    border-radius: 0 0 4px 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--neon-purple);
  }

  /* Success feedback animation for buttons */
  .success-feedback {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #4ade80 !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    transform: scale(0.98);
  }

  /* Ensure material icons scale with text */
  .material-symbols-outlined {
    vertical-align: middle;
  }

  /* End of styles.css */
}

/* ============================================================ 
   DEFINITIVE SETTINGS UI FIX (Transparency & Spacing Force) 
   ============================================================ */

.modal-overlay {
  background: rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  display: flex !important;
}

.settings-modal.premium-layout {
  background: rgba(15, 15, 20, 0.6) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.settings-content-area {
  padding: 16px 40px 40px 40px !important;
}

.settings-sidebar-header h2 {
  margin-top: 0 !important;
  margin-bottom: 20px !important;
}

.page-title {
  margin-top: 0 !important;
  margin-bottom: 4px !important;
}

.page-subtitle {
  margin-bottom: 16px !important;
}

.section-label:first-of-type {
  margin-top: 0 !important;
}

.settings-scroll-container {
  margin-top: 0 !important;
}