/* ============================================================================
   SEEYLO AI — Production-grade dark theme
   ============================================================================ */
:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --success: #00ff88;
  --danger: #ff4757;
  --warning: #ffa502;
  --purple: #8b5cf6;
  --bg: #0a0e1a;
  --bg-2: #0f1119;
  --surface: rgba(26, 32, 53, 0.95);
  --surface-2: rgba(20, 25, 41, 0.95);
  --border: rgba(59, 130, 246, 0.2);
  --border-strong: rgba(59, 130, 246, 0.4);
  --text: #e5e7eb;
  --text-dim: #9ca3af;
  --text-faint: #6b7280;
  --radius-card: 16px;
  --radius-btn: 12px;
  --radius-input: 8px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-success: linear-gradient(135deg, #00ff88 0%, #00d973 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0a0e1a 0%, #0f1119 100%);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ----- Layout ----- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.row { display: flex; flex-wrap: wrap; gap: 24px; }
.col { flex: 1; min-width: 0; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-purple { color: var(--purple); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.hidden { display: none !important; }
.relative { position: relative; }

/* ----- Typography ----- */
h1, h2, h3, h4, h5 { margin: 0 0 16px; font-weight: 700; line-height: 1.2; }
h1 { font-size: 48px; letter-spacing: -1px; }
h2 { font-size: 36px; letter-spacing: -0.5px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
.small { font-size: 12px; color: var(--text-dim); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border: none; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: all 0.2s ease; white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--gradient); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4); }
.btn-secondary { background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--primary); }
.btn-success { background: var(--gradient-success); color: #001b10; }
.btn-success:hover { transform: translateY(-2px); }
.btn-danger { background: rgba(255, 71, 87, 0.15); color: var(--danger); border: 1px solid rgba(255, 71, 87, 0.3); }
.btn-danger:hover { background: rgba(255, 71, 87, 0.25); }
.btn-ghost { background: transparent; color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ----- Cards ----- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.card-hover:hover { border-color: var(--border-strong); transform: translateY(-2px); transition: all 0.2s ease; }
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.stat-card { padding: 20px; }
.stat-label { color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.stat-value { font-size: 32px; font-weight: 800; }
.stat-value.success { color: var(--success); }
.stat-value.primary { color: var(--primary); }
.stat-trend { font-size: 12px; margin-top: 4px; }

/* ----- Forms ----- */
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-dim); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px;
  background: rgba(15, 17, 25, 0.7); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-input); color: var(--text);
  font-size: 14px; transition: border-color 0.2s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.textarea { min-height: 100px; resize: vertical; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox input { accent-color: var(--primary); width: 16px; height: 16px; }

/* ----- Header ----- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 14, 26, 0.85); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); }
.logo-mark {
  width: 36px; height: 36px;
  background: var(--gradient);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: white; font-size: 18px;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-dim); font-weight: 500; font-size: 14px; }
.nav-links a:hover { color: var(--text); }

/* ----- Hero ----- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.2) 0%, transparent 50%);
  z-index: -1;
}
.hero h1 {
  font-size: 64px; line-height: 1.1; margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .subtitle { font-size: 20px; color: var(--text-dim); max-width: 720px; margin: 0 auto 40px; }
.hero-badges { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 13px; font-weight: 600; color: var(--primary);
}
.badge-success { background: rgba(0, 255, 136, 0.1); border-color: rgba(0, 255, 136, 0.3); color: var(--success); }
.badge-warning { background: rgba(255, 165, 2, 0.1); border-color: rgba(255, 165, 2, 0.3); color: var(--warning); }
.badge-purple { background: rgba(139, 92, 246, 0.1); border-color: rgba(139, 92, 246, 0.3); color: var(--purple); }

/* ----- Sections ----- */
.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { font-size: 40px; margin-bottom: 12px; }
.section-title p { color: var(--text-dim); font-size: 18px; max-width: 600px; margin: 0 auto; }

/* ----- Features grid ----- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { padding: 28px; }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(59, 130, 246, 0.15); display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 16px;
}
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: 14px; line-height: 1.6; margin: 0; }

/* ----- Pricing ----- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; padding: 32px; }
.price-card.featured { border-color: var(--primary); position: relative; transform: scale(1.04); }
.price-card.featured::before {
  content: 'POPULAR'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gradient); color: white; padding: 4px 16px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
}
.price-card .plan-name { font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 12px; }
.price-card .price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 16px; }
.price-card .amount { font-size: 48px; font-weight: 800; }
.price-card .period { color: var(--text-dim); font-size: 16px; }
.price-card .features { list-style: none; padding: 0; margin: 16px 0 24px; flex: 1; }
.price-card .features li { padding: 8px 0; color: var(--text-dim); font-size: 14px; display: flex; align-items: start; gap: 8px; }
.price-card .features li::before { content: '✓'; color: var(--success); font-weight: 700; }
.price-card.ultimate { border-color: var(--purple); }
.price-toggle { display: inline-flex; background: rgba(255,255,255,0.05); border-radius: 24px; padding: 4px; margin: 0 auto 32px; }
.price-toggle button { background: transparent; border: none; color: var(--text-dim); padding: 8px 18px; border-radius: 20px; cursor: pointer; font-weight: 600; font-size: 13px; }
.price-toggle button.active { background: var(--gradient); color: white; }

/* ----- Dashboard layout ----- */
.dashboard {
  display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; gap: 0;
}
.sidebar {
  background: var(--surface-2); border-right: 1px solid var(--border);
  padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 24px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  color: var(--text-dim); font-weight: 500; font-size: 14px; cursor: pointer;
  border: none; background: transparent; width: 100%; text-align: left;
}
.sidebar-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.sidebar-link.active { background: rgba(59, 130, 246, 0.15); color: var(--primary); }
.sidebar-link .icon { width: 20px; text-align: center; }
.sidebar-section { margin-top: 24px; padding: 0 14px; }
.sidebar-section-title { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }

.main-area { padding: 32px; max-width: 100%; overflow-x: hidden; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; gap: 16px; flex-wrap: wrap; }
.topbar h2 { margin: 0; }
.topbar-actions { display: flex; gap: 12px; align-items: center; }

/* ----- Tabs ----- */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

/* ----- Notifications bell ----- */
.bell {
  position: relative; width: 40px; height: 40px;
  border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text);
}
.bell:hover { background: rgba(255,255,255,0.08); }
.bell-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: white; min-width: 18px; height: 18px;
  border-radius: 9px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.notif-panel {
  position: absolute; top: 50px; right: 0; width: 360px; max-height: 480px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  display: none; z-index: 200;
}
.notif-panel.show { display: block; }
.notif-panel-header { padding: 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.notif-list { max-height: 400px; overflow-y: auto; }
.notif-item { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer; }
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.unread { background: rgba(59,130,246,0.06); }
.notif-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.notif-body { font-size: 13px; color: var(--text-dim); margin-bottom: 4px; }
.notif-time { font-size: 11px; color: var(--text-faint); }

/* ----- User avatar ----- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 14px; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 80px; height: 80px; font-size: 28px; }
.avatar-xl { width: 120px; height: 120px; font-size: 42px; }
.avatar-online { position: relative; }
.avatar-online::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 12px; height: 12px; background: var(--success);
  border: 2px solid var(--bg); border-radius: 50%;
}

/* ----- Plan badges ----- */
.plan-pill { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.plan-free { background: rgba(255,255,255,0.08); color: var(--text-dim); }
.plan-pro { background: rgba(59,130,246,0.15); color: var(--primary); }
.plan-ultimate { background: rgba(139,92,246,0.15); color: var(--purple); }

/* ----- Tier badges ----- */
.tier-pill { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.tier-starter { background: rgba(150,150,150,0.15); color: #b8b8b8; }
.tier-bronze { background: rgba(176, 116, 73, 0.15); color: #cd7f32; }
.tier-silver { background: rgba(192,192,192,0.15); color: #c0c0c0; }
.tier-gold { background: rgba(255, 215, 0, 0.15); color: #ffd700; }
.tier-platinum { background: rgba(229, 228, 226, 0.15); color: #e5e4e2; }
.tier-diamond { background: rgba(185, 242, 255, 0.15); color: #b9f2ff; }

/* ----- Tables ----- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 16px; text-align: left; }
.table th { color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); font-weight: 600; }
.table td { border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 14px; }
.table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* ----- Modal ----- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal-backdrop.show { display: flex; animation: fadeIn 0.2s; }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 32px; max-width: 520px; width: 92%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); animation: scaleIn 0.2s;
}
.modal h3 { margin-top: 0; }
.modal-close { position: absolute; top: 16px; right: 16px; background: transparent; border: none; color: var(--text-dim); cursor: pointer; font-size: 22px; }

/* ----- Toast ----- */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; min-width: 240px; box-shadow: var(--shadow);
  animation: slideIn 0.3s; display: flex; align-items: center; gap: 12px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

/* ----- Spinner ----- */
.spinner {
  width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite; display: inline-block;
}
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- Animations ----- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* ----- Analyzer ----- */
.upload-zone {
  border: 2px dashed rgba(59,130,246,0.3); border-radius: var(--radius-card);
  padding: 48px 24px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: rgba(59,130,246,0.03);
}
.upload-zone:hover { border-color: var(--primary); background: rgba(59,130,246,0.06); }
.upload-zone.drag-over { border-color: var(--primary); background: rgba(59,130,246,0.12); }
.upload-zone .upload-icon { font-size: 56px; margin-bottom: 12px; opacity: 0.7; }
.upload-zone .upload-text { font-size: 16px; margin-bottom: 4px; }
.upload-zone .upload-hint { font-size: 13px; color: var(--text-dim); }
.upload-preview { max-height: 280px; border-radius: 12px; margin: 16px 0; }

.analysis-result { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.result-card { background: rgba(15,17,25,0.5); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 18px; }
.result-card .label { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.result-card .value { font-size: 20px; font-weight: 700; }
.bias-buy { color: var(--success); }
.bias-sell { color: var(--danger); }
.bias-wait { color: var(--warning); }

.confidence-bar {
  height: 8px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; margin-top: 8px;
}
.confidence-fill { height: 100%; background: var(--gradient-success); transition: width 0.6s ease; }

/* ----- Chat ----- */
.chat-layout { display: grid; grid-template-columns: 280px 1fr; gap: 0; height: calc(100vh - 180px); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.chat-list { border-right: 1px solid var(--border); overflow-y: auto; background: var(--surface-2); }
.chat-item { padding: 14px 16px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.03); display: flex; gap: 12px; align-items: center; }
.chat-item:hover { background: rgba(255,255,255,0.03); }
.chat-item.active { background: rgba(59,130,246,0.1); }
.chat-item-info { flex: 1; min-width: 0; }
.chat-item-name { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; }
.chat-item-preview { color: var(--text-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-unread-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; }

.chat-thread { display: flex; flex-direction: column; background: var(--surface); }
.chat-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.message { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: 14px; word-wrap: break-word; }
.message.sent { align-self: flex-end; background: var(--gradient); color: white; border-bottom-right-radius: 4px; }
.message.received { align-self: flex-start; background: rgba(255,255,255,0.06); border-bottom-left-radius: 4px; }
.message-time { font-size: 10px; opacity: 0.6; margin-top: 2px; }
.message-seen { font-size: 10px; opacity: 0.7; margin-left: 4px; }
.chat-input { padding: 14px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-input input { flex: 1; }
.typing-indicator { padding: 6px 18px; color: var(--text-dim); font-size: 12px; font-style: italic; }

/* ----- Friends ----- */
.friend-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); }
.friend-card .info { flex: 1; min-width: 0; }
.friend-card .name { font-weight: 600; }
.friend-card .meta { font-size: 12px; color: var(--text-dim); }

/* ----- Affiliate ----- */
.affiliate-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.referral-link-box { background: rgba(15,17,25,0.7); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; gap: 8px; align-items: center; }
.referral-link-box input { background: transparent; border: none; color: var(--text); flex: 1; font-family: monospace; }
.tier-progress { background: rgba(255,255,255,0.06); height: 12px; border-radius: 6px; overflow: hidden; margin: 12px 0; }
.tier-progress-fill { height: 100%; background: var(--gradient); transition: width 0.6s; }

.leaderboard-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.leaderboard-rank { font-size: 18px; font-weight: 800; min-width: 36px; text-align: center; }
.leaderboard-rank.gold { color: #ffd700; }
.leaderboard-rank.silver { color: #c0c0c0; }
.leaderboard-rank.bronze { color: #cd7f32; }

/* ----- Profile ----- */
.profile-header { display: flex; gap: 24px; align-items: center; padding: 28px; background: var(--gradient); border-radius: var(--radius-card); margin-bottom: 24px; }
.profile-info h2 { margin: 0 0 4px; color: white; }
.profile-info .meta { color: rgba(255,255,255,0.85); }
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 12px; }
.badge-icon { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; font-size: 32px; border: 2px solid var(--border); }
.badge-icon.earned { background: var(--gradient); border-color: transparent; }
.badge-icon.locked { opacity: 0.3; filter: grayscale(1); }

/* ----- Admin ----- */
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.admin-table-actions { display: flex; gap: 6px; }
.admin-table-actions button { padding: 4px 10px; font-size: 12px; border-radius: 6px; }

/* ----- Footer ----- */
.footer { padding: 48px 0 24px; border-top: 1px solid var(--border); margin-top: 80px; color: var(--text-dim); font-size: 13px; text-align: center; }
.footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }

/* ----- Loader overlay ----- */
.loader-overlay { position: fixed; inset: 0; background: rgba(10,14,26,0.85); display: none; align-items: center; justify-content: center; flex-direction: column; gap: 16px; z-index: 5000; backdrop-filter: blur(6px); }
.loader-overlay.show { display: flex; }
.loader-overlay .text { color: var(--text-dim); font-size: 14px; }

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
  .affiliate-stats { grid-template-columns: 1fr 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .analysis-result { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .hero h1 { font-size: 40px; }
  .hero { padding: 48px 0 32px; }
  .section { padding: 48px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { position: fixed; transform: translateX(-100%); transition: transform 0.3s; z-index: 200; width: 240px; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .menu-toggle { display: inline-flex !important; }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-list { display: none; }
  .chat-list.show { display: block; }
  .nav-links { display: none; }
  .affiliate-stats, .admin-stats { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .main-area { padding: 20px 16px; }
  .container { padding: 0 16px; }
}
.menu-toggle { display: none; }

/* ----- Misc utilities ----- */
.copy-btn { background: rgba(59,130,246,0.1); color: var(--primary); border: 1px solid rgba(59,130,246,0.2); padding: 6px 12px; border-radius: 8px; font-size: 12px; cursor: pointer; }
.copy-btn:hover { background: rgba(59,130,246,0.18); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.code-pill { font-family: monospace; background: rgba(15,17,25,0.7); padding: 4px 8px; border-radius: 6px; font-size: 12px; border: 1px solid rgba(255,255,255,0.08); }
.empty-state { text-align: center; padding: 48px 16px; color: var(--text-dim); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.tag { display: inline-block; padding: 2px 8px; background: rgba(255,255,255,0.06); border-radius: 6px; font-size: 11px; margin-right: 4px; color: var(--text-dim); }
