/* ═══════════════════════════════════════════════
   RUG MUNCH INTELLIGENCE — Design System
   Hand-crafted. Not another generic dark theme.
   ═══════════════════════════════════════════════ */

:root {
    --bg: #05050a;
    --bg-secondary: #0d0d16;
    --bg-tertiary: #121220;
    --card: #161628;
    --card-hover: #1e1e35;
    --border: #2a2a45;
    --border-hover: #4a4a6a;
    --purple: #7c3aed;
    --purple-dark: #48285f;
    --cyan: #28cbf4;
    --cyan-glow: #0ea5e9;
    --gold: #d1a340;
    --gold-light: #f4c95a;
    --success: #00e676;
    --danger: #ff3366;
    --orange: #ff8c42;
    --white: #f0f0f8;
    --gray: #8a7dab;
    --muted: #6a6a8a;
    --accent: #7c3aed;
    --accent2: #06b6d4;
    --text: #e2e8f8;
    --text-dim: #94a3b8;
    --gray-dark: #3a3a55;
    --code-bg: #0a0a15;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-sans); line-height: 1.6; overflow-x: hidden; }
a { color: var(--cyan); text-decoration: none; transition: all 0.2s; }
a:hover { color: var(--gold); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Navbar ── */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 0; background: rgba(5,5,10,0.9); backdrop-filter: blur(24px); border-bottom: 1px solid rgba(72,40,95,0.15); transition: all 0.3s; }
.navbar.scrolled { background: rgba(5,5,10,0.95); box-shadow: 0 4px 30px rgba(0,0,0,0.5); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 56px; }
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.navbar-logo { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; }
.navbar-logo img { width: 100%; height: 100%; object-fit: contain; }
.navbar-title { font-size: 13px; font-weight: 800; color: var(--white); letter-spacing: 0.5px; }
.navbar-subtitle { font-size: 7px; color: var(--cyan); letter-spacing: 2px; text-transform: uppercase; margin-top: -2px; }
.navbar-links { display: flex; gap: 2px; align-items: center; }
.navbar-links a { color: var(--muted); font-size: 11px; padding: 6px 10px; border-radius: 6px; transition: all 0.2s; font-weight: 500; white-space: nowrap; }
.navbar-links a:hover, .navbar-links a.active { color: var(--cyan); background: rgba(40,203,244,0.08); }
.navbar-links a.active { font-weight: 700; }
.navbar-actions { display: flex; gap: 6px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 6px; font-size: 11px; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--bg); }
.btn-primary:hover { box-shadow: 0 0 16px rgba(209,163,64,0.3); transform: translateY(-1px); }
.btn-secondary { background: rgba(40,203,244,0.1); color: var(--cyan); border: 1px solid rgba(40,203,244,0.2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--white); }
.btn-danger { background: rgba(255,51,102,0.15); color: var(--danger); border: 1px solid rgba(255,51,102,0.3); }

