/* ═══════════════════════════════════════════════════════
   THE SMART BOSS AI — Global Stylesheet
   Aesthetic: Luxury Dark Gold — Power, Prestige, Precision
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=DM+Sans:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* ── CSS VARIABLES ─────────────────────────────────── */
:root {
  --gold-primary:   #C9A84C;
  --gold-bright:    #F0C94A;
  --gold-dim:       #8A6E2F;
  --gold-glow:      rgba(201,168,76,0.18);
  --gold-border:    rgba(201,168,76,0.30);
  --bg-void:        #060608;
  --bg-deep:        #0A0A0E;
  --bg-panel:       #0F0F15;
  --bg-card:        #141420;
  --bg-hover:       #1A1A28;
  --text-primary:   #F0EDE6;
  --text-secondary: #A09C94;
  --text-muted:     #5C5855;
  --text-gold:      #C9A84C;
  --accent-green:   #2ECC71;
  --accent-blue:    #3498DB;
  --accent-red:     #E74C3C;
  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      32px;
  --shadow-gold:    0 0 30px rgba(201,168,76,0.12), 0 4px 20px rgba(0,0,0,0.6);
  --shadow-deep:    0 8px 40px rgba(0,0,0,0.8);
  --transition:     all 0.25s cubic-bezier(0.4,0,0.2,1);
  --font-display:   'Cormorant Garamond', serif;
  --font-body:      'DM Sans', sans-serif;
  --font-mono:      'Space Mono', monospace;
}

/* ── RESET & BASE ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* ── NOISE TEXTURE OVERLAY ─────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ── SCROLLBAR ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-primary); }

/* ── SELECTION ─────────────────────────────────────── */
::selection { background: var(--gold-glow); color: var(--gold-bright); }

/* ── TYPOGRAPHY ────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }

p { color: var(--text-secondary); line-height: 1.75; }

a { color: var(--gold-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-bright); }

/* ── NAVIGATION ────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6,6,8,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gold-border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-bright));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 15px rgba(201,168,76,0.4);
}

.nav-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.nav-name span {
  display: block;
  font-size: 0.65rem;
  font-family: var(--font-body);
  color: var(--gold-primary);
  letter-spacing: 0.15em;
  font-weight: 400;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-primary);
  background: var(--gold-glow);
}

.nav-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--gold-border);
  color: var(--gold-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
}

/* ── HERO SECTION ──────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 2rem 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,168,76,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(201,168,76,0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(52,152,219,0.03) 0%, transparent 50%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid var(--gold-border);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-primary);
  background: var(--gold-glow);
  margin-bottom: 2rem;
  animation: fadeDown 0.8s ease both;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  animation: pulse 2s infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.0;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s 0.1s ease both;
}

.hero-title .line1 {
  display: block;
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 0.3rem;
}

.hero-title .line2 {
  display: block;
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, #F0C94A 0%, #C9A84C 40%, #8A6E2F 70%, #C9A84C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.hero-title .line3 {
  display: block;
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  animation: fadeUp 0.8s 0.2s ease both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.3s ease both;
}

/* ── BUTTONS ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.btn:hover::after { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-bright));
  color: #0A0A0E;
  box-shadow: 0 4px 20px rgba(201,168,76,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.5);
  color: #0A0A0E;
}

.btn-outline {
  background: transparent;
  color: var(--gold-primary);
  border: 1px solid var(--gold-border);
}

.btn-outline:hover {
  background: var(--gold-glow);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  color: var(--gold-bright);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.06);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.82rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
  justify-content: center;
}

/* ── FEATURES GRID ─────────────────────────────────── */
.section {
  padding: 100px 2rem;
  position: relative;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  background: var(--bg-hover);
  border-color: var(--gold-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.feature-arrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: var(--transition);
}

.feature-card:hover .feature-arrow {
  color: var(--gold-primary);
  gap: 10px;
}

/* ── CHAT PAGE ─────────────────────────────────────── */
.chat-layout {
  display: flex;
  height: 100vh;
  padding-top: 70px;
}

.chat-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--gold-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1rem;
  overflow-y: auto;
}

.chat-sidebar-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-mode-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}

.sidebar-mode-btn:hover {
  background: var(--bg-hover);
  border-color: var(--gold-border);
}

.sidebar-mode-btn.active {
  background: var(--gold-glow);
  border-color: var(--gold-primary);
}

.sidebar-mode-icon { font-size: 1.1rem; }

.sidebar-mode-info { flex: 1; min-width: 0; }

