:root {
  --bg: #0A0A0A;
  --bg2: #111;
  --bg3: #161616;
  --bg-hover: #1a1a1a;
  --accent: #00FF88;
  --accent-dim: #00cc6a;
  --text: #ccc;
  --text-m: #777;
  --white: #fff;
  --border: #1e1e1e;
  --red: #ff4444;
  --yellow: #ffaa00;
  --blue: #4488ff;
  --r: 10px;
  --r-sm: 6px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
ul { list-style: none; }
.accent { color: var(--accent); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-dark { background: var(--bg3); }
.section-title { font-size: 2.2rem; font-weight: 800; text-align: center; margin-bottom: 12px; color: var(--white); }
.section-sub { text-align: center; color: var(--text-m); margin-bottom: 40px; }

/* ===== NAVBAR ===== */
.navbar { position: fixed; top: 0; width: 100%; z-index: 100; background: rgba(10,10,10,.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); height: 56px; }
.nav-inner { display: flex; align-items: center; height: 56px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 6px; font-size: 1.15rem; font-weight: 800; color: var(--white); white-space: nowrap; flex-shrink: 0; }
.logo-bolt { margin-right: 2px; }
.nav-center { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link { color: var(--text-m); font-size: .875rem; font-weight: 500; padding: 6px 12px; border-radius: var(--r-sm); transition: color .15s, background .15s; }
.nav-link:hover { color: var(--white); background: rgba(255,255,255,.05); }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-right-guest { display: flex; align-items: center; gap: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font); font-weight: 600; border: none; cursor: pointer; border-radius: var(--r-sm); transition: all .15s; }
.btn-sm { padding: 6px 16px; font-size: .8rem; }
.btn-primary { background: var(--accent); color: var(--bg); padding: 8px 20px; font-size: .875rem; }
.btn-primary:hover { background: var(--accent-dim); }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid rgba(0,255,136,.3); padding: 8px 20px; font-size: .875rem; }
.btn-outline:hover { background: rgba(0,255,136,.08); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--white); padding: 8px 20px; font-size: .875rem; border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-danger { background: var(--red); color: #fff; padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 12px 28px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-xs { padding: 3px 10px; font-size: .75rem; border-radius: 4px; }

/* User dropdown */
.user-menu { position: relative; }
.user-menu-trigger { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--border); border-radius: 50px; padding: 4px 12px 4px 4px; cursor: pointer; color: var(--text); transition: border-color .15s; }
.user-menu-trigger:hover { border-color: var(--accent); }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .75rem; }
.user-menu-name { font-size: .8rem; font-weight: 500; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; width: 220px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 8px 0; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.user-dropdown.open { display: block; }
.dropdown-header { padding: 10px 14px; }
.dropdown-email { display: block; font-size: .8rem; color: var(--text-m); overflow: hidden; text-overflow: ellipsis; }
.dropdown-tier { display: inline-block; margin-top: 4px; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 50px; }
.dropdown-tier.t-free { background: rgba(255,255,255,.06); color: var(--text-m); }
.dropdown-tier.t-premium { background: rgba(0,255,136,.12); color: var(--accent); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.dropdown-item { display: block; padding: 8px 14px; font-size: .85rem; color: var(--text); transition: background .1s; }
.dropdown-item:hover { background: rgba(255,255,255,.04); color: var(--white); }
.dropdown-item-danger { color: var(--red); }
.dropdown-item-danger:hover { background: rgba(255,68,68,.08); }

/* Mobile */
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; flex-direction: column; gap: 5px; }
.mobile-toggle span { display: block; width: 20px; height: 2px; background: var(--white); border-radius: 1px; transition: .2s; }
.mobile-menu { display: none; position: fixed; top: 56px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 16px 20px; z-index: 99; flex-direction: column; gap: 4px; }
.mobile-menu.open { display: flex; }
.mobile-link { padding: 10px 0; font-size: .95rem; color: var(--text); }
.mobile-link:hover { color: var(--white); }
.mobile-divider { height: 1px; background: var(--border); margin: 8px 0; }

/* Visibility helpers — toggled by JS */
.guest-only, .auth-only, .admin-only { /* shown/hidden via JS */ }

/* ===== HERO ===== */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; padding-top: 56px; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 50%, rgba(0,255,136,.06) 0%, transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(0,255,136,.04) 0%, transparent 50%); }
.hero-content { position: relative; text-align: center; max-width: 720px; margin: 0 auto; }
.hero-badge { display: inline-block; padding: 5px 14px; border: 1px solid rgba(0,255,136,.3); border-radius: 50px; color: var(--accent); font-size: .78rem; font-weight: 600; margin-bottom: 20px; letter-spacing: .3px; }
.hero h1 { font-size: 3.4rem; font-weight: 900; line-height: 1.1; color: var(--white); margin-bottom: 16px; }
.hero-sub { font-size: 1.05rem; color: var(--text-m); max-width: 540px; margin: 0 auto 28px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 48px; }
.hero-stats { display: flex; justify-content: center; gap: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.stat-val { display: block; font-size: 1.6rem; font-weight: 800; color: var(--accent); font-family: var(--mono); }
.stat-lbl { font-size: .78rem; color: var(--text-m); }

/* ===== FEATURES ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 32px; }
.feature-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 28px; transition: border-color .2s, transform .2s; }
.feature-card:hover { border-color: rgba(0,255,136,.3); transform: translateY(-2px); }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 6px; }
.feature-card p { color: var(--text-m); font-size: .9rem; }

/* ===== SIGNALS ===== */
.signals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.signal-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; transition: border-color .2s; }
.signal-card:hover { border-color: rgba(0,255,136,.25); }
.signal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.signal-pair { font-size: 1.15rem; font-weight: 700; color: var(--white); font-family: var(--mono); }
.signal-action { padding: 3px 10px; border-radius: 50px; font-size: .7rem; font-weight: 700; letter-spacing: .5px; }
.signal-action.BUY { background: rgba(0,255,136,.12); color: var(--accent); }
.signal-action.SELL { background: rgba(255,68,68,.12); color: var(--red); }
.signal-action.WATCH { background: rgba(255,170,0,.12); color: var(--yellow); }
.signal-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.signal-detail-label { font-size: .7rem; color: var(--text-m); text-transform: uppercase; letter-spacing: .4px; }
.signal-detail-value { font-family: var(--mono); font-size: .9rem; color: var(--white); }
.signal-confidence { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.signal-confidence-bar { height: 100%; border-radius: 2px; }
.signal-reasoning { font-size: .82rem; color: var(--text-m); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); line-height: 1.5; }
.signal-card-placeholder { grid-column: 1/-1; text-align: center; padding: 48px; color: var(--text-m); }

