/* ═══════════════════════════════════════════════════
   CHAPPIE AI — Premium Dark Design System
   ═══════════════════════════════════════════════════ */

:root {
  --brand: #00F0FF;
  --brand-light: #5EEAD4;
  --brand-dark: #0284C7;
  --brand-glow: rgba(0, 240, 255, 0.25);
  --brand-gradient: linear-gradient(135deg, #00F0FF, #0284C7);
  --bg: #0B1121;
  --bg-2: #111827;
  --bg-3: #1F2937;
  --surface: #1E293B;
  --surface-2: #334155;
  --surface-3: #475569;
  --border: #334155;
  --border-light: #475569;
  --text: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --radius: 12px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  --sidebar-w: 280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

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

a { color: var(--brand); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--brand-light); }
button { font-family: var(--font-body); cursor: pointer; border: none; }
button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ─── Loading Screen ─── */
.loading-screen {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity 0.5s;
}
.loading-screen.fade-out { opacity: 0; pointer-events: none; }
.loader-logo { font-family: var(--font-display); font-size: 2.5rem; color: var(--brand); animation: pulse-glow 2s infinite; }
@keyframes pulse-glow { 0%,100%{text-shadow:0 0 10px var(--brand-glow)} 50%{text-shadow:0 0 30px var(--brand-glow)} }

/* ─── Landing Page ─── */
.landing { min-height: 100vh; background: var(--bg); }
.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px;
  background: rgba(11, 17, 33, 0.75); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--text); }
.logo span { color: var(--brand); text-shadow: 0 0 10px var(--brand-glow); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }
.nav-links a.btn { color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; transition: all 0.3s;
}
.btn-primary {
  background: var(--brand-gradient);
  color: #fff; box-shadow: 0 4px 16px var(--brand-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0, 240, 255, 0.4); }
.btn-outline {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--surface-2); border-color: var(--brand); color: #fff; }
.btn-sm { padding: 6px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }

/* Hero */
.hero {
  padding: 160px 40px 100px; text-align: center;
  position: relative; overflow: hidden; background: var(--bg);
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 30%, rgba(0, 240, 255, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 70% 60%, rgba(2, 132, 199, 0.1) 0%, transparent 40%);
  animation: mesh-drift 20s ease-in-out infinite; pointer-events: none;
}
@keyframes mesh-drift { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-2%,2%)} }
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; animation: fade-in-up 0.8s ease-out; }
@keyframes fade-in-up { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.hero h1 { font-family: var(--font-display); font-size: clamp(2.5rem,6vw,4rem); font-weight: 800; line-height: 1.1; margin-bottom: 24px; color: var(--text); letter-spacing: -0.02em; }
.hero h1 .accent { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero p { font-size: 1.2rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 40px; line-height: 1.6; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-family: var(--font-display); font-size: clamp(1.8rem,4vw,2.5rem); font-weight: 800; margin-bottom: 16px; color: var(--text); }
.section-title p { color: var(--text-secondary); font-size: 1.1rem; max-width: 500px; margin: 0 auto; }

/* Features */
.features { padding: 100px 40px; background: var(--bg-2); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; max-width: 1100px; margin: 0 auto; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px 32px;
  transition: all 0.3s; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
.feature-card:hover { border-color: var(--brand-dark); transform: translateY(-6px); box-shadow: 0 10px 40px rgba(0,240,255,0.1); }
.feature-icon { width: 56px; height: 56px; border-radius: 16px; background: rgba(0,240,255,0.1); color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; box-shadow: 0 0 20px rgba(0,240,255,0.1); }
.feature-card h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }

/* Pricing */
.pricing { padding: 100px 40px; background: var(--bg); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; max-width: 1100px; margin: 0 auto; align-items: start; }
.price-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.3s;
}
.price-card.popular { border-color: var(--brand); box-shadow: 0 0 30px rgba(0,240,255,0.15); transform: scale(1.02); }
.price-card.popular::before {
  content: 'MOST POPULAR'; position: absolute; top: 28px; right: -36px;
  background: var(--brand-gradient); width: 160px; text-align: center;
  color: #111827; font-size: 0.65rem; font-weight: 800; letter-spacing: 1px;
  padding: 6px 0; transform: rotate(45deg); box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.price-card h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.price-amount { font-family: var(--font-display); font-size: 3rem; font-weight: 800; margin: 24px 0 8px; color: var(--text); }
.price-amount small { font-size: 1rem; color: var(--text-muted); font-weight: 500; }
.price-features { list-style: none; margin: 32px 0; border-top: 1px solid var(--border); padding-top: 24px; }
.price-features li { padding: 12px 0; font-size: 0.95rem; color: var(--text-secondary); display: flex; align-items: center; gap: 12px; }
.price-features li svg { color: var(--brand); width: 20px; height: 20px; flex-shrink: 0; }
.price-features li.disabled { opacity: 0.5; }
.price-features li.disabled svg { color: var(--text-muted); }

/* ─── Chat Layout ─── */
.chat-layout { display: flex; height: 100vh; background: var(--bg); overflow: hidden; }

.sidebar {
  width: var(--sidebar-w); background: var(--bg-2);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  transition: transform 0.3s; z-index: 10;
}
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); }
.new-chat-btn {
  width: 100%; padding: 14px; border-radius: var(--radius);
  background: var(--brand-gradient); border: none;
  color: #fff; font-weight: 600; font-size: 0.95rem;
  display: flex; align-items: center; gap: 8px; justify-content: center;
  transition: all 0.2s; box-shadow: 0 4px 15px rgba(0,240,255,0.2);
}
.new-chat-btn:hover { box-shadow: 0 6px 20px rgba(0,240,255,0.3); transform: translateY(-1px); }