.sidebar-mode-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-mode-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-mode-btn.active .sidebar-mode-name { color: var(--gold-primary); }

.chat-history-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
}

.history-item:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-color: rgba(255,255,255,0.05);
}

/* ── CHAT MAIN ─────────────────────────────────────── */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-header {
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.chat-header-icon-btn {
  min-width: 40px;
  justify-content: center;
  padding-inline: 0;
}

.chat-header-info h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-header-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

.chat-owner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 0.45rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(201,168,76,0.2);
  background: rgba(201,168,76,0.08);
  color: var(--gold-primary) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.message {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: fadeUp 0.3s ease;
}

.message.user { margin-left: auto; flex-direction: row-reverse; }

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.message.ai .message-avatar {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-bright));
}

.message.user .message-avatar {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
}

.message-bubble {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.7;
  position: relative;
}

.message.ai .message-bubble {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-primary);
  border-radius: 4px var(--radius-lg) var(--radius-lg) var(--radius-lg);
}

.message.user .message-bubble {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold-primary));
  color: #0A0A0E;
  border-radius: var(--radius-lg) 4px var(--radius-lg) var(--radius-lg);
  font-weight: 500;
}

/* Markdown in AI messages */
.message.ai .message-bubble h1,
.message.ai .message-bubble h2,
.message.ai .message-bubble h3 {
  font-family: var(--font-display);
  color: var(--gold-primary);
  margin: 1rem 0 0.5rem;
  font-size: 1.05rem;
}

.message.ai .message-bubble p { color: var(--text-primary); margin-bottom: 0.75rem; }

.message.ai .message-bubble ul,
.message.ai .message-bubble ol {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.message.ai .message-bubble li { margin-bottom: 0.3rem; }

.message.ai .message-bubble strong { color: var(--gold-bright); }

.message.ai .message-bubble code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--gold-border);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--gold-primary);
}

.message.ai .message-bubble pre {
  background: var(--bg-deep);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  overflow-x: auto;
  margin: 0.75rem 0;
}

.message.ai .message-bubble pre code {
  background: none;
  border: none;
  padding: 0;
}

.message.ai .message-bubble hr {
  border: none;
  border-top: 1px solid rgba(201,168,76,0.15);
  margin: 1rem 0;
}

/* Typing cursor */
.typing-cursor::after {
  content: '▊';
  color: var(--gold-primary);
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* Welcome state */
.chat-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  gap: 2rem;
}

.chat-welcome-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-bright));
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 0 40px rgba(201,168,76,0.3);
}

.chat-welcome h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-primary);
}

.chat-welcome p {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 450px;
}

.chat-suggestions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-width: 600px;
  width: 100%;
}

.suggestion-chip {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.suggestion-chip:hover {
  background: var(--gold-glow);
  border-color: var(--gold-border);
  color: var(--gold-primary);
}

/* ── CHAT INPUT ────────────────────────────────────── */
.chat-input-area {
  padding: 1.25rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.ai-model-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 38px;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.ai-model-label {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--gold-primary);
}

.ai-model-select {
  flex: 0 0 170px;
  min-width: 150px;
  max-width: 220px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.84rem;
  padding: 0 0.75rem;
  outline: none;
}

.ai-model-select:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}

.ai-model-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  transition: var(--transition);
}

.chat-input-wrapper:focus-within {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}

.chat-textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  resize: none;
  max-height: 160px;
  min-height: 24px;
}

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

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-bright));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  color: #0A0A0E;
  font-size: 1rem;
}

.chat-send-btn:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(201,168,76,0.4); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.chat-action-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  color: var(--gold-primary);
  font-size: 1rem;
}

.chat-action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--gold-border);
}

.chat-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chat-action-btn.is-listening {
  background: rgba(201,168,76,0.16);
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}

.chat-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding: 0 4px;
}

.chat-input-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

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

/* ── STATS BAR ─────────────────────────────────────── */
.stats-bar {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 2rem;
  background: var(--bg-panel);
  border-top: 1px solid var(--gold-border);
  border-bottom: 1px solid var(--gold-border);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── HOW IT WORKS ──────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  position: relative;
}

.step-item {
  text-align: center;
  padding: 1.5rem;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  background: var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-primary);
  margin: 0 auto 1rem;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

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

/* ── FOOTER ────────────────────────────────────────── */
.footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--gold-border);
  padding: 3rem 2rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.footer-brand {
  max-width: 280px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 0.5rem;
}

