/* =============================================================
   LemonArcade Dashboard — home.css
   Faithful pixel-by-pixel reproduction of lemonarcade.com
   ============================================================= */

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

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

:root {
  --primary:       #D7F205;
  --primary-light: #EAF205;
  --bg:            #EAF205;
  --card-bg:       #1e1f00;
  --text:          #F1F1F1;
  --text-muted:    #888C03;
  --border:        #2e3000;
  --header-bg:     #252601;
  --radius:        10px;
  --transition:    0.18s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 65% at 50% 0%, rgba(255,255,255,0.40) 0%, rgba(255,255,255,0) 46%),
    linear-gradient(180deg, #EFEC20 0%, #EAF205 45%, #DEE600 100%);
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
img { display: block; max-width: 100%; }

/* ── Floating Logo Left ─────────────────────────── */
.hdr-logo-left {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  width: 40px; height: 40px;
  background: rgba(37,38,1,0.70);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background var(--transition);
  font-size: 22px; line-height: 1;
}
.hdr-logo-left:hover { background: rgba(255,255,255,0.15); }

/* ── Floating Header Buttons (top-right) ─────────── */
.site-header {
  position: fixed;
  top: 12px; right: 12px;
  z-index: 200;
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; padding: 0;
}
.header-actions { display: flex; align-items: center; gap: 8px; }

.hdr-btn {
  width: 40px; height: 40px;
  background: rgba(37,38,1,0.70);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 50%;
  color: rgba(255,255,255,0.80);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.hdr-btn:hover, .hdr-btn.active { background: rgba(255,255,255,0.15); color: #fff; }

/* ── Search overlay ─────────────────────────────── */
.search-wrap {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 199;
  padding: 12px 100px 12px 64px;
  background: rgba(37,38,1,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.search-wrap.open { display: block; }

#searchInput {
  width: 100%; height: 40px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.14);
  border-radius: 50px;
  padding: 0 18px;
  font-size: 15px; color: #fff; outline: none;
  transition: var(--transition); box-sizing: border-box;
}
#searchInput::placeholder { color: rgba(255,255,255,0.35); }
#searchInput:focus { border-color: var(--primary-light); background: rgba(255,255,255,0.12); }

/* ── Category Drawer ────────────────────────────── */
.drawer-overlay {
  display: block; position: fixed; inset: 0; z-index: 399;
  background: rgba(0,0,0,0.55); opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.cat-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 400;
  width: 280px; max-width: 85vw;
  background: #18190a;
  border-right: 1px solid rgba(215,242,5,0.12);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.cat-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.drawer-header > span {
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.35);
  text-transform: uppercase; letter-spacing: 1px;
}
.drawer-close {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.5); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.drawer-close:hover { background: rgba(255,255,255,0.14); color: #fff; }

.drawer-nav { display: flex; flex-direction: column; overflow-y: auto; padding: 8px 0; flex: 1; }

.drawer-cat-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; background: none; border: none;
  color: rgba(255,255,255,0.75); font-size: 14px; font-weight: 600;
  text-align: left; width: 100%;
  transition: background 0.12s, color 0.12s;
  opacity: 0; transform: translateX(-12px);
}
.cat-drawer.open .drawer-cat-btn {
  animation: slideInRow 0.3s ease forwards;
}
.cat-drawer.open .drawer-cat-btn:nth-child(1)  { animation-delay: 30ms; }
.cat-drawer.open .drawer-cat-btn:nth-child(2)  { animation-delay: 55ms; }
.cat-drawer.open .drawer-cat-btn:nth-child(3)  { animation-delay: 80ms; }
.cat-drawer.open .drawer-cat-btn:nth-child(4)  { animation-delay: 105ms; }
.cat-drawer.open .drawer-cat-btn:nth-child(5)  { animation-delay: 130ms; }
.cat-drawer.open .drawer-cat-btn:nth-child(n+6){ animation-delay: 155ms; }
@keyframes slideInRow {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (hover: hover) { .drawer-cat-btn:hover { background: rgba(215,242,5,0.07); color: #fff; } }
.drawer-cat-btn.active { background: rgba(215,242,5,0.12); color: var(--primary); }
.drawer-cat-icon { font-size: 22px; line-height: 1; flex-shrink: 0; width: 28px; text-align: center; }
.drawer-cat-label { flex: 1; }
.drawer-cat-count {
  font-size: 11px; color: rgba(215,242,5,0.45); background: rgba(215,242,5,0.06);
  padding: 2px 8px; border-radius: 20px; font-weight: 600; flex-shrink: 0;
}

/* ── Filter Pill ─────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 0 64px;
  font-size: 13px; color: rgba(37,38,1,0.6);
}
.filter-bar span { padding: 4px 12px; font-size: 13px; font-weight: 700; color: #252601; }
.filter-bar button { background: transparent; border: none; color: var(--text-muted); font-size: 16px; padding: 2px 6px; border-radius: 4px; }
.filter-bar button:hover { color: #252601; }

/* ── Game Grid Panel ────────────────────────────── */
.all-games-panel {
  margin: 10px 12px 24px;
  padding: 4px 12px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.62) 0%, rgba(255,255,255,0.34) 100%);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(60,60,0,0.20), inset 0 1px 0 rgba(255,255,255,0.7);
}

.home-section-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.8px; color: rgba(37,38,1,0.4);
  padding: 14px 0 0 10px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  grid-auto-flow: dense;
  gap: 10px;
  padding: 12px;
}

/* ── Game Card ──────────────────────────────────── */
.game-card {
  position: relative; aspect-ratio: 1/1; overflow: hidden;
  cursor: pointer; display: block; background: #1a1a2a;
  border-radius: 12px;
  box-shadow: 0 5px 16px rgba(60,60,0,0.22), 0 2px 5px rgba(60,60,0,0.13);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.game-card.card-medium { grid-column: span 2; grid-row: span 2; }
.game-card.card-large  { grid-column: span 3; grid-row: span 3; }

@media (hover: hover) {
  .game-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(45,45,0,0.32), 0 4px 9px rgba(45,45,0,0.18); }
  .game-card:hover .card-title-overlay { opacity: 1; }
  .game-card:hover .card-video.playing { opacity: 1; }
  .game-card:hover .game-thumb-img { transform: scale(1.04); }
  .game-card:hover .card-fav-btn { opacity: 1; }
}
@media (hover: none) { .card-fav-btn { opacity: 1; } }

.card-fav-btn {
  position: absolute; top: 6px; right: 6px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,0.55); border: none;
  color: rgba(255,255,255,0.55); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s, color 0.15s, transform 0.15s; z-index: 10;
}
.card-fav-btn.active { opacity: 1; color: #ef4444; }
.card-fav-btn:hover { color: #ef4444; transform: scale(1.2); }

.game-thumb-bg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; position: absolute; inset: 0;
  border-radius: inherit; overflow: hidden;
}
.game-thumb-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.35s ease; display: block;
  border-radius: inherit;
}
.card-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.25s ease;
  pointer-events: none; z-index: 2; border-radius: inherit;
}
.card-video.playing { opacity: 1; }

.card-title-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 28px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  color: #fff; font-size: 13px; font-weight: 700; line-height: 1.3;
  border-radius: 0 0 12px 12px;
  opacity: 0; transition: opacity 0.2s ease; z-index: 3; pointer-events: none;
}