.conv-list { flex: 1; overflow-y: auto; padding: 12px; }
.conv-group-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 16px 12px 8px; font-weight: 600; }
.conv-item {
  padding: 12px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 10px;
  font-size: 0.9rem; color: var(--text-secondary); transition: all 0.2s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.conv-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-muted); }
.conv-item:hover { background: var(--surface); color: var(--text); }
.conv-item.active { background: rgba(0,240,255,0.1); color: var(--brand); font-weight: 600; }
.conv-item.active svg { color: var(--brand); }
.conv-item.pinned { border-left: 2px solid var(--brand); }
.conv-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.conv-pin-indicator { display: flex; align-items: center; color: var(--brand); flex-shrink: 0; opacity: 0.7; }
.conv-actions { display: none; flex-shrink: 0; gap: 4px; margin-left: auto; }
.conv-item:hover .conv-actions { display: flex; }
.conv-action-btn { background: none; border: none; padding: 4px; border-radius: 6px; cursor: pointer; color: var(--text-muted); transition: all 0.2s; display: flex; align-items: center; }
.conv-action-btn:hover { background: var(--surface-2); color: var(--text); }
.conv-delete-btn:hover { color: #ef4444; }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); background: var(--bg-2); }
.sidebar-footer .usage-bar { height: 6px; background: var(--surface-2); border-radius: 3px; margin: 10px 0; overflow: hidden; }
.sidebar-footer .usage-fill { height: 100%; background: var(--brand-gradient); border-radius: 3px; transition: width 0.3s; box-shadow: 0 0 10px var(--brand-glow); }
.sidebar-footer .usage-text { font-size: 0.8rem; color: var(--text-muted); }
.sidebar-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-secondary); font-size: 0.9rem; transition: 0.2s; font-weight: 500; margin-bottom: 4px; }
.sidebar-link svg { width: 20px; height: 20px; }
.sidebar-link:hover { background: var(--surface); color: var(--text); }

/* Chat Main */
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); position: relative; }
.chat-header {
  padding: 16px 32px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(11, 17, 33, 0.8); backdrop-filter: blur(12px);
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
}
.chat-header-left { display: flex; align-items: center; gap: 16px; }
.chat-header h2 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--text); }

.model-select {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 8px 16px; border-radius: 10px;
  font-size: 0.85rem; font-family: var(--font-body); font-weight: 500;
  appearance: auto; cursor: pointer; transition: 0.2s;
}
.model-select:hover { border-color: var(--brand-light); }
.model-select option { background: var(--surface); color: var(--text); }

.messages { flex: 1; overflow-y: auto; padding: 90px 40px 24px; display: flex; flex-direction: column; gap: 24px; scroll-behavior: smooth; }