/* Locked premium signals */
.signal-locked { position: relative; border-color: rgba(0,255,136,.15); }
.signal-locked .signal-header { opacity: .6; }
.locked-overlay { text-align: center; padding: 20px 16px; }
.locked-icon { font-size: 1.8rem; margin-bottom: 6px; }
.locked-text { color: var(--accent); font-weight: 700; font-size: .95rem; margin-bottom: 2px; }
.locked-sub { color: var(--text-m); font-size: .8rem; margin-bottom: 12px; }
.signal-locked:hover { border-color: var(--accent); }

/* Signal Filters */
.signal-filters { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-btn { padding: 6px 16px; border: 1px solid var(--border); border-radius: 50px; background: transparent; color: var(--text-m); cursor: pointer; font-family: var(--font); font-weight: 500; font-size: .82rem; transition: .15s; }
.filter-btn:hover, .filter-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(0,255,136,.06); }

/* ===== PRICING ===== */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 900px; margin: 32px auto 0; }
.pricing-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 32px 24px; text-align: center; position: relative; }
.pricing-featured { border-color: var(--accent); }
.pricing-pop, .pricing-save { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); padding: 3px 12px; border-radius: 50px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.pricing-pop { background: var(--accent); color: var(--bg); }
.pricing-save { background: var(--yellow); color: var(--bg); }
.pricing-tier { font-size: 1rem; font-weight: 600; color: var(--text-m); margin-bottom: 6px; }
.pricing-price { font-size: 2.4rem; font-weight: 900; color: var(--white); margin-bottom: 20px; }
.pricing-price span { font-size: .85rem; color: var(--text-m); font-weight: 400; }
.pricing-features { text-align: left; margin-bottom: 24px; }
.pricing-features li { padding: 6px 0; color: var(--text); font-size: .88rem; }
.pricing-features li::before { content: '✓'; color: var(--accent); font-weight: 700; margin-right: 10px; }