/* ── Hero ── */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 56px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 25% 30%, rgba(72,28,95,0.35) 0%, transparent 55%), radial-gradient(ellipse at 75% 15%, rgba(40,203,244,0.15) 0%, transparent 50%), radial-gradient(ellipse at 50% 85%, rgba(209,163,64,0.08) 0%, transparent 45%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 20px; background: rgba(22,22,40,0.6); backdrop-filter: blur(12px); border: 1px solid var(--border); font-size: 11px; color: var(--gray); margin-bottom: 20px; }
.hero h1 { font-size: clamp(38px, 5.5vw, 68px); font-weight: 900; line-height: 1.05; margin-bottom: 18px; letter-spacing: -1px; }
.hero .subtitle { font-size: 17px; color: var(--text-dim); max-width: 480px; margin-bottom: 28px; line-height: 1.7; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 28px; }
.hero-stat { background: rgba(22,22,40,0.5); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 10px; padding: 14px; text-align: center; }
.hero-stat .num { font-size: 22px; font-weight: 800; }
.hero-stat .label { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-bot { background: rgba(22,22,40,0.5); backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: 16px; height: 480px; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.hero-bot::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(124,58,237,0.06) 0%, rgba(6,182,212,0.06) 100%); pointer-events: none; }
.bot-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: rgba(22,22,40,0.8); position: relative; z-index: 1; }
.bot-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; }
.bot-avatar img { width: 100%; height: 100%; object-fit: contain; }
.bot-info .bot-name { font-weight: 700; font-size: 13px; }
.bot-info .bot-status { font-size: 10px; color: var(--success); }
.bot-messages { flex: 1; overflow-y: auto; padding: 14px; position: relative; z-index: 1; }
.bot-msg { margin-bottom: 12px; display: flex; gap: 8px; }
.bot-msg .msg-avatar { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; overflow: hidden; }
.bot-msg .msg-avatar img { width: 100%; height: 100%; }
.bot-msg.ai .msg-avatar { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.bot-msg.user .msg-avatar { background: var(--gray-dark); }
.bot-msg .msg-bubble { background: rgba(72,40,95,0.2); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--text); max-width: 85%; line-height: 1.5; }
.bot-msg.user { flex-direction: row-reverse; }
.bot-msg.user .msg-bubble { background: rgba(40,203,244,0.15); }
.bot-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: rgba(10,10,20,0.8); position: relative; z-index: 1; }
.bot-input input { flex: 1; background: rgba(22,22,40,0.8); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--text); font-size: 12px; outline: none; }
.bot-input input:focus { border-color: var(--cyan); }
.bot-input button { background: var(--cyan); border: none; border-radius: 8px; padding: 10px 16px; color: var(--bg); font-weight: 700; font-size: 12px; cursor: pointer; }

/* ── Page Headers ── */
.page-header { padding: 100px 0 50px; text-align: center; position: relative; overflow: hidden; }
.page-header::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(72,28,95,0.35) 0%, transparent 65%); }
.page-header h1 { font-size: clamp(32px, 4.5vw, 52px); font-weight: 900; margin-bottom: 14px; position: relative; letter-spacing: -0.5px; }
.page-header p { color: var(--text-dim); max-width: 600px; margin: 0 auto; font-size: 16px; position: relative; }

/* ── Section Headers ── */
.section-header { text-align: center; margin-bottom: 44px; }
.section-header.left { text-align: left; }
.section-badge { display: inline-block; padding: 4px 12px; border-radius: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 12px; }
.section-badge.gold { background: rgba(209,163,64,0.12); color: var(--gold); border: 1px solid rgba(209,163,64,0.2); }
.section-badge.cyan { background: rgba(40,203,244,0.12); color: var(--cyan); border: 1px solid rgba(40,203,244,0.2); }
.section-badge.purple { background: rgba(124,58,237,0.12); color: var(--accent); border: 1px solid rgba(124,58,237,0.2); }
.section-badge.green { background: rgba(0,230,118,0.12); color: var(--success); border: 1px solid rgba(0,230,118,0.2); }
.section-badge.red { background: rgba(255,51,102,0.12); color: var(--danger); border: 1px solid rgba(255,51,102,0.2); }
.section-header h2 { font-size: clamp(26px, 3.5vw, 38px); font-weight: 800; margin-bottom: 10px; letter-spacing: -0.5px; }
.section-header p { color: var(--text-dim); max-width: 560px; margin: 0 auto; font-size: 15px; }

/* ── Sections ── */
.section { padding: 70px 0; }
.section-alt { background: var(--bg-secondary); }
.section-dark { background: var(--bg-tertiary); }

/* ── Cards ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 22px; transition: all 0.3s; }
.card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.card p { color: var(--text-dim); font-size: 13px; line-height: 1.6; }
.card.glow-cyan { border-color: rgba(40,203,244,0.3); box-shadow: 0 0 20px rgba(40,203,244,0.1); }
.card.glow-purple { border-color: rgba(124,58,237,0.3); box-shadow: 0 0 20px rgba(124,58,237,0.1); }
.card.glow-gold { border-color: rgba(209,163,64,0.3); box-shadow: 0 0 20px rgba(209,163,64,0.1); }

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

/* ── Tool Cards ── */
.tool-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 22px; transition: all 0.3s; }
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-card h3 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 16px; }
.tool-card .price { background: var(--accent); color: white; padding: 2px 10px; border-radius: 10px; font-size: 10px; font-weight: 700; }
.tool-card .category { display: inline-block; background: rgba(6,182,212,0.1); color: var(--accent2); padding: 2px 8px; border-radius: 4px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.tool-card p { color: var(--text-dim); font-size: 13px; margin-bottom: 10px; line-height: 1.5; }
.tool-card .endpoint { background: rgba(124,58,237,0.08); padding: 5px 10px; border-radius: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--accent); }