.message { max-width: 800px; width: 100%; align-self: center; display: flex; flex-direction: column; gap: 8px; animation: msg-in 0.3s ease-out; }
@keyframes msg-in { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
.message-user { align-items: flex-end; }
.message-assistant { align-items: flex-start; }

.msg-bubble-user {
  background: var(--surface-2);
  color: var(--text); padding: 16px 24px; border-radius: 20px 20px 4px 20px;
  font-size: 0.95rem; line-height: 1.6;
}
.msg-bubble-assistant {
  background: transparent;
  padding: 0; border-radius: 0;
  font-size: 0.95rem; line-height: 1.7; color: var(--text);
}
.msg-bubble-assistant p { margin-bottom: 16px; }
.msg-bubble-assistant pre { background: var(--bg-2); border: 1px solid var(--border); color: #E2E8F0; border-radius: 12px; padding: 20px; overflow-x: auto; margin: 16px 0; box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); }
.msg-bubble-assistant code { font-family: var(--font-code); font-size: 0.85rem; }
.msg-bubble-assistant p code { background: var(--surface); color: var(--brand-light); padding: 2px 6px; border-radius: 6px; font-size: 0.85em; border: 1px solid var(--border); }
.msg-bubble-assistant h1,.msg-bubble-assistant h2,.msg-bubble-assistant h3 { margin: 24px 0 12px; font-family: var(--font-display); color: var(--text); }
.msg-bubble-assistant ul,.msg-bubble-assistant ol { padding-left: 24px; margin: 16px 0; }
.msg-bubble-assistant li { margin-bottom: 8px; }
.msg-bubble-assistant table { border-collapse: collapse; width: 100%; margin: 16px 0; border-radius: 8px; overflow: hidden; }
.msg-bubble-assistant th,.msg-bubble-assistant td { border: 1px solid var(--border); padding: 12px 16px; text-align: left; font-size: 0.9rem; }
.msg-bubble-assistant th { background: var(--surface); color: var(--text); font-weight: 600; }

.msg-actions { display: flex; gap: 8px; padding: 4px 0; opacity: 0; transition: opacity 0.2s; }
.message:hover .msg-actions { opacity: 1; }
.msg-action-btn { background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary); font-size: 0.8rem; padding: 6px 12px; border-radius: 8px; transition: 0.2s; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.msg-action-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--brand-light); }

/* Typing indicator */
.typing-indicator { display: flex; gap: 6px; padding: 16px 0; align-self: flex-start; }
.typing-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: bounce 1.2s infinite; opacity: 0.6; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px);opacity:1;} }

/* Input area */
.chat-input-area {
  padding: 0 40px 32px; background: transparent; position: relative; width: 100%;
}
.chat-input-area::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to top, var(--bg) 40%, transparent); pointer-events: none; z-index: -1;
}

/* Empty State */
.chat-main.empty-chat { justify-content: center; }
.chat-main.empty-chat .messages { display: none; }
.chat-main.empty-chat .chat-input-area { padding-bottom: 0; display: flex; flex-direction: column; align-items: center; }
.chat-main.empty-chat .chat-input-area::before { display: none; }
.chat-main.empty-chat .input-wrapper { width: 100%; max-width: 800px; }

.empty-greeting {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 600;
  text-align: center; margin-bottom: 40px;
  background: linear-gradient(90deg, #fff, #a5b4fc);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.suggestion-chips {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 24px; max-width: 800px; width: 100%;
}
.suggestion-chip {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-secondary); padding: 12px 20px; border-radius: 20px;
  font-size: 0.9rem; cursor: pointer; transition: 0.2s;
  display: flex; align-items: center; gap: 8px;
}
.suggestion-chip:hover {
  background: var(--surface-2); border-color: var(--brand-light); color: var(--text); transform: translateY(-2px);
}

