/* ============================================================
   assets/css/main.css  –  Public site styles
   ============================================================ */

:root {
  --bg:      #0d0d14;
  --bg2:     #13131f;
  --bg3:     #1a1a2a;
  --card:    #16162a;
  --border:  rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --accent:  #f5c842;
  --accent2: #ff6b6b;
  --accent3: #6be0ff;
  --text:    #f0f0ff;
  --muted:   #8888aa;
  --dim:     #555570;
  --green:   #4ade80;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,13,20,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.25rem;
  color: var(--accent); text-decoration: none;
}
nav ul { display: flex; gap: 1.5rem; list-style: none; }
nav ul a {
  color: var(--muted); text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  transition: color .2s;
}
nav ul a:hover { color: var(--text); }
.nav-badge {
  background: var(--accent); color: #000;
  font-size: 0.6rem; font-weight: 700;
  padding: 1px 5px; border-radius: 20px;
  margin-left: 3px; vertical-align: middle;
}

/* ── HERO ── */
.hero {
  padding: 4rem 2rem 2.5rem;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: rgba(245,200,66,0.12);
  border: 1px solid rgba(245,200,66,0.3);
  color: var(--accent);
  font-size: 0.72rem; font-weight: 600;
  padding: 4px 14px; border-radius: 20px;
  margin-bottom: 1.2rem;
  text-transform: uppercase; letter-spacing: 0.5px;
}
h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { font-size: 1rem; color: var(--muted); max-width: 580px; margin: 0 auto 2rem; }

.stats-bar {
  display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap;
  padding: 1.4rem 2rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 2.5rem;
}
.stat { text-align: center; }
.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--accent); display: block;
}
.stat-label { font-size: 0.75rem; color: var(--muted); }

/* ── LAYOUT ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 4rem; }
.two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}
.sidebar { position: sticky; top: 80px; }
.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}
.sidebar-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.8px; margin-bottom: 1rem;
}

/* ── SEARCH ── */
.search-wrap {
  max-width: 540px; margin: 0 auto 2rem;
  position: relative;
}
.search-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); font-size: 1rem;
  pointer-events: none;
}
#searchInput {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 13px 14px 13px 42px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#searchInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,200,66,0.12);
}
#searchInput::placeholder { color: var(--dim); }

/* ── FILTERS ── */
.filter-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 2rem;
}
.filter-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 16px; border-radius: 8px;
  font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: all .2s;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none; display: inline-block;
}
.filter-btn:hover { border-color: var(--border2); color: var(--text); }
.filter-btn.active {
  background: var(--accent); border-color: var(--accent);
  color: #000; font-weight: 600;
}

/* ── SECTION HEADER ── */
.section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 1.2rem; padding: 0 0.2rem;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem; font-weight: 700;
}
.section-line { flex: 1; height: 1px; background: var(--border); }
.section-count {
  font-size: 0.72rem; color: var(--muted);
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 2px 10px; border-radius: 20px;
}

/* ── GAMES GRID ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 12px;
}
.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1rem;
  cursor: pointer;
  transition: all .22s;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative; overflow: hidden;
}
.game-card:hover {
  border-color: rgba(245,200,66,0.35);
  transform: translateY(-2px);
  background: var(--bg3);
}
.game-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  background: rgba(255,255,255,0.05);
}
.game-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.88rem; font-weight: 700;
  margin-bottom: 3px;
}
.game-reward { font-size: 0.73rem; color: var(--muted); margin-bottom: 0.7rem; }
.game-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.link-count {
  background: rgba(245,200,66,0.12);
  color: var(--accent);
  border: 1px solid rgba(245,200,66,0.2);
  font-size: 0.68rem; font-weight: 600;
  padding: 2px 7px; border-radius: 5px;
}
.click-count { font-size: 0.68rem; color: var(--dim); }
.hot-badge {
  background: rgba(255,107,107,0.15);
  color: var(--accent2);
  border: 1px solid rgba(255,107,107,0.2);
  font-size: 0.62rem; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.4px;
}

/* ── LATEST LINKS ── */
.latest-section { margin-top: 3rem; }
.latest-list { display: flex; flex-direction: column; gap: 8px; }
.latest-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 0.8rem 1rem;
  display: flex; align-items: center; gap: 0.9rem;
  cursor: pointer; transition: all .2s;
  text-decoration: none; color: inherit;
}
.latest-item:hover { border-color: var(--border2); background: var(--bg3); }
.latest-game-icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}
.latest-info { flex: 1; min-width: 0; }
.latest-name { font-weight: 600; font-size: 0.85rem; }
.latest-time { font-size: 0.73rem; color: var(--muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-clicks { font-size: 0.72rem; color: var(--dim); flex-shrink: 0; }
.new-tag {
  background: rgba(74,222,128,0.12);
  color: var(--green);
  border: 1px solid rgba(74,222,128,0.2);
  font-size: 0.62rem; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  text-transform: uppercase; flex-shrink: 0;
}

/* ── SIDEBAR ── */
.popular-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: opacity .2s;
  text-decoration: none; color: inherit;
}
.popular-item:last-child { border-bottom: none; }
.popular-item:hover { opacity: 0.72; }
.popular-icon {
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}
.popular-name { font-size: 0.8rem; font-weight: 500; flex: 1; }
.popular-clicks { font-size: 0.7rem; color: var(--muted); }
.rank { font-size: 0.68rem; color: var(--dim); width: 18px; text-align: right; }

/* ── FOOTER ── */
footer {
  margin-top: 4rem;
  padding: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--dim); font-size: 0.78rem; line-height: 1.8;
}
footer a { color: var(--muted); text-decoration: none; margin: 0 8px; }
footer a:hover { color: var(--text); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stats-bar { gap: 1.5rem; }
  nav ul { display: none; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