.footer-brand-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.footer-links {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-col-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.footer-col a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-col a:hover { color: var(--gold-primary); }

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

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

.footer-copy span { color: var(--gold-dim); }

/* ── LOADING SPINNER ───────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(201,168,76,0.2);
  border-top-color: var(--gold-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── TOAST ─────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-deep);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.success { border-color: rgba(46,204,113,0.4); }
.toast.error { border-color: rgba(231,76,60,0.4); }

/* ── ANIMATIONS ────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

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

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

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.shimmer-text {
  background: linear-gradient(90deg, var(--gold-dim) 0%, var(--gold-bright) 50%, var(--gold-dim) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ── PAGE HEADER (sub-pages) ───────────────────────── */
.page-header {
  padding: 100px 2rem 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(201,168,76,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.page-header-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

/* ── IDEA CARDS ────────────────────────────────────── */
.idea-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.idea-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
}

.idea-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

.idea-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.idea-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
  color: var(--gold-primary);
  white-space: nowrap;
}

/* ── PROMPT FORM ───────────────────────────────────── */
.prompt-form {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}

.form-select option { background: var(--bg-panel); }
.form-textarea { resize: vertical; min-height: 100px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── RESULT BOX ────────────────────────────────────── */
.result-box {
  background: var(--bg-deep);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 1.5rem;
  position: relative;
}

.result-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.result-box-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-primary);
  font-family: var(--font-mono);
}

.result-content {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.tool-assistant-card {
  margin: 0 0 1.5rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(201,168,76,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
}

.tool-assistant-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-primary);
  font-family: var(--font-mono);
  margin-bottom: 0.55rem;
}

.tool-assistant-question {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.tool-assistant-status {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
}

.tool-assistant-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.is-editing-output {
  outline: 2px dashed rgba(201,168,76,0.45);
  outline-offset: 6px;
}

.upload-plus-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-plus-box {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.75rem;
  min-height: 210px;
  padding: 1.5rem;
  border: 1px dashed var(--gold-border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top, rgba(201,168,76,0.14), transparent 46%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  cursor: pointer;
  transition: var(--transition);
}

.upload-plus-box:hover,
.upload-plus-box.is-active {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

.upload-plus-icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--gold-primary);
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.24);
}

.upload-plus-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--text-primary);
}

.upload-plus-desc {
  max-width: 420px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ── RESUME PAPER ─────────────────────────────────── */
.resume-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.resume-paper-shell {
  margin-top: 1.5rem;
  padding: 1.2rem;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top, rgba(201,168,76,0.12), transparent 48%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.06);
}

.resume-paper {
  max-width: 850px;
  margin: 0 auto;
  min-height: 1100px;
  padding: 3rem 3rem 2.6rem;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  background: #fffdf8;
  color: #211d17;
}

.resume-paper-white {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,244,238,0.98)),
    #fffdf8;
  color: #201c17;
}

.resume-paper-brown {
  background:
    linear-gradient(180deg, rgba(245,231,203,0.98), rgba(232,214,180,0.98)),
    #efe0bf;
  color: #2d2318;
}

.resume-paper-placeholder {
  min-height: 420px;
  border: 2px dashed rgba(103,85,46,0.25);
  border-radius: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  color: rgba(44,34,22,0.72);
  font-family: var(--font-body);
  background: rgba(255,255,255,0.35);
}

.resume-paper-header {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
  gap: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid rgba(60,45,27,0.18);
  margin-bottom: 1.35rem;
}

.resume-paper-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.25rem;
}

.resume-paper-role {
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(48,35,21,0.7);
}

.resume-paper-contact {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  justify-items: end;
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: right;
}

.resume-paper-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.resume-paper-contact-label {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: rgba(53,40,24,0.62);
}

.resume-paper-section {
  margin-top: 1.2rem;
}

.resume-paper-section-title {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(53,40,24,0.66);
  margin-bottom: 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(65,50,29,0.16);
}

.resume-paper-summary {
  font-size: 0.95rem;
  line-height: 1.72;
}

.resume-paper-skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1rem;
  list-style: none;
}

.resume-paper-skills li,
.resume-paper-bullets li {
  position: relative;
  padding-left: 1rem;
  line-height: 1.55;
}

.resume-paper-skills li::before,
.resume-paper-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(83,62,34,0.76);
  font-weight: 700;
}

.resume-paper-entry {
  margin-bottom: 1rem;
}

.resume-paper-entry-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.resume-paper-entry-title {
  font-weight: 800;
  font-size: 1rem;
}

