/* ===== Κερί v2: header, tabs, κάρτες κατάστασης, πίνακας, dashboard, 3D ===== */
:root {
  --panel: rgba(13, 19, 37, 0.66);
  --panel-strong: rgba(10, 15, 30, 0.82);
  --amber: #f2c66d;
  --depth: 0 24px 48px -24px rgba(0, 0, 0, 0.75), 0 2px 6px -2px rgba(0, 0, 0, 0.4);
}

#bg3d {
  position: fixed; inset: 0; z-index: -1;
  width: 100vw; height: 100vh;
  opacity: 0; transition: opacity 1.2s ease;
  pointer-events: none;
}
#bg3d.ready { opacity: 1; }
/* σκούρο πέπλο πάνω από το 3D για να διαβάζονται οι αριθμοί */
.veil {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, transparent 30%, rgba(6,10,20,0.55) 100%);
}

/* ---------- Header + tabs ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 12, 24, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--edge);
}
.topbar .ticker { position: static; background: transparent; border-bottom: 1px solid rgba(170,195,255,0.08); }
.bar {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; gap: 28px;
  padding: 10px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand svg { width: 34px; height: 34px; filter: drop-shadow(0 4px 12px rgba(91, 227, 161, 0.25)); }
.brand b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.tabs { display: flex; gap: 4px; }
.tabs a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14.5px;
}
.tabs a svg { width: 17px; height: 17px; }
.tabs a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.tabs a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,0.08); box-shadow: inset 0 0 0 1px var(--edge-hi); }
.bar .status { margin-left: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--muted);
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--edge);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bull); box-shadow: 0 0 8px var(--bull); }

/* κάτω μπάρα στο κινητό */
.bottomnav { display: none; }

/* ---------- Σελίδα ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 16px 80px; }
.lede h1 { margin: 0; font-size: clamp(24px, 5.5vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.lede p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.lede .num { font-family: var(--mono); color: var(--text); }
.up { color: var(--bull); } .down { color: var(--bear); }

/* ---------- Κάρτες που αιωρούνται ---------- */
.float-card {
  --i: 0;
  position: relative;
  background: var(--panel);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--edge);
  border-radius: 18px;
  box-shadow: var(--depth), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: hover-float 7s ease-in-out calc(var(--i) * -1.7s) infinite alternate;
  transform-style: preserve-3d;
  transition: box-shadow .3s;
}
.float-card:hover { box-shadow: 0 34px 60px -26px rgba(0,0,0,0.85), 0 0 0 1px var(--edge-hi), inset 0 1px 0 rgba(255,255,255,0.07); }
@keyframes hover-float { from { translate: 0 0; } to { translate: 0 -6px; } }
/* η κλίση (tilt) μπαίνει από JS στο transform· η αιώρηση στο translate, για να μη συγκρούονται */
.float-card[data-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out, box-shadow .3s; }
.float-card[data-tilt]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,0.07), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.float-card[data-tilt]:hover::after { opacity: 1; }

/* ---------- Κάρτες κατάστασης αγοράς ---------- */
.state { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 20px 0 26px; }
.state .float-card { padding: 16px 18px; min-height: 196px; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.card-h h2 { margin: 0; font-size: 15px; font-weight: 700; }
.card-h small { color: var(--faint); font-size: 12px; }

.gauge { display: block; width: 100%; max-width: 210px; margin: 2px auto 0; }
.gauge-val { text-align: center; margin-top: 4px; }
.gauge-val b { display: block; font: 600 34px/1 var(--mono); }
.gauge-val span { font-size: 14px; font-weight: 600; }
.gauge-sub { text-align: center; color: var(--faint); font-size: 12.5px; margin-top: 4px; }

.big { font: 600 28px/1.1 var(--mono); letter-spacing: -0.01em; }
.big-sub { font-family: var(--mono); font-size: 13px; margin-top: 4px; }
.dom { margin-top: 18px; }
.dom-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,0.06); }
.dom-bar i { display: block; height: 100%; }
.dom-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.dom-legend b { font-family: var(--mono); color: var(--text); font-weight: 500; }
.dot-i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }

