@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #07080d;
  --panel: rgba(17, 18, 24, 0.92);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f7f7fb;
  --muted: #a8b4c7;
  --muted-2: #74849e;
  --primary: #a855f7;
  --blue: #4f8cff;
  --danger: #fb7185;
  --warning: #facc15;
  --gold: #fbbf24;
  --orange: #fb923c;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
  --max: 1400px;
  font-family: "Sarabun", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 2%, rgba(168, 85, 247, 0.18), transparent 26rem),
    radial-gradient(circle at 90% 18%, rgba(79, 140, 255, 0.15), transparent 30rem),
    linear-gradient(180deg, #06070b 0%, #090a10 44%, #05060a 100%);
  font-size: 16px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 70%);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p { color: var(--muted); line-height: 1.72; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: clamp(2.05rem, 3.9vw, 3.9rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.05rem, 2.1vw, 1.55rem); letter-spacing: 0.04em; }
h3 { font-size: 1rem; }
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 9999; }
.app-shell { min-height: 100vh; background: transparent; }
.container { width: min(calc(100% - 3rem), var(--max)); margin: 0 auto; }
.site-main { min-height: 100vh; }
.lucide-icon { display: inline-grid; place-items: center; line-height: 0; color: currentColor; }

.navbar {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(calc(100% - 32px), var(--max));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.logo {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 27px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, rgba(21,22,29,.95), rgba(16,17,23,.88));
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(0,0,0,.36), inset 0 1px rgba(255,255,255,.08);
}
.logo-mark { position: relative; display: grid; place-items: center; width: 28px; height: 28px; }
.logo-mark::after { content: ""; position: absolute; inset: -5px; border-radius: 999px; background: radial-gradient(circle, rgba(168,85,247,.28), transparent 68%); opacity: .46; transform: scale(.78); animation: logoCatGlow 3.6s ease-in-out infinite; }
.logo-mark img { position: relative; z-index: 1; width: 24px; height: 24px; object-fit: contain; transform-origin: 50% 80%; animation: logoCatFloat 3.8s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(168,85,247,.22)); }
.logo:hover .logo-mark img, .logo:focus-visible .logo-mark img { animation: logoCatWiggle .72s ease-in-out both; filter: drop-shadow(0 0 12px rgba(168,85,247,.44)); }
.logo-text { font-weight: 800; font-size: 1.08rem; letter-spacing: .1em; }
.nav-actions { pointer-events: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn, .primary-btn, .ghost-btn, .danger-btn, .admin-chip, .load-more-link {
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
}
.icon-btn { width: 50px; height: 50px; display: grid; place-items: center; padding: 0; border-radius: 999px; background: rgba(20,21,27,.9); backdrop-filter: blur(14px); box-shadow: 0 16px 36px rgba(0,0,0,.28); }
.search-btn { color: #d9e4f6; }
.user-btn { width: 50px; min-width: 50px; color: #e9d5ff; border-color: rgba(168,85,247,.55); background: radial-gradient(circle at 50% 32%, rgba(168,85,247,.34), rgba(168,85,247,.12) 66%, rgba(20,21,27,.9)); box-shadow: 0 0 0 6px rgba(168,85,247,.1), 0 16px 42px rgba(168,85,247,.23); }
.admin-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: .8rem; font-weight: 800; letter-spacing: .06em; background: rgba(168,85,247,.14); border-color: rgba(168,85,247,.34); }
.primary-btn, .ghost-btn, .danger-btn { padding: .74rem 1rem; font-weight: 700; }
.primary-btn { background: linear-gradient(135deg, var(--primary), #4f8cff); border-color: transparent; color: white; }
.danger-btn { background: rgba(251,113,133,.12); border-color: rgba(251,113,133,.4); color: #fecdd3; }
button:hover, .clickable:hover, .logo:hover, .admin-chip:hover, .load-more-link:hover { transform: translateY(-1px); border-color: rgba(168,85,247,.44); box-shadow: 0 18px 44px rgba(0,0,0,.28), 0 0 30px rgba(168,85,247,.12); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(79,140,255,.55); outline-offset: 2px; }

.hero-slot { width: 100%; }
.hero-card {
  height: clamp(480px, 55vh, 620px);
  min-height: 480px;
  max-height: 620px;
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(7,8,13,.98), rgba(9,10,16,.74), rgba(9,10,16,.45)), var(--panel);
  box-shadow: inset 0 -4px 0 rgba(168,85,247,.72), inset 0 -7px 0 rgba(79,140,255,.75);
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .43; transform: scale(1.02); filter: saturate(1.1) brightness(1.12) contrast(1.05); }
.hero-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 72% 12%, rgba(79,140,255,.13), transparent 28rem), linear-gradient(90deg, rgba(5,6,10,.92), rgba(5,6,10,.62) 52%, rgba(5,6,10,.18)); }
.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100vw - 48px));
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .82rem;
  padding: 96px 0 48px;
  margin-left: max(24px, calc((100vw - var(--max)) / 2 + 24px));
}
.hero-title {
  max-width: min(680px, calc(100vw - 48px));
  font-size: clamp(1.88rem, 3.18vw, 2.95rem);
  line-height: 1.35;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: block;
  overflow: visible;
  text-shadow: 1.2px 1.2px 0 rgba(79,140,255,.32), 2px 2px 0 rgba(168,85,247,.16);
}
.hero-content-title-only { gap: .95rem; }
.hero-summary { max-width: 560px; margin: 0; color: #c1cee1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-date { margin: 0; color: #a6b7d0; }
.hero-controls { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .55rem; }
.hero-round-btn { width: 44px; height: 44px; padding: 0; display: inline-grid; place-items: center; border-radius: 999px; }

.eyebrow, .tag, .status-badge { display: inline-flex; align-items: center; gap: .4rem; width: fit-content; border-radius: 999px; padding: .28rem .6rem; font-size: .74rem; font-weight: 700; line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: #efe7ff; background: rgba(168,85,247,.14); border: 1px solid rgba(168,85,247,.28); }
.sponsored-tag { background: rgba(251,146,60,.16); color: #fed7aa; border-color: rgba(251,191,36,.55); }

.showcase-slot { margin-top: 50px; }
.arrivals-panel { padding: 28px 32px 32px; border: 1px solid var(--border-strong); border-radius: 26px; background: radial-gradient(circle at 84% 42%, rgba(79,140,255,.09), transparent 23rem), linear-gradient(135deg, rgba(18,19,25,.98), rgba(14,15,21,.98)); box-shadow: var(--shadow); }
.arrivals-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 26px; }
.arrivals-head h2 { font-size: .95rem; color: #f7f7fb; letter-spacing: .08em; }
.arrival-tabs { display: inline-grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; width: min(100%, 244px); padding: 5px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(0,0,0,.52); }
.arrival-tab { min-height: 44px; padding: 0 16px; border: 0; border-radius: 13px; color: #8da0bd; background: transparent; font-size: .82rem; font-weight: 900; letter-spacing: .03em; }
.arrival-tab[aria-selected="true"] { color: #fff; background: linear-gradient(135deg, rgba(168,85,247,.28), rgba(79,140,255,.12)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.24); }
.arrival-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 116px; gap: 28px; overflow-x: auto; padding: 12px 2px 12px; scroll-snap-type: x mandatory; }
.arrival-card { scroll-snap-align: start; display: grid; justify-items: center; gap: 10px; align-content: start; min-width: 0; padding: 0; border: 0; color: inherit; background: transparent; text-align: center; cursor: pointer; }
.arrival-image { width: 112px; height: 112px; padding: 0; border-radius: 16px; object-fit: cover; background: linear-gradient(135deg, rgba(168,85,247,.22), rgba(79,140,255,.14)); border: 1px solid rgba(255,255,255,.13); box-shadow: 0 12px 24px rgba(0,0,0,.26); }
.arrival-image-empty { display: grid; place-items: center; color: var(--muted); font-weight: 800; letter-spacing: .08em; }
.arrival-card strong { max-width: 112px; color: #dfe6f7; font-size: .86rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arrival-card:hover .arrival-image, .arrival-card:focus-visible .arrival-image { transform: scale(1.035); border-color: rgba(168,85,247,.44); box-shadow: 0 18px 34px rgba(0,0,0,.32), 0 0 28px rgba(168,85,247,.15); }
.arrival-image { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.arrival-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; }
.arrival-tags span { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: .72rem; font-weight: 600; }

.arrival-detail-backdrop { background: rgba(3,6,18,.84); backdrop-filter: blur(14px) saturate(1.08); }
.arrival-detail-panel { width: min(calc(100% - 2rem), 900px); overflow: hidden auto; background: linear-gradient(180deg, rgba(15,16,24,.98), rgba(8,10,16,.98)); }
.arrival-detail-body { padding: 0; }
.arrival-detail { color: var(--text); }
.arrival-detail-hero { position: relative; min-height: 270px; overflow: hidden; border-bottom: 1px solid var(--border); background: #0b0d14; }
.arrival-detail-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .28; filter: saturate(.95) contrast(1.05); transform: scale(1.03); }
.arrival-detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,10,16,.96), rgba(8,10,16,.72) 58%, rgba(8,10,16,.42)); }
.arrival-detail-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 1.2rem; align-items: center; min-height: 270px; padding: clamp(1rem,4vw,2rem); }
.arrival-detail-logo { width: 132px; height: 132px; padding: 12px; object-fit: contain; border: 1px solid rgba(255,255,255,.15); border-radius: 24px; background: linear-gradient(135deg, rgba(168,85,247,.22), rgba(79,140,255,.14)); box-shadow: 0 18px 38px rgba(0,0,0,.34); }
.arrival-detail-logo-empty { display: grid; place-items: center; color: var(--muted); font-weight: 900; letter-spacing: .08em; }
.arrival-detail-title-block { display: grid; gap: .8rem; min-width: 0; }
.arrival-detail-title-block h2 { font-size: clamp(1.65rem, 4vw, 2.65rem); letter-spacing: -.025em; line-height: 1.18; }
.arrival-detail-title-block p { max-width: 620px; margin: 0; color: #c3cee1; }
.arrival-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.arrival-detail-date { color: var(--muted); font-size: .86rem; font-weight: 700; }
.arrival-detail-content { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; padding: clamp(1rem,4vw,2rem); }
.arrival-detail-group { min-width: 0; padding: 1rem; border: 1px solid var(--border); border-radius: 20px; background: rgba(255,255,255,.045); }
.arrival-detail-links { grid-column: 1 / -1; }
.arrival-detail-group h3 { margin-bottom: .8rem; color: #f7f7fb; letter-spacing: .04em; }
.arrival-detail-chip-row { display: flex; flex-wrap: wrap; gap: .55rem; }
.arrival-detail-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 .72rem; border-radius: 999px; color: #dbeafe; background: rgba(79,140,255,.13); border: 1px solid rgba(79,140,255,.26); font-size: .8rem; font-weight: 800; }
.arrival-detail-chip.soft { color: #efe7ff; background: rgba(168,85,247,.12); border-color: rgba(168,85,247,.25); }
.arrival-detail-muted { margin: 0; color: var(--muted-2); font-size: .9rem; }
.arrival-detail-link-grid { display: flex; flex-wrap: wrap; gap: .7rem; }
.arrival-detail-link { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }

.main-grid { display: grid; grid-template-columns: minmax(0, 2.45fr) minmax(380px, .95fr); gap: 34px; align-items: start; margin-top: 48px; }
.feed-column { display: grid; gap: 54px; min-width: 0; }
.edition-section { display: grid; gap: 18px; }
.edition-label { color: #8ba0bd; font-size: .82rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.news-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; grid-auto-rows: 1fr; }
.news-card { width: 100%; height: 100%; min-height: 286px; overflow: hidden; text-align: left; border: 1px solid var(--border); border-radius: 13px; color: var(--text); background: linear-gradient(180deg, rgba(21,23,31,.96), rgba(14,15,21,.98)); backdrop-filter: blur(14px); box-shadow: 0 18px 40px rgba(0,0,0,.34); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; display: grid; grid-template-rows: 140px 1fr; padding: 0; }
.news-card:hover { transform: translateY(-4px); border-color: rgba(168,85,247,.44); box-shadow: 0 24px 55px rgba(0,0,0,.42); }
.news-image { width: 100%; height: 140px; object-fit: cover; background: #111827; }
.news-body { padding: 11px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 7px; min-height: 0; }
.news-body h3 { color: #f7f7fb; font-size: .88rem; line-height: 1.36; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-body p { margin: 0; font-size: .78rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; color: var(--muted); font-size: .74rem; }
.news-stats { align-self: end; display: flex; flex-wrap: wrap; align-items: center; gap: .68rem; color: var(--muted); font-weight: 600; font-size: .76rem; }
.stat-item { display: inline-flex; align-items: center; gap: .25rem; }
.stat-date { margin-right: auto; color: #92a2ba; }
.stat-icon { color: #aab7cc; }
.tag-row { display: flex; flex-wrap: wrap; gap: .34rem; align-content: start; }
.tag { font-size: .7rem; padding: .16rem .44rem; border-radius: 999px; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: #cbd5e1; letter-spacing: .01em; }
.load-area { display: grid; place-items: center; padding: 10px 0 0; }
.load-more-link { border: 0; color: #8ba0bd; background: transparent; font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

.sponsored-news-card {
  border-color: rgba(251,191,36,.62);
  background:
    radial-gradient(circle at 100% 0%, rgba(251,146,60,.16), transparent 11rem),
    linear-gradient(180deg, rgba(42,31,17,.98), rgba(16,15,14,.98));
  box-shadow: 0 20px 52px rgba(251,146,60,.12), 0 18px 40px rgba(0,0,0,.34);
}
.sponsored-news-card:hover {
  border-color: rgba(251,191,36,.9);
  box-shadow: 0 24px 64px rgba(251,146,60,.22), 0 24px 55px rgba(0,0,0,.42);
}
.sponsored-news-card .news-image { border-bottom: 1px solid rgba(251,191,36,.24); }
.sponsored-stats { color: #fed7aa; }

.trending-panel { position: sticky; top: 110px; display: grid; gap: 18px; padding: 25px; border: 1px solid rgba(255,255,255,.09); border-radius: 26px; background: radial-gradient(circle at 100% 0%, rgba(255,79,134,.1), transparent 18rem), linear-gradient(135deg, rgba(25,17,24,.98), rgba(15,15,20,.98)); box-shadow: var(--shadow); }
.trending-title { display: flex; align-items: center; gap: .7rem; width: 100%; color: #ef4444; }
.trending-title .trending-flame { flex: 0 0 auto; color: #ef4444; filter: drop-shadow(0 0 12px rgba(239,68,68,.34)); }
.trending-title h2 { min-width: 0; color: #f8fafc; font-size: clamp(.95rem, 1.35vw, 1.12rem); font-weight: 900; letter-spacing: .08em; line-height: 1; white-space: nowrap; }
.tabs.trending-switch { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; padding: 5px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(0,0,0,.52); }
.tab-btn { min-height: 44px; border: 0; border-radius: 13px; color: #8da0bd; background: transparent; font-size: .82rem; font-weight: 900; letter-spacing: .03em; }
.tab-btn[aria-selected="true"] { color: #fff; background: linear-gradient(135deg, rgba(168,85,247,.28), rgba(79,140,255,.12)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.24); }
.tab-label, .vote-btn { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; }
.rank-list { display: grid; gap: 12px; }
.rank-item { position: relative; display: grid; grid-template-columns: 30px 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 74px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; background: rgba(255,255,255,.055); overflow: hidden; }
.rank-item > * { position: relative; z-index: 1; }
.rank-number { display: inline-flex; align-items: center; justify-content: center; width: 30px; color: var(--warning); font-size: 1.34rem; font-style: italic; font-weight: 900; line-height: 1; text-align: center; }
.rank-logo-frame { width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.035)); box-shadow: 0 10px 22px rgba(0,0,0,.24); }
.rank-logo { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; padding: 6px; object-fit: contain; object-position: center; border-radius: 13px; background: transparent; }
.rank-logo-empty { display: grid; place-items: center; color: var(--muted); }
.rank-content { min-width: 0; display: grid; gap: 4px; }
.rank-item strong { display: block; min-width: 0; color: #fff; font-size: .96rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-item small { display: block; min-width: 0; color: #9fb0c8; font-size: .78rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trending-panel .rank-item, .trending-overlay-shell .rank-item { grid-template-columns: 28px 54px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
.trending-panel .rank-logo-frame, .trending-overlay-shell .rank-logo-frame { width: 54px; height: 54px; }
.trending-panel .rank-item strong, .trending-overlay-shell .rank-item strong { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.trending-panel .rank-item small, .trending-overlay-shell .rank-item small { white-space: normal; overflow: visible; text-overflow: clip; }
.rank-trend { display: inline-flex !important; align-items: center; gap: .28rem; font-weight: 400; letter-spacing: .02em; }
.rank-trend-symbol { font-size: .72rem; line-height: 1; font-weight: 400; }
.rank-trend-up { color: #34d399 !important; }
.rank-trend-down { color: #fb7185 !important; }
.rank-trend-same { color: #e5e7eb !important; }
.rank-item .vote-btn { min-width: 52px; min-height: 42px; padding: .48rem .62rem; border-radius: 13px; font-size: .8rem; font-weight: 900; background: rgba(255,255,255,.07); }
.trending-view-all { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; width: 100%; border-radius: 15px; color: #dbeafe; font-size: .78rem; font-weight: 900; letter-spacing: .09em; background: linear-gradient(135deg, rgba(168,85,247,.16), rgba(79,140,255,.08)); }
.trending-view-all:hover { color: #fff; border-color: rgba(168,85,247,.58); background: linear-gradient(135deg, rgba(168,85,247,.24), rgba(79,140,255,.13)); }

.rank-top {
  border-color: rgba(255,255,255,.16);
}
.rank-top::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .36;
}
.rank-top-1 {
  border-color: rgba(251,191,36,.58);
  background: linear-gradient(135deg, rgba(80,58,22,.72), rgba(255,255,255,.055));
}
.rank-top-1::before { background: radial-gradient(circle at 0% 0%, rgba(251,191,36,.36), transparent 12rem); }
.rank-top-1 .rank-number { color: #facc15; text-shadow: 0 0 16px rgba(250,204,21,.5); }
.rank-top-2 {
  border-color: rgba(203,213,225,.48);
  background: linear-gradient(135deg, rgba(68,75,91,.54), rgba(255,255,255,.055));
}
.rank-top-2::before { background: radial-gradient(circle at 0% 0%, rgba(203,213,225,.26), transparent 12rem); }
.rank-top-2 .rank-number { color: #e2e8f0; text-shadow: 0 0 14px rgba(226,232,240,.34); }
.rank-top-3 {
  border-color: rgba(251,146,60,.5);
  background: linear-gradient(135deg, rgba(82,45,21,.54), rgba(255,255,255,.055));
}
.rank-top-3::before { background: radial-gradient(circle at 0% 0%, rgba(251,146,60,.28), transparent 12rem); }
.rank-top-3 .rank-number { color: #fb923c; text-shadow: 0 0 14px rgba(251,146,60,.36); }

.overlay-panel.trending-overlay-panel { width: min(100%, 760px); border-color: rgba(255,255,255,.12); background: radial-gradient(circle at 100% 0%, rgba(255,79,134,.13), transparent 19rem), linear-gradient(135deg, rgba(25,17,24,.98), rgba(15,15,20,.98)); }
.overlay-body.trending-overlay-body { padding: 0; }
.trending-overlay-shell { display: grid; gap: 18px; padding: 25px; }
.trending-overlay-title { padding: 0 .25rem; }
.trending-search-wrap { display: grid; }
.trending-search-input { width: 100%; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; color: #fff; background: rgba(0,0,0,.28); padding: .85rem 1rem; outline: none; }
.trending-search-input:focus { border-color: rgba(168,85,247,.65); box-shadow: 0 0 0 4px rgba(168,85,247,.12); }
.trending-overlay-list { max-height: min(62vh, 660px); overflow: auto; padding-right: 4px; }
.trending-overlay-rank { min-height: 82px; }

.overlay-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.72); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 1rem; animation: fadeIn .18s ease; }
.overlay-panel { width: min(100%, 1060px); max-height: min(90vh, 980px); overflow: auto; border: 1px solid rgba(148,163,184,.25); border-radius: 28px; background: #0d1020; box-shadow: var(--shadow); animation: panelIn .22s ease; }
.overlay-panel.narrow { width: min(100%, 520px); }
.overlay-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; background: rgba(13,16,32,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.overlay-body { padding: clamp(1rem,4vw,2rem); }

.article-reader-modal .overlay-head { position: absolute; right: 1rem; top: 1rem; padding: 0; border: 0; background: transparent; backdrop-filter: none; }
.article-reader-modal .overlay-head h2 { display: none; }
.article-reader-modal .overlay-panel { position: relative; overflow: hidden auto; background: #0b0d12; }
.article-reader-modal .overlay-body { padding: 0; }
.article-reader { display: grid; background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)); }
.article-reader-cover-wrap { position: relative; overflow: hidden; max-height: 420px; border-bottom: 1px solid rgba(255,255,255,.08); }
.article-reader-cover-wrap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(11,13,18,.92)); }
.article-cover { width: 100%; height: min(42vw, 420px); object-fit: cover; margin: 0; }
.article-reader-inner { padding: clamp(1.25rem, 4vw, 3rem); display: grid; gap: 1rem; }
.article-title { font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.16; letter-spacing: -.025em; }
.article-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .8rem; color: #9fb0c8; font-size: .86rem; }
.article-action-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .3rem; }
.article-action-btn { display: inline-flex; align-items: center; gap: .5rem; }
.article-content { font-size: 1.02rem; line-height: 1.86; color: #d7e1ef; }
.article-content > *:first-child { margin-top: 0; }
.article-content > *:last-child { margin-bottom: 0; }
.article-content p { margin: 0 0 1.05rem; color: #d7e1ef; }
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 { margin: 1.65rem 0 .8rem; color: #fff; line-height: 1.28; letter-spacing: -.015em; }
.article-content h2 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); }
.article-content h3 { font-size: clamp(1.12rem, 1.8vw, 1.42rem); }
.article-content ul,
.article-content ol { margin: 0 0 1.2rem; padding-left: 1.45rem; color: #d7e1ef; }
.article-content li { margin: .38rem 0; padding-left: .25rem; }
.article-content a { color: #93c5fd; text-decoration: underline; text-decoration-color: rgba(147,197,253,.45); text-underline-offset: 3px; }
.article-content a:hover { color: #bfdbfe; text-decoration-color: rgba(191,219,254,.72); }
.article-content blockquote {
  position: relative;
  margin: 1.55rem 0;
  padding: 1.15rem 1.25rem 1.15rem 1.55rem;
  border: 1px solid rgba(168,85,247,.34);
  border-left: 5px solid #a855f7;
  border-radius: 20px;
  color: #edf2ff;
  background: radial-gradient(circle at 0% 0%, rgba(168,85,247,.22), transparent 17rem), linear-gradient(135deg, rgba(88,28,135,.34), rgba(15,23,42,.58));
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 18px 42px rgba(0,0,0,.18);
}
.article-content blockquote::before {
  content: "“";
  position: absolute;
  top: -.12rem;
  left: .72rem;
  color: rgba(216,180,254,.48);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.article-content blockquote p { margin: 0; color: #edf2ff; }
.article-content code {
  padding: .16rem .42rem;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 8px;
  color: #dbeafe;
  background: rgba(15,23,42,.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .92em;
}
.article-content pre {
  display: block;
  width: 100%;
  margin: 1.45rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid rgba(79,140,255,.28);
  border-radius: 18px;
  color: #dbeafe;
  background: linear-gradient(180deg, rgba(15,23,42,.96), rgba(2,6,23,.96));
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 18px 42px rgba(0,0,0,.2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .92rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.article-content pre code {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
}
.article-content img { border-radius: 18px; margin: 1rem 0; }
.article-sponsored-section .section-head { margin-bottom: 1rem; }

.comment-section { display: grid; gap: 1rem; }
.comment-section-head { margin-bottom: 0; }
.comment-compose { display: grid; gap: .8rem; padding: 1rem; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: rgba(255,255,255,.035); }
.comment-compose textarea { min-height: 110px; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(0,0,0,.18); color: var(--text); padding: .9rem 1rem; resize: vertical; }
.comment-submit-btn, .comment-icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; width: fit-content; }
.comments { display: grid; gap: 1rem; margin-top: .5rem; }
.comment { display: grid; gap: .7rem; padding: 1rem; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.04); }
.comment p { margin: 0; color: #d8e2f0; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .7rem; color: #93a4bc; font-size: .8rem; }
.comment-reply-box { display: grid; gap: .6rem; margin-top: .2rem; }
.comment-reply-box textarea { min-height: 82px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(0,0,0,.16); color: var(--text); padding: .75rem .85rem; resize: vertical; }
.comment-replies { margin-top: .4rem; }
.reply { margin-left: 1rem; padding-left: 1rem; border-left: 2px solid rgba(168,85,247,.4); }

.form-grid { display: grid; gap: .85rem; }
.field { display: grid; gap: .4rem; }
.field label { color: #dbeafe; font-weight: 700; font-size: .92rem; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.06); color: var(--text); padding: .8rem .9rem; }
.field textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; }
.upload-zone { display: grid; place-items: center; min-height: 140px; border: 1px dashed rgba(168,85,247,.55); border-radius: 18px; background: rgba(168,85,247,.08); text-align: center; padding: 1rem; }
.upload-zone.dragover { background: rgba(79,140,255,.12); border-color: var(--blue); }
.preview { max-height: 220px; border-radius: 16px; margin-top: .7rem; object-fit: cover; }

.admin-layout { padding-top: 7.4rem; display: grid; grid-template-columns: 285px minmax(0,1fr); gap: 1.2rem; }
.admin-sidebar { position: sticky; top: 7.4rem; align-self: start; padding: 1rem; border-radius: 26px; background: radial-gradient(circle at 0% 0%, rgba(168,85,247,.16), transparent 16rem), rgba(15,17,25,.92); box-shadow: 0 22px 60px rgba(0,0,0,.28); }
.admin-sidebar h2 { margin: 0 0 1rem; padding: .35rem .5rem .85rem; border-bottom: 1px solid var(--border); color: #fff; letter-spacing: .09em; text-transform: uppercase; }
.admin-nav { display: grid; gap: .55rem; }
.admin-nav button { width: 100%; text-align: left; justify-content: flex-start; border-radius: 15px; color: #bdc8da; background: rgba(255,255,255,.045); }
.admin-nav button:hover { color: #fff; background: rgba(168,85,247,.16); }
.admin-main { display: grid; gap: 1rem; min-width: 0; }
.section { margin-top: 2rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; padding: 1.1rem 1.2rem; border: 1px solid var(--border); border-radius: 22px; background: rgba(15,17,25,.78); }
.section-head p { margin: .3rem 0 0; color: #8ea0bb; }
.admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.admin-card { padding: 1.1rem; border-radius: 22px; background: linear-gradient(180deg, rgba(24,27,39,.96), rgba(14,16,24,.96)); box-shadow: 0 18px 46px rgba(0,0,0,.22); }
.admin-card h2 { color: #fff; font-size: 2rem; letter-spacing: -.03em; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 680px; }
th, td { text-align: left; padding: .9rem; border-bottom: 1px solid rgba(255,255,255,.075); color: var(--muted); vertical-align: middle; }
th { position: sticky; top: 0; z-index: 1; color: #e9edf7; background: rgba(20,22,32,.96); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: rgba(168,85,247,.06); }
td strong { color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.actions .ghost-btn, .actions .danger-btn { padding: .56rem .72rem; border-radius: 12px; font-size: .78rem; }
.admin-main select { border: 1px solid var(--border); border-radius: 12px; color: #fff; background: #121622; padding: .55rem .7rem; }

.empty-state { padding: 2rem; border: 1px dashed var(--border); border-radius: var(--radius); text-align: center; color: var(--muted); background: rgba(255,255,255,.03); }
.empty-state.compact { padding: 1rem; min-height: 96px; display: grid; place-items: center; }
.toast-root { position: fixed; right: 1rem; bottom: 1rem; z-index: 200; display: grid; gap: .7rem; }
.toast { padding: .9rem 1rem; border-radius: 16px; background: #111827; border: 1px solid var(--border); box-shadow: var(--shadow); max-width: 340px; }
.toast.success { border-color: rgba(52,211,153,.5); }
.toast.error { border-color: rgba(251,113,133,.5); }

.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 76px;
  padding: 42px 24px;
  color: var(--muted-2);
  background: #020307;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .76rem;
  letter-spacing: .06em;
}
.footer-brand { display: inline-flex; align-items: center; gap: .7rem; justify-self: start; }
.footer-brand img { width: 24px; height: 24px; opacity: .22; }
.footer-brand strong { color: rgba(247,247,251,.75); font-size: 1rem; letter-spacing: .14em; }
.footer-copy { display: grid; gap: .35rem; text-align: center; }
.footer-socials { justify-self: end; display: inline-flex; align-items: center; gap: .7rem; }
.footer-socials a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: #9aa8bf;
  background: rgba(255,255,255,.035);
  transition: transform .2s ease, color .2s ease, border-color .2s ease, background .2s ease;
}
.footer-socials a:hover {
  transform: translateY(-2px);
  color: #fff;
  border-color: rgba(168,85,247,.5);
  background: rgba(168,85,247,.14);
}
.hidden { display: none !important; }
.avatar { width: 38px; height: 38px; border-radius: 999px; object-fit: cover; background: rgba(168,85,247,.18); }
.badge-row { display: flex; flex-wrap: wrap; gap: .5rem; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes panelIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes logoCatFloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 45% { transform: translateY(-2px) rotate(-2deg); } 70% { transform: translateY(1px) rotate(1.5deg); } }
@keyframes logoCatGlow { 0%, 100% { opacity: .3; transform: scale(.78); } 50% { opacity: .62; transform: scale(1); } }
@keyframes logoCatWiggle { 0%, 100% { transform: translateY(0) rotate(0deg) scale(1); } 22% { transform: translateY(-2px) rotate(-9deg) scale(1.06); } 46% { transform: translateY(1px) rotate(8deg) scale(1.04); } 70% { transform: translateY(-1px) rotate(-4deg) scale(1.03); } }

@media (max-width: 1180px) {
  .main-grid { grid-template-columns: minmax(0,2fr) minmax(340px,1fr); }
  .news-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .admin-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 920px) {
  .main-grid, .admin-layout { grid-template-columns: 1fr; }
  .trending-panel, .admin-sidebar { position: static; }
  .hero-card { height: 430px; min-height: 430px; }
  .hero-content { width: min(calc(100% - 40px), 680px); margin-left: 20px; }
  .hero-title { font-size: clamp(1.72rem, 5.6vw, 2.55rem); }
  .footer { grid-template-columns: 1fr; text-align: center; }
  .footer-brand, .footer-socials { justify-self: center; }
}
@media (max-width: 680px) {
  .container { width: min(calc(100% - 1.4rem), var(--max)); }
  .navbar { top: 14px; width: calc(100% - 20px); }
  .logo { min-height: 50px; padding: 0 16px; gap: 10px; }
  .logo-text { font-size: .98rem; letter-spacing: .08em; }
  .icon-btn { width: 48px; height: 48px; }
  .admin-chip { display: none; }
  .hero-card { height: 390px; min-height: 390px; }
  .hero-content { padding-top: 92px; padding-left: 0; padding-right: 0; }
  .hero-title { font-size: clamp(1.55rem, 7.2vw, 2.1rem); line-height: 1.28; }
  .hero-summary { -webkit-line-clamp: 2; }
  .arrivals-panel { padding: 22px 18px 24px; border-radius: 22px; }
  .arrivals-head { align-items: stretch; flex-direction: column; }
  .arrival-tabs { width: 100%; }
  .arrival-scroll { grid-auto-columns: 104px; gap: 22px; }
  .arrival-image { width: 100px; height: 100px; }
  .arrival-detail-hero-inner { grid-template-columns: 1fr; align-items: start; min-height: 0; }
  .arrival-detail-logo { width: 112px; height: 112px; }
  .arrival-detail-content { grid-template-columns: 1fr; }
  .news-grid, .admin-grid, .form-row { grid-template-columns: 1fr; }
  .news-card { min-height: 300px; grid-template-rows: 152px 1fr; }
  .news-image { height: 152px; }
  .trending-panel { padding: 24px 18px; }
  .section-head { align-items: stretch; flex-direction: column; }
  .article-reader-inner { padding: 1.2rem; }
  .article-cover { height: 260px; }
  .overlay-backdrop { padding: .5rem; align-items: end; }
  .overlay-panel { max-height: 94vh; border-radius: 24px 24px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-mark::after,
  .logo-mark img,
  .logo:hover .logo-mark img,
  .logo:focus-visible .logo-mark img { animation: none; }
}