/* ===== PAGE HEADER (dashboard) ===== */
.page-header { margin-bottom: 24px; }
.page-title { font-size: 1.8rem; font-weight: 800; color: var(--white); text-align: left; margin-bottom: 4px; }
.page-desc { color: var(--text-m); font-size: .9rem; }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--border); padding: 24px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .85rem; }
.footer-left { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--white); }
.footer-tag { color: var(--text-m); font-weight: 400; margin-left: 12px; }
.footer-right { color: var(--text-m); }

/* ===== MODAL ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 200; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 32px; width: 100%; max-width: 400px; position: relative; }
.modal-wide { max-width: 480px; }
.modal h2 { color: var(--white); font-size: 1.3rem; margin-bottom: 2px; }
.modal-sub { color: var(--text-m); margin-bottom: 20px; font-size: .9rem; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--text-m); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .8rem; font-weight: 500; color: var(--text-m); margin-bottom: 4px; }
.field input, .field select { width: 100%; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--white); font-family: var(--font); font-size: .9rem; transition: border-color .15s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.form-error { color: var(--red); font-size: .82rem; margin-bottom: 10px; min-height: 18px; }
.auth-switch { text-align: center; margin-top: 14px; color: var(--text-m); font-size: .85rem; }
.small-note { text-align: center; font-size: .75rem; color: var(--text-m); margin-top: 12px; }

/* Crypto selector */
.crypto-selector { margin-bottom: 20px; }
.crypto-selector label { display: block; font-size: .8rem; color: var(--text-m); margin-bottom: 10px; font-weight: 500; }
.crypto-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.crypto-btn { padding: 10px 6px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); cursor: pointer; font-family: var(--mono); font-size: .8rem; font-weight: 700; color: var(--white); transition: .15s; }
.crypto-btn:hover { border-color: var(--accent); }
.crypto-btn.active { border-color: var(--accent); background: rgba(0,255,136,.08); color: var(--accent); }

/* Payment result */
.centered-block { text-align: center; padding: 20px 0; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
.check-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(0,255,136,.12); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; margin: 0 auto 14px; }
.info-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px; margin-top: 16px; text-align: left; }
.info-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: .85rem; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-row span:first-child { color: var(--text-m); }
.mono { font-family: var(--mono); font-size: .8rem; }
.tag { padding: 2px 8px; border-radius: 50px; font-size: .7rem; font-weight: 600; }
.tag-warning { background: rgba(255,170,0,.12); color: var(--yellow); }
.tag-success { background: rgba(0,255,136,.12); color: var(--accent); }
.tag-danger { background: rgba(255,68,68,.12); color: var(--red); }
.tag-muted { background: rgba(255,255,255,.06); color: var(--text-m); }

