/* ==========================================================================
   Pons Hub — token market ranking theme
   Palette: dark #0f0f0f..#1b1b1b | accent #FF9000 | text #fff / #A0A0A0
   ========================================================================== */

:root {
  --bg-page: #0f0f0f;
  --bg-body: #1b1b1b;
  --bg-elevated: #202020;
  --bg-hover: #2a2a2a;
  --bg-inset: #161616;
  --accent: #ff9000;
  --accent-strong: #e67f00;
  --accent-soft: rgba(255, 144, 0, 0.14);
  --gold: #ffb43a;
  --text: #ffffff;
  --text-muted: #a0a0a0;
  --text-dim: #6f6f6f;
  --border: #2c2c2c;
  --badge-bg: rgba(0, 0, 0, 0.8);
  --verified: #3ea6ff;
  --pos: #22c55e;
  --neg: #ef4444;
  --radius: 8px;
  --header-h: 112px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-body);
  background-image: radial-gradient(1200px 500px at 70% -10%, #232323 0%, transparent 60%),
                    linear-gradient(180deg, var(--bg-body) 0%, var(--bg-page) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; flex: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   1. HEADER BAR — fixed double-decker
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

/* ---- Top utility row ---- */
.header-top {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-logo {
  display: block;
  height: 34px;
  width: auto;
  border-radius: 6px;
}

/* ---- Search bar ---- */
.search-bar {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon {
  display: grid;
  place-items: center;
  padding: 0 4px 0 14px;
  color: var(--text-muted);
}

.search-bar input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  padding: 10px 6px;
}

.search-bar input::placeholder { color: var(--text-dim); }

.search-btn {
  display: grid;
  place-items: center;
  align-self: stretch;
  width: 52px;
  border: none;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #111;
  transition: filter 0.15s ease;
}

.search-btn:hover { filter: brightness(1.1); }

/* ---- Header actions ---- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  transition: transform 0.1s ease, filter 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-upload {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-upload:hover { background: var(--bg-hover); }

.btn-upgrade {
  background: linear-gradient(135deg, #ffb43a 0%, #ff9000 60%, #f07f00 100%);
  color: #111;
  box-shadow: 0 3px 12px rgba(255, 144, 0, 0.35);
}

.btn-upgrade:hover { filter: brightness(1.07); }

.lang-select {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.lang-select:hover { background: var(--bg-hover); }
.lang-select .chev { color: var(--text-muted); }

.auth-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  margin-left: 4px;
}

.auth-sep { color: var(--text-dim); }

.auth-login { color: var(--text-muted); }
.auth-login:hover { color: var(--text); }

.auth-signup { color: var(--accent); }
.auth-signup:hover { text-decoration: underline; }

/* ---- Secondary navigation bar ---- */
.main-nav {
  border-top: 1px solid var(--border);
  background: rgba(20, 20, 20, 0.9);
}

.nav-list {
  display: flex;
  align-items: stretch;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar { display: none; }

.nav-item { position: relative; flex: none; }

.nav-item a {
  display: block;
  padding: 12px 18px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-item a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease;
}

.nav-item:hover a { color: var(--text); }
.nav-item.active a { color: var(--accent); }
.nav-item.active a::after,
.nav-item:hover a::after { transform: scaleX(1); }

/* ==========================================================================
   2. NOTICE / BANNER STRIP
   ========================================================================== */

.notice-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 20px;
  background: linear-gradient(90deg, rgba(255, 144, 0, 0.16), rgba(255, 144, 0, 0.05));
  border-bottom: 1px solid var(--border);
}

.notice-text {
  font-size: 13.5px;
  color: #e8e8e8;
  text-align: center;
}

.notice-emoji { margin-right: 6px; }

.notice-dismiss {
  position: absolute;
  right: 18px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.notice-dismiss:hover { background: var(--bg-hover); color: var(--text); }

.notice-bar.is-hidden { display: none; }

/* ==========================================================================
   3. PAGE LAYOUT
   ========================================================================== */

.page-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 28px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  align-items: start;
}

/* ==========================================================================
   4. LEFT FILTER SIDEBAR
   ========================================================================== */

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  display: flex;
  flex-direction: column;
  gap: 26px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.filter-section { display: flex; flex-direction: column; gap: 12px; }

.filter-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Production filter (segmented toggle) ---- */
.production-toggle {
  display: flex;
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 3px;
}

.prod-btn {
  flex: 1;
  padding: 7px 6px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.prod-btn:hover { color: var(--text); }
.prod-btn.active {
  background: var(--accent);
  color: #111;
  box-shadow: 0 2px 8px rgba(255, 144, 0, 0.35);
}

/* ---- Duration dual-handle slider ---- */
.dual-range {
  position: relative;
  height: 30px;
  margin: 6px 0 2px;
}

.range-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 5px;
  transform: translateY(-50%);
  background: var(--bg-elevated);
  border-radius: 999px;
}

.range-fill {
  position: absolute;
  top: 50%;
  height: 5px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  border-radius: 999px;
}

.range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
  outline: none;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: grab;
  transition: transform 0.1s ease;
}

.range-input::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.15); }