.card-hot-badge {
  position: absolute; top: 7px; left: 7px; z-index: 10;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  color: #fff; font-size: 10px; font-weight: 800;
  padding: 3px 7px; border-radius: 5px; letter-spacing: 0.03em;
}

/* No results */
.no-results { grid-column: 1/-1; text-align: center; padding: 80px 20px; color: var(--text-muted); }
.no-results .nr-icon { font-size: 56px; margin-bottom: 14px; }
.no-results h3 { font-size: 18px; color: #252601; margin-bottom: 6px; }
.no-results p { color: var(--text-muted); }

/* ── Footer ─────────────────────────────────────── */
.site-footer { margin-top: 24px; border-top: 1px solid rgba(37,38,1,0.15); padding: 28px 20px 40px; }
.footer-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: rgba(37,38,1,0.55); transition: color var(--transition); font-weight: 700; }
.footer-links a:hover { color: #252601; }
.footer-copy { font-size: 12px; color: rgba(37,38,1,0.35); }

/* ============================================================
   OFFERS LOCKER MODAL
   ============================================================ */
.offers-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(4, 6, 12, 0.80);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.offers-overlay.active { opacity: 1; pointer-events: auto; }

.offers-card {
  width: 100%; max-width: 500px;
  background: linear-gradient(180deg, #131b2e 0%, #0c111d 100%);
  border: 1px solid rgba(215,242,5,0.25);
  border-radius: 22px;
  box-shadow: 0 25px 60px -10px rgba(0,0,0,0.9), 0 0 24px rgba(215,242,5,0.12);
  padding: 24px;
  position: relative;
  transform: scale(0.94) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.offers-overlay.active .offers-card { transform: scale(1) translateY(0); }

.offers-close-btn {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.5); width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; transition: all 0.2s ease; cursor: pointer;
}
.offers-close-btn:hover { background: rgba(255,255,255,0.15); color: #fff; transform: rotate(90deg); }

/* Modal game header */
.offers-game-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
}
.offers-game-thumb {
  width: 54px; height: 54px; border-radius: 12px; overflow: hidden;
  flex-shrink: 0; background: #1e293b; border: 1px solid rgba(255,255,255,0.1);
}
.offers-game-thumb img { width: 100%; height: 100%; object-fit: cover; }

.offers-live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  background: rgba(215,242,5,0.10); border: 1px solid rgba(215,242,5,0.25);
  border-radius: 99px; font-size: 0.72rem; font-weight: 800;
  color: #d7f205; margin-bottom: 6px;
}

.offers-modal-title { font-size: 1.2rem; font-weight: 900; color: #ffffff; margin-bottom: 3px; }
.offers-modal-sub { font-size: 0.82rem; color: rgba(255,255,255,0.55); line-height: 1.4; }
.offers-modal-sub strong { color: #d7f205; }

/* Timer bar */
.offers-timer-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; padding: 9px 14px; margin-bottom: 14px;
}
.offers-status-wrap { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: rgba(255,255,255,0.55); font-weight: 600; }
.offers-timer { font-family: monospace; font-weight: 700; color: #eab308; font-size: 0.95rem; background: rgba(234,179,8,0.12); padding: 2px 8px; border-radius: 6px; }

/* Pulse dot */
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 8px #22c55e;
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* Offers list */
.offers-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; max-height: 300px; overflow-y: auto; padding-right: 2px; }
.offers-list::-webkit-scrollbar { width: 3px; }
.offers-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

.offer-item {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 11px 13px;
  display: flex; align-items: center; gap: 11px;
  cursor: pointer; text-decoration: none;
  transition: all 0.2s ease; position: relative;
}
.offer-item:hover {
  background: rgba(215,242,5,0.06); border-color: rgba(215,242,5,0.35);
  transform: translateY(-1px);
}
.offer-icon { width: 42px; height: 42px; border-radius: 10px; background: #1e293b; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }
.offer-icon img { width: 100%; height: 100%; object-fit: cover; }
.offer-body { flex: 1; min-width: 0; }
.offer-name { font-size: 0.88rem; font-weight: 800; color: #fff; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.offer-pill { font-size: 0.65rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: rgba(234,179,8,0.15); color: #eab308; border: 1px solid rgba(234,179,8,0.3); flex-shrink: 0; text-transform: uppercase; }
.offer-desc { font-size: 0.75rem; color: rgba(255,255,255,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer-verify-btn { background: linear-gradient(135deg, #d7f205, #b0c604); color: #1a1e00; padding: 7px 13px; border-radius: 99px; font-size: 0.75rem; font-weight: 900; flex-shrink: 0; transition: all 0.2s ease; }
.offer-item:hover .offer-verify-btn { transform: scale(1.05); box-shadow: 0 4px 14px rgba(215,242,5,0.4); }

/* Trust bar */
.offers-trust-bar {
  display: flex; justify-content: center; gap: 18px;
  font-size: 0.73rem; color: rgba(255,255,255,0.3);
}
.offers-trust-bar span { display: flex; align-items: center; gap: 4px; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 900px) { .home-grid { grid-template-columns: repeat(7, 1fr); } }
@media (max-width: 600px) { .home-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; } .all-games-panel { margin: 8px; } }
@media (max-width: 380px) { .home-grid { grid-template-columns: repeat(3, 1fr); } }