.resume-paper-entry-meta {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(54,42,28,0.65);
  text-align: right;
}

.resume-paper-entry-body {
  font-size: 0.9rem;
  line-height: 1.6;
}

.resume-paper-bullets {
  list-style: none;
  display: grid;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.resume-paper-education {
  display: grid;
  gap: 0.45rem;
}

.resume-paper-education-item {
  font-size: 0.9rem;
  line-height: 1.55;
}

.resume-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.resume-insight-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.2rem;
}

.resume-insight-card h4 {
  font-family: var(--font-display);
  color: var(--gold-primary);
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
}

.resume-insight-card p,
.resume-insight-card li {
  font-size: 0.88rem;
}

.document-paper-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(65,50,29,0.16);
  margin-bottom: 1.1rem;
}

.document-paper-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.05;
}

.document-paper-subtitle {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(54,42,28,0.64);
  font-weight: 700;
}

.document-paper-body {
  font-size: 0.95rem;
  line-height: 1.75;
  white-space: pre-wrap;
}

.document-paper-body p + p {
  margin-top: 0.9rem;
}

.document-paper-body ul {
  list-style: none;
  display: grid;
  gap: 0.35rem;
  margin: 0.6rem 0;
}

.document-paper-body li {
  position: relative;
  padding-left: 1rem;
}

.document-paper-body li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(83,62,34,0.76);
  font-weight: 700;
}

@media print {
  body {
    background: #ffffff !important;
    color: #111111 !important;
  }

  body::before,
  .nav,
  .page-header,
  .footer,
  .print-hidden,
  #resume-insights,
  #resume-raw-box {
    display: none !important;
  }

  body * {
    visibility: hidden !important;
  }

  #resume-result,
  #document-result,
  #cv-result,
  #resume-result *,
  #document-result *,
  #cv-result * {
    visibility: visible !important;
  }

  #resume-result,
  #document-result,
  #cv-result {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
  }

  #resume-paper-shell,
  #document-paper-shell,
  #cv-paper-shell {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
  }

  #resume-paper,
  #document-paper,
  #cv-paper {
    width: 100% !important;
    max-width: none !important;
    min-height: auto !important;
    padding: 0.45in !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }
}

/* ── MOBILE ────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0; right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--gold-border);
    padding: 1rem;
    z-index: 999;
  }

  .chat-sidebar { display: none; }
  .chat-sidebar.open {
    display: flex;
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    z-index: 800;
    width: 280px;
  }

  .chat-suggestions { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .stats-bar { gap: 1rem; }
  .footer-top { flex-direction: column; }
  .footer-links { gap: 1.5rem; }
  .resume-paper {
    padding: 1.8rem 1.3rem 1.7rem;
    min-height: auto;
  }

  .resume-paper-header {
    grid-template-columns: 1fr;
  }

  .resume-paper-contact {
    justify-items: start;
    text-align: left;
  }

  .resume-paper-entry-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .resume-paper-entry-meta {
    text-align: left;
  }

  .resume-insights-grid,
  .resume-paper-skills {
    grid-template-columns: 1fr;
  }

  .document-paper-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .chat-header {
    padding: 0.85rem 1rem;
    align-items: flex-start;
  }

  .chat-header-info {
    min-width: 0;
    flex: 1;
  }

  .chat-header-info h2 {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .chat-header-info p {
    font-size: 0.7rem;
    line-height: 1.35;
    max-width: 220px;
  }

  .chat-owner-badge {
    max-width: 220px;
    font-size: 0.6rem !important;
    padding: 3px 8px;
  }

  .chat-header-actions .btn-sm {
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  .chat-header-actions .chat-header-icon-btn {
    min-width: 34px;
    height: 34px;
  }

  .chat-action-btn,
  .chat-send-btn {
    width: 36px;
    height: 36px;
  }

  .ai-model-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 0.45rem;
  }

  .ai-model-select {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }

  .ai-model-note {
    white-space: normal;
    line-height: 1.35;
  }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .section { padding: 60px 1rem; }

  .chat-header {
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
  }

  .chat-header-info p {
    display: none;
  }

  .chat-owner-badge {
    display: none;
  }

  .chat-header-clear {
    display: none;
  }

  .chat-header-actions {
    gap: 6px;
  }

  .chat-main {
    min-width: 0;
  }

  .chat-messages {
    padding: 1.1rem 0.85rem;
  }

  .chat-input-area {
    padding: 0.9rem 0.85rem;
  }
}
