/* ============================================================
   COINSPANNER CRYPTO PRO — Frontend Stylesheet
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

:root {
    --cs-font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --cs-positive: #00c853;
    --cs-negative: #ff3d00;
    --cs-border:   #000;
    --cs-bg:       #fff;
    --cs-radius:   8px;
}

/* ── Global stats bar ─────────────────────────────────────────────────────── */
.cp-bar { width:100%; background:#fff; border-bottom:2px solid #000; overflow:hidden;
    font-family:var(--cs-font); font-weight:700; font-size:12px; color:#000;
    height:44px; display:flex; align-items:center; position:relative; z-index:999; }
.cp-wrap { display:flex; align-items:center; white-space:nowrap; gap:40px; padding:0 15px; }
.cp-dot { height:8px; width:8px; background:#00c853; border-radius:50%;
    animation:cp_pulse 2s infinite; margin-right:6px; flex-shrink:0; }
@keyframes cp_pulse {
    0%   { transform:scale(0.9); box-shadow:0 0 0 0 rgba(0,200,83,.4); }
    70%  { transform:scale(1.1); box-shadow:0 0 0 6px rgba(0,200,83,0); }
    100% { transform:scale(0.9); box-shadow:0 0 0 0 rgba(0,200,83,0); }
}
.cp-item { display:flex; align-items:center; flex-shrink:0; }
@media (min-width:1025px) { .cp-wrap { justify-content:center; width:100%; } .cp-duplicate { display:none; } }
@media (max-width:1024px) {
    .cp-wrap { animation:cp-scroll 25s linear infinite; width:max-content; }
    .cp-duplicate { display:flex; gap:40px; }
}
@keyframes cp-scroll { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ── Currency switcher ────────────────────────────────────────────────────── */
.cs-currency-switcher { display:flex; align-items:center; gap:6px; flex-wrap:wrap;
    margin-bottom:14px; padding:6px 0; }
.cs-curr-label { font-size:16px; margin-right:4px; }
.cs-curr-btn { border:1.5px solid #000; background:#fff; border-radius:999px;
    padding:4px 12px; font-size:12px; font-weight:700; cursor:pointer;
    transition:all .2s; font-family:var(--cs-font); }
.cs-curr-btn:hover { background:#000; color:#fff; }
.cs-curr-btn.active { background:#000; color:#fff; }

/* ── Table ────────────────────────────────────────────────────────────────── */
.cs-table-wrapper { width:100%; overflow-x:auto; background:#fff; }
.cs-table { width:100%; border-collapse:separate; border-spacing:0;
    font-family:var(--cs-font); font-weight:700; background:#fff; }
.cs-table th, .cs-table td { padding:14px; border:1px solid #000; white-space:nowrap; background:#fff; }
.cs-table th { background:#fff; }
.cs-table tbody tr { transition:all .25s ease; }
.cs-table tbody tr:hover { transform:translateY(-2px); box-shadow:0 6px 15px rgba(0,0,0,.12); }
.cs-positive { color:#00c853; }
.cs-negative { color:#ff3d00; }
.cs-coin { display:flex; align-items:center; gap:8px; }
.cs-coin img { width:26px; height:26px; border-radius:50%; }
.cs-coin-link { color:inherit; text-decoration:none; }
.cs-coin-link:hover { text-decoration:underline; }
.cs-coin-sym { color:#888; font-size:12px; }
@keyframes csFlipOut { from{transform:scaleY(1);opacity:1} to{transform:scaleY(0);opacity:0} }
@keyframes csFlipIn  { from{transform:scaleY(0);opacity:0} to{transform:scaleY(1);opacity:1} }

/* ── Search bar ───────────────────────────────────────────────────────────── */
.cs-search-bar-wrapper { display:flex; justify-content:flex-end; align-items:center; margin-bottom:12px; gap:8px; }
.cs-search-input-wrap { display:flex; align-items:center; border:1.5px solid #222; border-radius:999px;
    background:#fff; padding:0 16px 0 12px; height:36px; width:215px; transition:width .28s,border-color .2s,box-shadow .2s; }
.cs-search-input-wrap:focus-within { width:275px; border-color:#000; box-shadow:0 0 0 3px rgba(0,0,0,.08); }
.cs-search-icon { flex-shrink:0; width:14px; height:14px; }
.cs-search-input { border:none; outline:none; width:100%; font-size:13px; font-family:var(--cs-font);
    background:transparent; padding:0 0 0 8px; }
.cs-search-mobile-toggle { display:none; background:none; border:none; cursor:pointer; padding:4px; }
@media (max-width:768px) {
    .cs-search-input-wrap { display:none; }
    .cs-search-input-wrap.cs-mobile-open { display:flex; width:100%; position:absolute; top:0; left:0; z-index:10; }
    .cs-search-mobile-toggle { display:flex; }
    .cs-search-bar-wrapper { position:relative; }
}

/* Sticky columns mobile */
@media (max-width:768px) {
    .cs-table .cs-col-rank { position:sticky; left:0; z-index:2; }
    .cs-table .cs-col-coin { position:sticky; left:45px; z-index:2; }
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.cs-pagination { display:flex; gap:6px; justify-content:center; margin-top:16px; flex-wrap:wrap; }
.cs-page-btn { border:1.5px solid #000; background:#fff; border-radius:6px; padding:6px 12px;
    cursor:pointer; font-weight:700; font-family:var(--cs-font); font-size:13px; transition:all .2s; }
.cs-page-btn:hover:not([disabled]) { background:#000; color:#fff; }
.cs-page-btn.active { background:#000; color:#fff; }
.cs-page-btn[disabled] { opacity:.4; cursor:default; }

/* ── No results ───────────────────────────────────────────────────────────── */
.cs-no-results-box { border:2px solid #000; border-radius:8px; padding:32px;
    text-align:center; margin:20px 0; }
.cs-no-results-icon { font-size:32px; display:block; margin-bottom:12px; }
.cs-no-results-title { font-size:18px; font-weight:700; margin:0 0 8px; }
.cs-no-results-sub { color:#666; margin:0; }

/* ── Widget boxes ─────────────────────────────────────────────────────────── */
.cs-top-layout { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
@media (max-width:1024px) { .cs-top-layout { grid-template-columns:1fr; } }
.cs-box { border:2px solid #000; border-radius:var(--cs-radius); padding:16px;
    background:#fff; font-family:var(--cs-font); }
.cs-title { font-size:15px; font-weight:700; margin:0 0 12px; display:flex; align-items:center; gap:8px; }
.cs-item { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid #e5e7eb; }
.cs-item:last-of-type { border-bottom:none; }
.cs-item-img { width:28px; height:28px; border-radius:50%; flex-shrink:0; }
.cs-item-info { flex:1; min-width:0; }
.cs-item-name { font-weight:700; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    display:block; color:inherit; text-decoration:none; }
.cs-item-name:hover { text-decoration:underline; }
.cs-item-sym { color:#888; font-size:12px; }
.cs-pct { font-weight:700; white-space:nowrap; }
.cs-view-more-btn { width:100%; margin-top:12px; padding:8px; border:1.5px solid #000;
    background:#fff; border-radius:6px; cursor:pointer; font-weight:700;
    font-family:var(--cs-font); font-size:13px; transition:all .2s; }
.cs-view-more-btn:hover { background:#000; color:#fff; }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.cs-badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px;
    font-weight:700; font-family:var(--cs-font); }
.cs-badge-green  { background:#dcfce7; color:#166534; }
.cs-badge-red    { background:#fee2e2; color:#991b1b; }
.cs-badge-blue   { background:#dbeafe; color:#1e40af; }
.cs-badge-purple { background:#ede9fe; color:#5b21b6; }
.cs-badge-orange { background:#fff7ed; color:#9a3412; }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.cs-modal-backdrop { display:flex; align-items:center; justify-content:center;
    position:fixed; inset:0; background:rgba(0,0,0,.6); backdrop-filter:blur(4px);
    z-index:99999; animation:csModalIn .2s ease; }
@keyframes csModalIn { from{opacity:0} to{opacity:1} }
.cs-modal { background:#fff; border-radius:12px; max-width:560px; width:90%;
    max-height:90vh; overflow:hidden; display:flex; flex-direction:column;
    animation:csModalSlide .25s ease; }
@keyframes csModalSlide { from{transform:translateY(20px) scale(.97);opacity:0} to{transform:none;opacity:1} }
.cs-modal-head { display:flex; align-items:center; justify-content:space-between;
    padding:16px 20px; border-bottom:1px solid #e5e7eb; font-weight:700; font-size:16px; }
.cs-modal-close { background:none; border:none; font-size:18px; cursor:pointer;
    color:#888; line-height:1; padding:4px; }
.cs-modal-close:hover { color:#000; }
.cs-modal-body { padding:20px; overflow-y:auto; flex:1; }
.cs-modal-foot { padding:12px 20px; background:#f9fafb; border-top:1px solid #e5e7eb;
    font-size:12px; color:#888; text-align:center; }
.cs-mini-table { width:100%; border-collapse:collapse; font-family:var(--cs-font); font-size:14px; }
.cs-mini-table th, .cs-mini-table td { padding:10px 12px; border-bottom:1px solid #e5e7eb; text-align:left; }
.cs-mini-table th { font-weight:700; background:#f9fafb; }

/* ── Exchange tables ──────────────────────────────────────────────────────── */
.cs-exchanges-section { font-family:var(--cs-font); }
.cs-tier-block { margin-bottom:32px; }
.cs-tier-header { margin-bottom:12px; }
.cs-tier-title { font-size:20px; font-weight:700; margin:0 0 4px; }
.cs-tier-sub { color:#888; font-size:13px; }
.cs-exc-filter-tabs { display:flex; gap:8px; margin-bottom:12px; }
.cs-exc-tab { padding:6px 16px; border:1.5px solid #000; border-radius:999px;
    background:#fff; cursor:pointer; font-weight:700; font-family:var(--cs-font);
    font-size:13px; transition:all .2s; }
.cs-exc-tab.active, .cs-exc-tab:hover { background:#000; color:#fff; }
.cs-exc-name-wrap { display:flex; align-items:center; gap:8px; }
.cs-exc-logo { border-radius:4px; flex-shrink:0; }
.cs-exc-link { font-weight:700; color:inherit; text-decoration:none; }
.cs-exc-link:hover { text-decoration:underline; }
.cs-exc-country { color:#888; font-size:12px; display:block; }
.cs-trust-score { display:flex; align-items:center; gap:8px; }
.cs-trust-num { font-weight:700; min-width:36px; font-size:13px; }
.cs-trust-bar { flex:1; height:6px; background:#e5e7eb; border-radius:999px; overflow:hidden; }
.cs-trust-fill { height:100%; border-radius:999px; transition:width .3s; }
.cs-trust-high .cs-trust-fill { background:#00c853; }
.cs-trust-mid  .cs-trust-fill { background:#f59e0b; }
.cs-trust-low  .cs-trust-fill { background:#ff3d00; }

/* ── Coin Detail Page ─────────────────────────────────────────────────────── */
.csd-page { font-family:var(--cs-font); max-width:1200px; margin:0 auto; padding:16px; }
.csd-breadcrumb { font-size:13px; color:#888; margin-bottom:16px; }
.csd-bc-link { color:#888; text-decoration:none; }
.csd-bc-link:hover { color:#000; }
.csd-bc-current { color:#000; font-weight:700; }
.csd-identity { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.csd-coin-logo { border-radius:50%; flex-shrink:0; }
.csd-coin-name { font-size:28px; font-weight:700; margin:0; display:flex; align-items:center; gap:8px; }
.csd-coin-sym { font-size:16px; color:#888; font-weight:400; }
.csd-ranks { display:flex; gap:6px; margin-top:4px; }
.csd-rank-badge { background:#f3f4f6; border-radius:4px; padding:2px 8px; font-size:12px; font-weight:700; }
.csd-price-badge { margin-left:auto; text-align:right; }
.csd-price-main { font-size:32px; font-weight:700; display:block; }
.csd-pct24 { font-size:15px; font-weight:700; }
.csd-watchlist-btn { background:none; border:1.5px solid #000; border-radius:8px;
    padding:8px 14px; cursor:pointer; display:flex; align-items:center; gap:6px;
    font-family:var(--cs-font); font-weight:700; transition:all .2s; }
.csd-watchlist-btn:hover { background:#000; color:#fff; }
.csd-watchlist-btn.cs-watching .csd-star { color:#f59e0b; }
.csd-star { font-size:18px; }
.csd-filter-row { margin-bottom:16px; }
.csd-curr-group { display:flex; gap:6px; flex-wrap:wrap; }
.csd-curr-btn { padding:4px 12px; border:1.5px solid #000; border-radius:999px;
    background:#fff; cursor:pointer; font-weight:700; font-family:var(--cs-font);
    font-size:12px; transition:all .2s; }
.csd-curr-btn.active, .csd-curr-btn:hover { background:#000; color:#fff; }
.csd-tabs { display:flex; gap:0; border-bottom:2px solid #000; margin-bottom:20px; }
.csd-tab { padding:10px 20px; border:none; background:none; cursor:pointer;
    font-family:var(--cs-font); font-weight:700; font-size:14px;
    border-bottom:3px solid transparent; margin-bottom:-2px; transition:all .2s; }
.csd-tab.active { border-bottom-color:#000; }
.csd-tab:hover { background:#f9fafb; }
.csd-overview-layout { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
@media (max-width:768px) { .csd-overview-layout { grid-template-columns:1fr; } }
.csd-price-full { font-size:36px; font-weight:700; margin-bottom:16px; }
.csd-range-bar { display:flex; align-items:center; gap:8px; margin-bottom:20px; }
.csd-range-track { flex:1; height:8px; background:#e5e7eb; border-radius:999px; overflow:hidden; }
.csd-range-fill { height:100%; background:#000; border-radius:999px; transition:width .3s; }
.csd-range-label { font-size:12px; font-weight:700; white-space:nowrap; }
.csd-stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:20px; }
.csd-stat { padding:12px; background:#f9fafb; border-radius:8px; }
.csd-stat span { display:block; font-size:12px; color:#888; margin-bottom:4px; }
.csd-stat strong { font-size:15px; font-weight:700; }
.csd-ath-atl-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:16px; }
.csd-ath-card, .csd-atl-card { padding:12px; border:1.5px solid #000; border-radius:8px; }
.csd-ath-label { display:block; font-size:11px; color:#888; }
.csd-ath-val { display:block; font-size:16px; font-weight:700; }
.csd-liq-row { display:flex; align-items:center; gap:12px; margin-bottom:16px; font-size:13px; }
.csd-liq-bar { flex:1; height:8px; background:#e5e7eb; border-radius:999px; overflow:hidden; }
.csd-liq-fill { height:100%; background:#3b82f6; border-radius:999px; }
.csd-links { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.csd-link-btn { padding:6px 14px; border:1.5px solid #000; border-radius:6px;
    text-decoration:none; color:#000; font-size:13px; font-weight:700;
    transition:all .2s; font-family:var(--cs-font); }
.csd-link-btn:hover { background:#000; color:#fff; }
.csd-contracts { margin-bottom:16px; }
.csd-section-title { font-weight:700; font-size:14px; margin-bottom:10px; }
.csd-contract-row { display:flex; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid #e5e7eb; }
.csd-chain { font-weight:700; font-size:13px; min-width:80px; }
.csd-addr { font-size:11px; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.csd-copy-btn { background:none; border:none; cursor:pointer; font-size:14px; flex-shrink:0; }
.csd-chart-ranges { display:flex; gap:6px; margin-bottom:12px; }
.csd-range-btn { padding:4px 12px; border:1.5px solid #000; border-radius:6px;
    background:#fff; cursor:pointer; font-weight:700; font-family:var(--cs-font); font-size:13px; }
.csd-range-btn.active { background:#000; color:#fff; }
.csd-tv-chart { width:100%; min-height:350px; }
.csd-spark-canvas { width:100%; height:300px; display:block; }
.csd-insights-hub-btn { display:block; width:100%; margin-top:16px; padding:12px;
    background:#000; color:#fff; border:none; border-radius:8px; cursor:pointer;
    font-family:var(--cs-font); font-weight:700; font-size:15px; transition:opacity .2s; }
.csd-insights-hub-btn:hover { opacity:.85; }
.csd-market-filter-tabs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px; }
.csd-mf-tab { padding:6px 14px; border:1.5px solid #000; border-radius:999px;
    background:#fff; cursor:pointer; font-weight:700; font-family:var(--cs-font); font-size:13px; }
.csd-mf-tab.active { background:#000; color:#fff; }
.csd-historical-note { color:#888; font-size:14px; padding:20px; }
.csd-no-data { color:#888; text-align:center; padding:20px; }

/* ── Insights Modal ───────────────────────────────────────────────────────── */
.csd-insights-backdrop { display:flex; align-items:center; justify-content:center;
    position:fixed; inset:0; background:rgba(0,0,0,.65); backdrop-filter:blur(6px);
    z-index:99999; }
.csd-insights-modal { background:#fff; border-radius:16px; width:min(760px,95vw);
    max-height:90vh; display:flex; flex-direction:column; overflow:hidden; }
.csd-insights-head { display:flex; align-items:center; justify-content:space-between;
    padding:16px 20px; border-bottom:1px solid #e5e7eb; font-weight:700; font-size:16px; }
.csd-insights-close { background:none; border:none; font-size:20px; cursor:pointer; color:#888; }
.csd-insights-close:hover { color:#000; }
.csd-insights-nav { display:flex; flex-wrap:wrap; gap:6px; padding:12px 16px;
    border-bottom:1px solid #e5e7eb; background:#f9fafb; }
.csd-insights-nav-btn { padding:5px 12px; border:1.5px solid #d1d5db; border-radius:999px;
    background:#fff; cursor:pointer; font-size:12px; font-weight:700; font-family:var(--cs-font);
    transition:all .2s; }
.csd-insights-nav-btn:hover, .csd-insights-nav-btn.active { background:#000; color:#fff; border-color:#000; }
.csd-insights-body { padding:20px; overflow-y:auto; flex:1; }
.csd-insights-loading { color:#888; text-align:center; padding:20px; font-size:14px; }
.cs-insight-box { padding:16px 0; }
.cs-insight-label { font-size:18px; font-weight:700; margin:12px 0; }
.cs-gauge-wrap { display:flex; justify-content:center; }
.cs-score-ring { width:100px; height:100px; border-radius:50%; border:6px solid;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    margin:0 auto 16px; }
.cs-factor-list { display:flex; flex-direction:column; gap:10px; }
.cs-factor-row { display:flex; align-items:center; gap:10px; font-size:14px; }
.cs-factor-row span:first-child { min-width:140px; }
.cs-factor-row .csd-liq-bar { flex:1; }
.cs-health-list { display:flex; flex-direction:column; gap:14px; }
.cs-health-row { display:flex; align-items:flex-start; gap:12px; }
.cs-health-icon { font-size:20px; flex-shrink:0; }
.cs-vote-bars { display:flex; flex-direction:column; gap:12px; margin:16px 0; }
.cs-vote-bar-row { display:flex; align-items:center; gap:12px; font-size:14px; font-weight:700; }
.cs-vote-bar-row span:first-child { min-width:70px; }
.cs-vote-bar-row .csd-liq-bar { flex:1; }
.cs-vote-btns { display:flex; gap:12px; justify-content:center; margin-top:16px; }
.cs-rr-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:16px 0; }
.cs-rr-item { text-align:center; padding:12px; background:#f9fafb; border-radius:8px; }
.cs-rr-item span { display:block; font-size:12px; color:#888; margin-bottom:6px; }
.cs-rr-item strong { font-size:20px; font-weight:700; }
.cs-zone-list { display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.cs-zone-row { display:flex; justify-content:space-between; align-items:center;
    padding:10px 14px; background:#f9fafb; border-radius:8px; border:1.5px solid transparent; }
.cs-zone-active { background:#000; color:#fff; }
.cs-calc-row { display:flex; align-items:center; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.cs-calc-results { margin-top:16px; }
.cs-supply-legend { display:flex; gap:16px; justify-content:center; margin-top:12px;
    font-size:13px; flex-wrap:wrap; }
.cs-about-desc { font-size:14px; line-height:1.7; color:#374151; margin-bottom:16px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.cs-btn-primary { background:#000; color:#fff; border:none; border-radius:8px;
    padding:12px 24px; cursor:pointer; font-family:var(--cs-font);
    font-weight:700; font-size:14px; transition:opacity .2s; }
.cs-btn-primary:hover { opacity:.85; }
.cs-btn-danger { background:#ef4444; color:#fff; border:none; border-radius:8px;
    padding:12px 24px; cursor:pointer; font-family:var(--cs-font);
    font-weight:700; font-size:14px; transition:opacity .2s; }
.cs-btn-danger:hover { opacity:.85; }
.cs-full-width { width:100%; }

/* ── Accessibility ────────────────────────────────────────────────────────── */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px;
    overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border-width:0; }