/* Custom Model Selector */
.custom-model-select {
  position: relative; font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; user-select: none;
}
.selected-model {
  display: flex; align-items: center; gap: 6px; color: var(--text-secondary); padding: 6px 8px; border-radius: 8px; cursor: pointer; transition: 0.2s;
}
.selected-model:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.selected-model svg { width: 14px; height: 14px; }
.model-options {
  position: absolute; bottom: 100%; left: 0; margin-bottom: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 8px; display: none; flex-direction: column; gap: 4px; min-width: 120px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); z-index: 100;
}
.model-options.show { display: flex; }
.model-option {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: var(--text-secondary); transition: 0.2s;
}
.model-option:hover { background: var(--surface); color: var(--text); }
.model-option svg { width: 16px; height: 16px; }
.input-wrapper {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 8px 16px;
  transition: all 0.3s; box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  max-width: 800px; margin: 0 auto;
}
.input-wrapper:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.1); }
.chat-textarea {
  flex: 1; background: none; border: none; color: var(--text);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.5;
  resize: none; max-height: 200px; min-height: 24px; outline: none; padding: 6px 0;
}
.chat-textarea::placeholder { color: var(--text-muted); }
.send-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--text);
  color: var(--bg); display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0; font-size: 1rem;
}
.send-btn:hover { transform: scale(1.05); background: var(--brand-light); }
.send-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; background: var(--surface-3); }

.daily-usage-bar { padding: 8px 0; font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 12px; }
.daily-usage-bar .bar { flex: 1; height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; max-width: 300px; }
.daily-usage-bar .fill { height: 100%; background: var(--brand-gradient); border-radius: 2px; }

/* Welcome screen */
.welcome-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; }
.welcome-screen h1 { font-family: var(--font-display); font-size: 2.5rem; margin-bottom: 12px; color: var(--text); }
.welcome-screen h1 span { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.welcome-screen p { color: var(--text-secondary); margin-bottom: 40px; font-size: 1.1rem; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; max-width: 800px; width: 100%; }
.quick-action {
  background: var(--surface); border: 1px solid var(--border);
  padding: 20px; border-radius: var(--radius-lg); cursor: pointer;
  text-align: left; transition: 0.2s; color: var(--text); display: flex; flex-direction: column; gap: 12px;
}
.quick-action:hover { border-color: var(--brand-light); transform: translateY(-4px); background: var(--surface-2); }
.quick-action .qa-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(0,240,255,0.1); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.quick-action .qa-icon svg { width: 20px; height: 20px; }
.quick-action .qa-text { font-size: 0.95rem; font-weight: 500; color: var(--text); }

/* ─── Auth Pages ─── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: var(--bg); position: relative; }
.auth-page::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at top right, rgba(0,240,255,0.05), transparent 40%); pointer-events: none;
}
.auth-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 48px 40px;
  width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); position: relative; z-index: 1;
}
.auth-card h2 { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 8px; text-align: center; color: var(--text); font-weight: 700; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 32px; font-size: 0.95rem; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.form-input {
  width: 100%; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-family: var(--font-body); font-size: 0.95rem;
  transition: all 0.2s;
}
.form-input:focus { outline: none; border-color: var(--brand); background: var(--bg-2); box-shadow: 0 0 0 3px rgba(0,240,255,0.1); }
select.form-input { appearance: auto; cursor: pointer; }
select.form-input option { background: var(--surface); color: var(--text); }
.form-error { color: var(--error); font-size: 0.85rem; margin-top: 6px; }
.form-btn { width: 100%; margin-top: 12px; padding: 14px; }

.auth-footer { text-align: center; margin-top: 24px; font-size: 0.9rem; color: var(--text-muted); }
.auth-footer a { color: var(--brand); font-weight: 600; }

/* ─── Social Auth ─── */
.social-auth-buttons { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 12px; }
.btn-social {
  width: 100%; max-width: 320px; padding: 12px 24px;
  border-radius: var(--radius); font-weight: 600; font-size: 0.95rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  transition: all 0.2s; cursor: pointer; border: none;
}
.btn-github {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.btn-github:hover { background: var(--surface-2); border-color: var(--text); }

.auth-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 24px 0; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-divider span { white-space: nowrap; }

/* ─── Agents Page ─── */
.agents-page { padding: 120px 40px 80px; max-width: 1200px; margin: 0 auto; }
.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.agent-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; transition: 0.3s;
  cursor: pointer; position: relative; box-shadow: var(--shadow-sm);
}
.agent-card:hover { border-color: var(--brand-light); transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,240,255,0.1); background: var(--surface-2); }
.agent-card.premium { opacity: 0.7; }
.agent-card.premium::after { content: 'PRO'; position: absolute; top: 16px; right: 16px; font-size: 0.7rem; background: var(--warning); color: #000; padding: 4px 8px; border-radius: 6px; font-weight: 800; letter-spacing: 1px; }
.agent-icon { width: 56px; height: 56px; border-radius: 16px; background: rgba(0,240,255,0.1); color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 1.5rem; }
.agent-card h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.agent-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }
.agent-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; padding: 4px 10px; border-radius: 6px; background: var(--bg-2); color: var(--text-secondary); margin-top: 16px; border: 1px solid var(--border); }
.agent-badge svg { width: 14px; height: 14px; color: var(--brand); }