/* ── Framework Cards ── */
.framework-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px; transition: all 0.3s; }
.framework-card:hover { border-color: var(--border-hover); }
.framework-card h4 { color: var(--cyan); margin-bottom: 6px; font-size: 15px; }
.framework-card p { color: var(--text-dim); font-size: 12px; margin-bottom: 8px; }
.framework-card code { display: block; background: rgba(0,0,0,0.3); padding: 7px 10px; border-radius: 6px; font-size: 10px; font-family: var(--font-mono); word-break: break-all; color: var(--gold); }

/* ── Feed Cards ── */
.feed-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 14px; transition: all 0.2s; position: relative; overflow: hidden; }
.feed-card:hover { border-color: var(--border-hover); }
.feed-card::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; }
.feed-card.critical::before { background: var(--danger); }
.feed-card.alpha::before { background: var(--cyan); }
.feed-card.news::before { background: var(--success); }
.feed-card.whale::before { background: var(--gold); }
.feed-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.feed-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.feed-avatar img { width: 100%; height: 100%; object-fit: contain; }
.feed-info .feed-name { font-weight: 700; font-size: 13px; }
.feed-info .feed-time { font-size: 11px; color: var(--muted); }
.feed-body { font-size: 13px; color: var(--text); margin-bottom: 10px; line-height: 1.6; }
.feed-stats { display: flex; gap: 20px; color: var(--muted); font-size: 12px; }
.feed-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-right: 6px; }
.feed-tag.critical { background: rgba(255,51,102,0.15); color: var(--danger); }
.feed-tag.high { background: rgba(255,140,66,0.15); color: var(--orange); }
.feed-tag.medium { background: rgba(209,163,64,0.15); color: var(--gold); }
.feed-tag.alpha { background: rgba(40,203,244,0.15); color: var(--cyan); }
.feed-tag.news { background: rgba(0,230,118,0.15); color: var(--success); }
.feed-tag.whale { background: rgba(209,163,64,0.15); color: var(--gold); }