.range-input::-moz-range-thumb {
  pointer-events: auto;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: grab;
}

.duration-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-dim);
}

.duration-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* ---- Category list ---- */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-hover) transparent;
}

.category-list::-webkit-scrollbar { width: 6px; }
.category-list::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 999px; }

.category-item { display: block; }

.category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}

.category-link:hover { background: var(--bg-elevated); color: var(--text); }

.category-link.active {
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-soft);
}

.category-count {
  font-size: 11.5px;
  color: var(--text-dim);
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 1px 8px;
}

.category-link.active .category-count { color: var(--accent); }

/* ==========================================================================
   5. MAIN CONTENT AREA
   ========================================================================== */

.main-content { min-width: 0; }

/* ---- Toolbar ---- */
.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.toolbar-left { display: flex; align-items: baseline; gap: 12px; }

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 18px;
  margin-right: 10px;
  vertical-align: -2px;
  border-radius: 3px;
  background: var(--accent);
}

.result-count {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Quality toggle (segmented) ---- */
.quality-toggle {
  display: flex;
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 3px;
}

.quality-btn {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.quality-btn:hover { color: var(--text); }
.quality-btn.active {
  background: var(--accent);
  color: #111;
}

/* ---- Sort select ---- */
.sort-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label-text {
  font-size: 12.5px;
  color: var(--text-dim);
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-elevated) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a0a0a0' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 32px 8px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.sort-select:hover { border-color: var(--accent); }
.sort-select option { background: var(--bg-elevated); color: var(--text); }

/* ==========================================================================
   6. VIDEO CARD GRID
   ========================================================================== */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 22px 18px;
}

.video-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.video-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 144, 0, 0.45);
  box-shadow: var(--shadow);
}

/* ---- Thumbnail container (16:9) with overlay badges ---- */
.thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 2px solid rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  z-index: 1;
}

.video-card:hover .thumb-play {
  opacity: 1;
  background: rgba(255, 144, 0, 0.9);
  border-color: var(--accent);
  color: #111;
}

.thumb-badge {
  position: absolute;
  bottom: 8px;
  z-index: 1;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #fff;
  background: var(--badge-bg);
  border-radius: 4px;
}

.thumb-badge--hd { left: 8px; color: var(--accent); }
.thumb-badge--dur { right: 8px; }

/* ---- Card body ---- */
.card-body { display: flex; flex-direction: column; gap: 7px; padding: 11px 12px 13px; flex: 1; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title a { color: var(--text); transition: color 0.12s ease; }
.card-title a:hover { color: var(--accent); }

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
}

.meta-rating { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 700; }

.meta-verified {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-left: 2px;
  border-radius: 50%;
  background: var(--verified);
  color: #0b0b0b;
  font-size: 10px;
  font-weight: 800;
}

/* ==========================================================================
   7. AD PLACEHOLDER SLOT
   ========================================================================== */

.ad-slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border: 1.5px dashed #3a3a3a;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 10px, transparent 10px 20px),
    rgba(255, 255, 255, 0.02);
  text-align: center;
}

.ad-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 10px;
}

.ad-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 3px 10px;
}

.ad-size { font-size: 12px; color: var(--text-dim); }
.ad-slot .ad-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

/* ==========================================================================
   7b. TOKEN CARD VARIANT
   ========================================================================== */

.thumb {
  background-color: var(--bg-elevated);
}

.thumb-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: #101010;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.thumb-logo--fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.thumb-badge--rank {
  top: 8px;
  left: 8px;
  bottom: auto;
  color: #ff9000;
}

.thumb-badge--chg {
  right: 8px;
  bottom: 8px;
}

.chg-pos { color: #22c55e; }
.chg-neg { color: #ef4444; }

.thumb-badge--launchpad {
  left: 8px;
  bottom: 8px;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.6px;
}

.token-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

.token-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}

.stat { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.stat-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
}

.stat-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value.mcap { color: var(--accent); }

.card-meta .meta-verified { margin-left: 0; }

/* ==========================================================================
   8. EMPTY STATE + FOOTER
   ========================================================================== */

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 15px;
  background: var(--bg-inset);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.site-footer {
  text-align: center;
  padding: 28px 20px;
  color: var(--text-dim);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1180px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .category-list { max-height: none; }
}

@media (max-width: 900px) {
  .sidebar { grid-template-columns: 1fr; }
  .header-actions { gap: 8px; }
  .btn span, .btn { padding: 8px 12px; }
  .auth-links { display: none; }
}

@media (max-width: 700px) {
  .header-top { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .search-bar { order: 3; max-width: none; flex-basis: 100%; }
  .lang-select { display: none; }
  .btn-upgrade { display: none; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px 12px; }
  .page-layout { padding: 16px 12px; }
  .content-toolbar { flex-direction: column; align-items: flex-start; }
}