/* ─── Notification Toast ─── */
.toast {
  position: fixed; bottom: 32px; right: 32px; z-index: 10000;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 24px;
  color: var(--text); font-size: 0.95rem; box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease; max-width: 400px; display: flex; align-items: center; gap: 12px;
}
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.toast.error { border-color: rgba(239, 68, 68, 0.5); }
.toast.error::before { background: var(--error); }
.toast.success { border-color: rgba(16, 185, 129, 0.5); }
.toast.success::before { background: var(--success); }
@keyframes toast-in { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

/* ─── Mobile ─── */
.sidebar-toggle { display: none; background: none; border: none; color: var(--text); padding: 8px; cursor: pointer; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 49; }

@media (max-width: 768px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: block; }
  .sidebar-overlay.show { display: block; }
  .landing-nav { padding: 16px 20px; }
  .hero { padding: 140px 20px 80px; }
  .features,.pricing,.how-it-works,.use-cases { padding: 80px 20px; }
  .message { max-width: 95%; }
  .chat-input-area { padding: 0 16px 20px; }
  .empty-greeting { font-size: 1.6rem; margin-bottom: 24px; }
  .suggestion-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .suggestion-chip { font-size: 0.8rem; padding: 10px 12px; justify-content: center; text-align: center; }
  .input-model-select { font-size: 0.75rem; padding: 4px; }
  .nav-links { display: none; }
  .steps-grid { flex-direction: column; gap: 32px; }
  .step-connector { transform: rotate(90deg); margin: 0; height: 40px; }
  .stats-bar { flex-wrap: wrap; gap: 24px; }
  .stat-item { min-width: 40%; }
  .footer-inner { flex-direction: column; gap: 40px; }
  .footer-links { flex-direction: column; gap: 32px; }
  .use-cases-grid { grid-template-columns: 1fr; }
  .messages { padding: 80px 20px 24px; }
}

/* ─── Hero Extras ─── */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(0,240,255,0.1); color: var(--brand-light);
  font-size: 0.85rem; font-weight: 600; padding: 8px 20px; border-radius: 30px;
  margin-bottom: 24px; border: 1px solid rgba(0,240,255,0.2);
  letter-spacing: 0.5px; backdrop-filter: blur(10px);
}
.hero-trust {
  display: flex; gap: 32px; justify-content: center; margin-top: 40px;
  flex-wrap: wrap;
}
.hero-trust-item {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-secondary); font-size: 0.95rem; font-weight: 500;
}
.hero-trust-item svg { color: var(--success); width: 20px; height: 20px; }

/* ─── Stats Bar ─── */
.stats-bar {
  display: flex; justify-content: center; gap: 32px; padding: 48px 40px;
  background: var(--bg-2); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); position: relative;
}
.stats-bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0,240,255,0.03), transparent); pointer-events: none;
}
.stat-item { text-align: center; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); flex: 1; max-width: 260px; box-shadow: var(--shadow-sm); }
.stat-number { display: block; font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; color: var(--brand); margin-bottom: 4px; text-shadow: 0 0 20px rgba(0,240,255,0.2); }
.stat-label { display: block; font-size: 0.95rem; color: var(--text-muted); font-weight: 500; }

/* ─── How It Works ─── */
.how-it-works { padding: 100px 40px; background: var(--bg); position: relative; }
.steps-grid {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 0; max-width: 1100px; margin: 0 auto; position: relative;
}
.step-card {
  flex: 1; text-align: center; padding: 40px 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); position: relative;
  box-shadow: var(--shadow-sm); transition: all 0.3s; z-index: 2;
}
.step-card:hover { border-color: var(--brand-light); box-shadow: 0 10px 40px rgba(0,240,255,0.1); transform: translateY(-4px); }
.step-number {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--brand); color: var(--brand); font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 15px rgba(0,240,255,0.2);
}
.step-icon { width: 64px; height: 64px; border-radius: 20px; background: rgba(0,240,255,0.1); color: var(--brand); margin: 24px auto 20px; display: flex; justify-content: center; align-items: center; }
.step-icon svg { width: 32px; height: 32px; }
.step-card h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.step-card p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; }
.step-connector { flex-shrink: 0; width: 60px; height: 2px; background: linear-gradient(90deg, var(--brand), transparent); margin-top: 100px; z-index: 1; }