/* ── Intelligence Dashboard ── */
.intel-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.intel-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.intel-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-align: center; }
.intel-card .intel-value { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.intel-card .intel-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.intel-card .intel-change { font-size: 11px; font-weight: 600; margin-top: 4px; }
.intel-change.up { color: var(--success); }
.intel-change.down { color: var(--danger); }

/* ── Breadcrumb ── */
.breadcrumb { padding: 14px 0; border-bottom: 1px solid var(--border); margin-bottom: 36px; }
.breadcrumb a { color: var(--muted); font-size: 12px; }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb span { color: var(--gray-dark); font-size: 12px; margin: 0 6px; }
.breadcrumb .current { color: var(--text); font-size: 12px; font-weight: 600; }

/* ── Live Ticker ── */
.ticker { background: var(--bg-secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; overflow: hidden; }
.ticker-content { display: flex; animation: ticker 30s linear infinite; white-space: nowrap; }
.ticker-item { display: inline-flex; align-items: center; gap: 6px; padding: 0 24px; font-size: 11px; color: var(--muted); }
.ticker-item .up { color: var(--success); }
.ticker-item .down { color: var(--danger); }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── Markets Page ── */
.market-table { width: 100%; border-collapse: collapse; }
.market-table th { text-align: left; padding: 10px 14px; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); border-bottom: 1px solid var(--border); }
.market-table td { padding: 12px 14px; font-size: 13px; border-bottom: 1px solid rgba(42,42,69,0.5); }
.market-table tr:hover td { background: rgba(22,22,40,0.5); }
.market-table .token-name { font-weight: 600; }
.market-table .token-symbol { color: var(--muted); font-size: 11px; }
.market-table .price { font-family: var(--font-mono); }
.market-table .change-up { color: var(--success); }
.market-table .change-down { color: var(--danger); }
.market-table .risk-bar { width: 60px; height: 6px; border-radius: 3px; background: rgba(42,42,69,0.8); overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 8px; }
.market-table .risk-bar-fill { height: 100%; border-radius: 3px; }

/* ── Bulletin Board ── */
.bulletin { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.bulletin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.bulletin h3 { font-size: 18px; font-weight: 700; }
.bulletin-tabs { display: flex; gap: 8px; }
.bulletin-tab { padding: 6px 14px; border-radius: 6px; font-size: 11px; font-weight: 600; background: transparent; border: 1px solid var(--border); color: var(--muted); cursor: pointer; }
.bulletin-tab.active { background: rgba(40,203,244,0.1); border-color: var(--cyan); color: var(--cyan); }
.bulletin-post { padding: 14px 0; border-bottom: 1px solid rgba(42,42,69,0.3); }
.bulletin-post:last-child { border-bottom: none; }
.bulletin-post .post-meta { display: flex; gap: 12px; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.bulletin-post .post-author { color: var(--cyan); font-weight: 600; }
.bulletin-post .post-time { color: var(--muted); }
.bulletin-post .post-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.bulletin-post .post-body { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.bulletin-post .post-stats { display: flex; gap: 16px; font-size: 11px; color: var(--muted); margin-top: 8px; }
.bulletin-post .post-stats span { display: flex; align-items: center; gap: 4px; }

/* ── Risk Meter ── */
.risk-meter { display: flex; align-items: center; gap: 12px; }
.risk-meter .score { font-size: 24px; font-weight: 900; }
.risk-meter .bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(42,42,69,0.8); overflow: hidden; }
.risk-meter .bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.risk-meter .verdict { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* ── Code Blocks ── */
.code-block { background: var(--code-bg); border: 1px solid var(--border); border-radius: 10px; padding: 18px; overflow-x: auto; font-family: var(--font-mono); font-size: 12px; line-height: 1.7; margin: 14px 0; color: #c9d1d9; white-space: pre-wrap; }
.code-tabs { margin-bottom: 20px; }
.code-tab { display: inline-flex; padding: 7px 16px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; background: transparent; border: 1px solid var(--border); color: var(--muted); margin-right: 4px; margin-bottom: 4px; }
.code-tab.active { background: rgba(40,203,244,0.1); border-color: var(--cyan); color: var(--cyan); }
.code-panel { display: none; }
.code-panel.active { display: block; }

/* ── Content Sections ── */
.content-section { margin-bottom: 44px; }
.content-section h3 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.content-section p { color: var(--text-dim); margin-bottom: 12px; line-height: 1.7; }
.content-section ul { color: var(--text-dim); margin-left: 20px; margin-bottom: 12px; }
.content-section li { margin-bottom: 6px; font-size: 14px; }

/* ── Footer ── */
footer { padding: 40px 0 30px; border-top: 1px solid var(--border); text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; }
.footer-brand .flogo { width: 28px; height: 28px; border-radius: 6px; overflow: hidden; }
.footer-brand .flogo img { width: 100%; height: 100%; object-fit: contain; }
.footer-brand .fname { font-weight: 800; font-size: 13px; color: var(--white); }
.footer-brand .fsub { font-size: 7px; color: var(--cyan); letter-spacing: 2px; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 12px; }
.footer-links a:hover { color: var(--cyan); }
.footer-copy { font-size: 10px; color: var(--gray-dark); }

/* ── Animations ── */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 5px rgba(40,203,244,0.3); } 50% { box-shadow: 0 0 20px rgba(40,203,244,0.6); } }
.pulse { animation: pulse 2s infinite; }
.glow-effect { animation: glow 2s infinite; }

/* ── Mini Chart Bars ── */
.mini-chart { display: flex; align-items: flex-end; gap: 2px; height: 20px; }
.mini-chart .bar { width: 3px; border-radius: 1px; }

/* ── Badge ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-safe { background: rgba(0,230,118,0.15); color: var(--success); }
.badge-risk { background: rgba(209,163,64,0.15); color: var(--gold); }
.badge-danger { background: rgba(255,51,102,0.15); color: var(--danger); }
.badge-new { background: rgba(40,203,244,0.15); color: var(--cyan); }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .intel-grid { grid-template-columns: repeat(2, 1fr); }
    .intel-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-5 { grid-template-columns: repeat(2, 1fr); }
    .navbar-links { display: none; }
}
@media (max-width: 640px) {
    .intel-grid, .intel-grid-4 { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: 1fr; }
}