.mini { list-style: none; margin: 0; padding: 0; }
.mini li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; padding: 5px 0; font-size: 14px; }
.mini li + li { border-top: 1px solid rgba(170,195,255,0.06); }
.mini img, .ico { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,0.08); }
.mini .nm { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.mini .nm b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .nm small { color: var(--faint); font: 11.5px var(--mono); }
.mini .v { font: 13px var(--mono); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.split h3 { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.split .mini li { grid-template-columns: 20px 1fr auto; font-size: 13px; }
.split .mini img { width: 20px; height: 20px; }

/* ---------- Πίνακας ---------- */
.table-panel { padding: 6px 0 4px; animation: none; }
.tools { display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px; flex-wrap: wrap; }
.tools h2 { margin: 0 auto 0 4px; font-size: 17px; font-weight: 700; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.28); border: 1px solid var(--edge); border-radius: 10px;
  padding: 0 10px; height: 38px; min-width: 220px;
}
.search svg { width: 16px; height: 16px; color: var(--faint); }
.search input { all: unset; flex: 1; font-size: 14px; color: var(--text); }
.search input::placeholder { color: var(--faint); }
.seg.small { grid-template-columns: auto auto; padding: 3px; }
.seg.small button { padding: 8px 12px; font-size: 13px; }

.tbl-scroll { overflow-x: auto; }
table.ct { width: 100%; border-collapse: collapse; font-size: 14px; }
.ct th {
  position: sticky; top: 0;
  text-align: right; font-weight: 600; font-size: 12.5px; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--edge); white-space: nowrap;
  cursor: pointer; user-select: none;
}
.ct th:hover { color: var(--text); }
.ct th[aria-sort] { color: var(--text); }
.ct th[aria-sort="descending"]::after { content: " ↓"; }
.ct th[aria-sort="ascending"]::after { content: " ↑"; }
.ct th.l, .ct td.l { text-align: left; }
.ct td { padding: 11px 12px; text-align: right; border-bottom: 1px solid rgba(170,195,255,0.06); white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ct tbody tr { cursor: pointer; transition: background .15s; }
.ct tbody tr:hover { background: rgba(255,255,255,0.035); }
.ct .rank { color: var(--faint); width: 34px; }
.ct .name { font-family: var(--sans); }
.ct .name > span { display: inline-flex; align-items: center; gap: 10px; }
.ct .name img { width: 24px; height: 24px; border-radius: 50%; }
.ct .name b { font-weight: 600; }
.ct .name small { color: var(--faint); font: 12px var(--mono); margin-left: 2px; }
.ct .price { color: var(--text); }
.ct .price span { border-radius: 4px; padding: 1px 4px; margin-right: -4px; }
.star { all: unset; cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; color: var(--faint); border-radius: 6px; }
.star svg { width: 16px; height: 16px; }
.star:hover { color: var(--text); }
.star[aria-pressed="true"] { color: var(--amber); }
.star[aria-pressed="true"] svg path { fill: currentColor; }
.star:focus-visible { outline: 2px solid #9fb6ff; }
.ct .spark7 { width: 128px; height: 38px; display: block; margin-left: auto; }
.ct .mob { display: none; }

/* ---------- Memecoins ---------- */
.warn {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px; margin: 14px 0 0;
  border-radius: 12px; font-size: 14px; line-height: 1.45;
  color: #ffe2a8; background: rgba(242, 198, 109, 0.09); border: 1px solid rgba(242, 198, 109, 0.28);
}
.warn svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.dash > * { padding: 16px 18px; }
.c6 { grid-column: span 6; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; }
.wl li { grid-template-columns: 22px 1fr auto auto; }
.wl .spk { width: 80px; height: 24px; }
.news-mini article { padding: 10px 0; border-top: 1px solid rgba(170,195,255,0.07); }
.news-mini article:first-of-type { border-top: 0; padding-top: 2px; }
.news-mini h3 { margin: 0; font-size: 14.5px; line-height: 1.35; font-weight: 650; }
.news-mini p { margin: 5px 0 0; font-size: 13px; font-style: italic; color: var(--muted); line-height: 1.4; }
.news-mini .meta { font-size: 12px; color: var(--faint); margin-bottom: 3px; font-family: var(--mono); }

/* ---------- Κινητό ---------- */
@media (max-width: 900px) {
  .state { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash { grid-template-columns: 1fr; }
  .c6, .c3, .c4 { grid-column: auto; }
}
@media (max-width: 760px) {
  .tabs, .bar .status { display: none; }
  .bar { padding: 8px 16px; }
  .brand svg { width: 30px; height: 30px; }
  .brand b { font-size: 20px; }
  .state {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
    margin: 16px -16px 22px; padding: 4px 16px 14px; scrollbar-width: none;
  }
  .state::-webkit-scrollbar { display: none; }
  .state .float-card { flex: 0 0 82%; scroll-snap-align: center; min-height: 0; }
  .tools { padding: 10px 12px; }
  .tools h2 { width: 100%; margin: 0 0 2px 2px; }
  .search { flex: 1; min-width: 0; }
  .ct .d-only { display: none; }
  .ct td, .ct th { padding: 10px 6px; }
  .ct .name img { width: 26px; height: 26px; }
  .ct .name small { display: block; margin: 1px 0 0; }
  .ct .name b { display: block; font-size: 14.5px; }
  .ct .mob { display: block; font-size: 11.5px; margin-top: 2px; }
  .ct .spark7 { width: 64px; height: 28px; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(8, 12, 24, 0.86);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-top: 1px solid var(--edge);
  }
  .bottomnav a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px; border-radius: 10px;
    color: var(--faint); text-decoration: none; font-size: 11px; font-weight: 600;
  }
  .bottomnav a svg { width: 22px; height: 22px; }
  .bottomnav a[aria-current="page"] { color: var(--text); }
  .bottomnav a[aria-current="page"] svg { color: var(--bull); filter: drop-shadow(0 0 6px rgba(91,227,161,0.5)); }
}

@media (prefers-reduced-motion: reduce) {
  .float-card { animation: none; }
  .float-card[data-tilt] { transform: none; }
  #bg3d { transition: none; }
}

/* ===================== Προσθήκες για τη σελίδα (πέρα από το mockup) ===================== */
.view[hidden] { display: none; }
.blobs { z-index: -2; opacity: .55; }        /* εφεδρικό φόντο κάτω από το 3D */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 60; background: #0b1226; color: var(--text); padding: 8px 12px; border-radius: 8px; }
.site-foot { margin-top: 44px; }

.status[data-state="fallback"]::before { background: var(--amber); box-shadow: none; }
.status[data-state="connecting"]::before { background: var(--faint); box-shadow: none; }

.card-msg { color: var(--muted); font-size: 14px; margin: 6px 0 0; line-height: 1.45; }
.card-msg a { color: var(--text); }
.mini-h { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.card-foot-note { margin-top: 12px; font-size: 12.5px; color: var(--faint); font-family: var(--mono); }

.row-btn { cursor: pointer; border-radius: 8px; margin: 0 -6px; padding-left: 6px !important; padding-right: 6px !important; }
.row-btn:hover { background: rgba(255,255,255,0.045); }
.row-btn:focus-visible, .ct tr[data-id]:focus-visible { outline: 2px solid #9fb6ff; outline-offset: -2px; }
.ico { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,0.08); }

.spk polyline, .spark7 polyline { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spk-up { stroke: var(--bull); } .spk-down { stroke: var(--bear); }

.wl li { grid-template-columns: 22px minmax(0, 1fr) auto; }
.wl-right { display: flex; align-items: center; gap: 12px; }
.wl-spk { width: 80px; height: 24px; }
.wl .v { text-align: right; line-height: 1.3; }
.wl .sub { font-size: 12px; }

.th-btn { all: unset; cursor: pointer; }
.th-btn:focus-visible { outline: 2px solid #9fb6ff; border-radius: 4px; }
.empty-row { text-align: center !important; color: var(--muted); font-family: var(--sans) !important; padding: 28px 12px !important; white-space: normal !important; }
.seg-ico { width: 13px; height: 13px; vertical-align: -2px; }

.state.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.grid-tr .float-card { padding: 16px 18px; }
.span-2 { grid-column: span 2; }
.span-2 .mini { columns: 2; column-gap: 32px; }
.span-2 .mini li { break-inside: avoid; }

.updown { display: flex; justify-content: space-between; margin-top: 18px; font-size: 13px; font-family: var(--mono); }
.updown-bar { height: 8px; border-radius: 99px; background: rgba(255,107,125,0.55); margin-top: 6px; overflow: hidden; }
.updown-bar i { display: block; height: 100%; background: var(--bull); }

.sec-title { margin: 32px 2px 12px; font-size: 18px; font-weight: 700; }

.nea-layout { margin-top: 16px; }
@media (min-width: 1000px) {
  .nea-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
  .nea-layout .filters { position: sticky; top: 118px; }
  .nea-layout .chips { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
  .nea-layout .seg { grid-template-columns: 1fr 1fr; }
}

.news-mini h3 a { color: var(--text); text-decoration: none; }
.news-mini h3 a:hover { text-decoration: underline; }
.news-mini article.s-bullish .imp { color: color-mix(in srgb, var(--bull) 70%, #dfe6f5); }
.news-mini article.s-bearish .imp { color: color-mix(in srgb, var(--bear) 70%, #dfe6f5); }
.news-mini .more { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--edge-hi); }

.cp-id { align-items: center; }
.cp-icon { width: 28px; height: 28px; border-radius: 50%; }
.cp-src { margin: 8px 2px 0; font-size: 12.5px; color: var(--faint); }

@media (max-width: 760px) {
  .wrap { padding-bottom: 104px; }
  .grid-tr { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .span-2 .mini { columns: 1; }
  .wl-spk { width: 56px; }
  .lede .updated { font-size: 13.5px; }
}
/* μεγάλα ονόματα (π.χ. "Binance Bridged USDT ...") κόβονται με "…" */
.ct .name b { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
@media (max-width: 760px) { .ct .name b { max-width: 130px; } }
@media (max-width: 760px) {
  .ct td, .ct th { padding: 9px 4px; }
  .ct td:first-child, .ct th:first-child { padding-left: 8px; }
  .ct td:last-child, .ct th:last-child { padding-right: 10px; }
  .ct .name > span { gap: 8px; }
  .ct .name img { width: 24px; height: 24px; }
  .ct .name b { max-width: 96px; font-size: 14px; }
  .ct .price { font-size: 13px; }
  .ct .spark7 { width: 46px; }
  .star { width: 24px; }
}