/* ─── Use Cases ─── */
.use-cases { padding: 100px 40px; background: var(--bg-2); }
.use-cases-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px; max-width: 1100px; margin: 0 auto;
}
.use-case-card {
  padding: 32px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); cursor: pointer; transition: 0.3s;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 16px;
}
.use-case-card:hover { border-color: var(--brand); transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,240,255,0.1); background: var(--surface-2); }
.uc-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(0,240,255,0.1); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.uc-icon svg { width: 24px; height: 24px; }
.use-case-card h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--text); }
.use-case-card p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; }

/* ─── Capabilities Section ─── */
.capabilities { padding: 100px 40px; background: var(--bg); position: relative; overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cap-container { display: flex; gap: 60px; max-width: 1200px; margin: 0 auto; align-items: center; }
.cap-text { flex: 1; }
.cap-text h2 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 24px; color: var(--text); line-height: 1.15; font-weight: 800; }
.cap-text p { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 30px; }
.cap-list { list-style: none; padding: 0; margin-bottom: 40px; }
.cap-list li { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; color: var(--text); font-size: 1.05rem; line-height: 1.5; }
.cap-list li svg { color: var(--brand); flex-shrink: 0; margin-top: 2px; }
.cap-visual { flex: 1; position: relative; perspective: 1200px; }
.mock-ui { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,0.6); transform: rotateY(-8deg) rotateX(4deg); transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.mock-ui:hover { transform: rotateY(0deg) rotateX(0deg); }
.mock-header { background: var(--bg-2); padding: 16px 20px; display: flex; gap: 8px; border-bottom: 1px solid var(--border); }
.mock-dot { width: 12px; height: 12px; border-radius: 50%; background: #ef4444; }
.mock-dot:nth-child(2) { background: #f59e0b; }
.mock-dot:nth-child(3) { background: #10b981; }
.mock-body { padding: 30px 24px; display: flex; flex-direction: column; gap: 20px; background-image: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.02) 0%, transparent 60%); }
.mock-msg { padding: 18px 24px; border-radius: 16px; font-size: 1rem; line-height: 1.6; max-width: 85%; position: relative; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.mock-msg.user { background: var(--bg); align-self: flex-end; border-bottom-right-radius: 4px; color: var(--text); border: 1px solid var(--border); }
.mock-msg.ai { background: var(--brand-gradient); align-self: flex-start; border-bottom-left-radius: 4px; color: #111827; font-weight: 500; }

/* ─── FAQs ─── */
.faqs { padding: 100px 40px; background: var(--surface); border-top: 1px solid var(--border); }
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question { width: 100%; text-align: left; background: none; border: none; padding: 28px 0; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: color 0.2s; }
.faq-question:hover { color: var(--brand-light); }
.faq-question svg { width: 24px; height: 24px; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); color: var(--text-muted); }
.faq-item.active .faq-question svg { transform: rotate(180deg); color: var(--brand); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.faq-answer-inner { padding-bottom: 28px; color: var(--text-secondary); font-size: 1.05rem; line-height: 1.7; }

@media (max-width: 900px) {
  .cap-container { flex-direction: column; }
  .mock-ui { transform: none; margin-top: 20px; }
}

/* ─── CTA Section ─── */
.cta-section {
  padding: 100px 40px; text-align: center; position: relative; overflow: hidden;
  background: var(--bg); border-top: 1px solid var(--border);
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(0,240,255,0.1), transparent 60%); pointer-events: none;
}
.cta-content { max-width: 700px; margin: 0 auto; position: relative; z-index: 1; }
.cta-content h2 { font-family: var(--font-display); font-size: clamp(2rem,4vw,3rem); font-weight: 800; margin-bottom: 24px; color: var(--text); }
.cta-content p { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 40px; line-height: 1.6; }

/* ─── Footer ─── */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 64px 40px 0; }
.footer-inner {
  display: flex; justify-content: space-between; gap: 64px;
  max-width: 1100px; margin: 0 auto; padding-bottom: 48px;
}
.footer-brand { max-width: 360px; }
.footer-brand p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin-top: 16px; }
.footer-links { display: flex; gap: 80px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.footer-col a { color: var(--text-secondary); font-size: 0.95rem; transition: 0.2s; font-weight: 500; }
.footer-col a:hover { color: var(--brand-light); }
.footer-bottom {
  text-align: center; padding: 24px 0; border-top: 1px solid var(--border);
  max-width: 1100px; margin: 0 auto;
}
.footer-bottom p { font-size: 0.9rem; color: var(--text-muted); }

/* Settings Layout */
.settings-container { display: flex; gap: 32px; max-width: 1000px; margin: 100px auto; padding: 0 20px; }
.settings-sidebar { width: 240px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.settings-tab { padding: 12px 16px; border-radius: 8px; color: var(--text-muted); cursor: pointer; transition: 0.2s; font-weight: 500; text-align: left; background: none; border: none; font-size: 1rem; }
.settings-tab:hover { color: var(--text); background: var(--surface); }
.settings-tab.active { color: var(--brand); background: rgba(0, 240, 255, 0.1); font-weight: 600; }
.settings-content { flex: 1; min-width: 0; }
.settings-section { display: none; animation: fadeIn 0.3s ease; }
.settings-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.settings-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.settings-card h3 { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; }
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.settings-upcoming-tag { font-size: 0.7rem; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; color: var(--brand-light); vertical-align: middle; margin-left: 8px; }

@media (max-width: 768px) {
  .settings-container { flex-direction: column; }
  .settings-sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding-bottom: 8px; }
  .settings-tab { white-space: nowrap; }
  .settings-row { grid-template-columns: 1fr; }
  /* Settings modal mobile */
  #settings-modal > div { width: 100% !important; max-width: 100% !important; max-height: 100vh !important; border-radius: 0 !important; }
  #settings-modal > div > div:last-child { flex-direction: column; }
  #settings-modal .settings-sidebar { width: 100% !important; flex-direction: row; overflow-x: auto; border-right: none !important; border-bottom: 1px solid var(--border); padding: 8px !important; }
  #settings-modal .settings-tab { white-space: nowrap; font-size: 0.85rem; padding: 8px 12px; }
}

/* ─── PromptForge Groups ─── */
.pf-group { margin-bottom: 28px; }
.pf-group-title {
  font-size: 0.85rem; font-weight: 700; color: var(--text-secondary);
  margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.pf-group-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
}
.graphic-design-panel {
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
}
.graphic-design-panel h4 { color: var(--text); font-size: 1rem; }

/* Animated rotating placeholder */
.gd-input-wrap { position: relative; }
.gd-input-wrap input { position: relative; z-index: 1; background: transparent; }
.gd-input-wrap input:not(:placeholder-shown) + .gd-placeholder-scroll,
.gd-input-wrap input:focus + .gd-placeholder-scroll { opacity: 0; }
.gd-placeholder-scroll {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; overflow: hidden; z-index: 0;
  display: flex; align-items: center; padding: 0 14px;
}
.gd-placeholder-track {
  display: flex; flex-direction: column; animation: gdScrollUp 8s ease-in-out infinite;
  color: var(--text-muted); font-size: 0.95rem; white-space: nowrap;
}
.gd-placeholder-track span {
  height: 42px; display: flex; align-items: center; opacity: 0.5;
}
@keyframes gdScrollUp {
  0%, 15% { transform: translateY(0); }
  20%, 35% { transform: translateY(-42px); }
  40%, 55% { transform: translateY(-84px); }
  60%, 75% { transform: translateY(-126px); }
  80%, 95% { transform: translateY(-168px); }
  100% { transform: translateY(0); }
}
.gd-type-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-gradient); color: #fff; font-size: 0.75rem;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 12px; font-weight: 600;
}

/* Skills search input */
.skills-search-input {
  width: 100%; max-width: 500px; margin: 0 auto 8px;
  padding: 14px 20px 14px 48px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); font-size: 1.05rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.skills-search-input:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}
.skills-search-input::placeholder { color: var(--text-muted); }

/* Responsive: 3-col skills cards stacks on tablet/mobile */
@media (max-width: 960px) {
  .futuristic-skills-section [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }
}