/* ===== ADMIN ===== */
.admin-wrap { padding-top: 72px; min-height: 100vh; }
.admin-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.admin-tab { padding: 10px 18px; font-size: .875rem; font-weight: 500; color: var(--text-m); background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: .15s; font-family: var(--font); }
.admin-tab:hover { color: var(--white); }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-panel { display: none; }
.admin-panel.active { display: block; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 32px; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.stat-card-label { font-size: .78rem; color: var(--text-m); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .3px; }
.stat-card-value { font-size: 1.8rem; font-weight: 800; color: var(--white); font-family: var(--mono); }
.stat-card-value.green { color: var(--accent); }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th { text-align: left; padding: 10px 12px; color: var(--text-m); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .3px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text); white-space: nowrap; }
tr:hover td { background: rgba(255,255,255,.02); }
.table-actions { display: flex; gap: 6px; }

/* Search bar */
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.search-bar input, .search-bar select { padding: 8px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--white); font-family: var(--font); font-size: .85rem; }
.search-bar input { flex: 1; min-width: 200px; }
.search-bar input:focus, .search-bar select:focus { outline: none; border-color: var(--accent); }

/* ===== SIGNAL DETAIL ===== */
.back-link { display: inline-block; color: var(--text-m); font-size: .85rem; margin-bottom: 20px; }
.back-link:hover { color: var(--accent); }
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.detail-main { min-width: 0; }
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.detail-header .signal-pair { font-size: 1.5rem; margin-right: 10px; }
.detail-header .signal-action { font-size: .8rem; vertical-align: middle; }
.detail-date { font-size: .8rem; color: var(--text-m); }
.chart-container { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); height: 400px; margin-bottom: 20px; overflow: hidden; }
.detail-reasoning { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.detail-reasoning h4 { color: var(--white); font-size: .9rem; margin-bottom: 8px; }
.detail-reasoning p { color: var(--text); font-size: .9rem; line-height: 1.6; }
.detail-sidebar { display: flex; flex-direction: column; gap: 16px; }
.detail-info-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.detail-info-card h3 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }

/* ===== SETTINGS / ACCOUNT ===== */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.settings-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; }
.settings-card h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 16px; }
.settings-desc { color: var(--text-m); font-size: .85rem; margin-bottom: 14px; }
.form-success { color: var(--accent); font-size: .82rem; margin-bottom: 10px; min-height: 18px; }
.sub-info { margin-bottom: 8px; }
code { background: var(--bg); padding: 2px 6px; border-radius: 3px; font-family: var(--mono); font-size: .82rem; }

/* Ad as signal card */
.signal-card-ad { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); display: flex; align-items: center; justify-content: center; min-height: 250px; overflow: hidden; }

/* ===== FAQ ===== */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 8px; overflow: hidden; }
.faq-item summary { padding: 16px 20px; font-weight: 600; color: var(--white); cursor: pointer; font-size: .95rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--accent); transition: transform .2s; }
.faq-item[open] summary::after { content: '-'; }
.faq-item[open] { border-color: rgba(0,255,136,.2); }
.faq-item p { padding: 0 20px 16px; color: var(--text); font-size: .9rem; line-height: 1.7; }

/* ===== ADS ===== */
.ad-row { padding: 20px 0; display: flex; justify-content: center; }
.ad-banner { display: flex; justify-content: center; align-items: center; overflow: hidden; border-radius: var(--r-sm); }
.ad-728 { max-width: 728px; min-height: 90px; margin: 0 auto; }
.ad-300 { max-width: 300px; min-height: 250px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .hero-sub br { display: none; }
  .hero-stats { gap: 24px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .nav-center, .nav-right { display: none; }
  .mobile-toggle { display: flex; }
  .section-title { font-size: 1.8rem; }
  .signals-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .chart-container { height: 300px; }
  .settings-grid { grid-template-columns: 1fr; }
  .ad-300 { margin: 0 auto; }
  .ad-728 { max-width: 100%; min-height: auto; }
  .modal { margin: 12px; padding: 24px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-tabs { overflow-x: auto; }
}

@media (min-width: 769px) {
  .mobile-menu { display: none !important; }
}
