/* ===== Playhop-style sports games portal ===== */
* { box-sizing: border-box; }

:root {
   --bg: #0f1018;
   --bg-2: #16182300;
   --panel: #1a1c28;
   --panel-2: #20232f;
   --line: #262a38;
   --text: #eef0f6;
   --muted: #9aa0b3;
   --accent: #7c5cff;
   --accent-2: #5b8cff;
}

html, body {
   margin: 0;
   padding: 0;
   background: var(--bg);
   color: var(--text);
   font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
   -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }

/* ---------- Brand ---------- */
.brand {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   font-weight: 800;
   font-size: 22px;
   letter-spacing: -0.5px;
}
.brand-mark {
   display: inline-grid;
   place-items: center;
   width: 30px; height: 30px;
   border-radius: 9px;
   font-size: 13px;
   color: #fff;
   background: linear-gradient(135deg, var(--accent), var(--accent-2));
   box-shadow: 0 4px 14px rgba(124, 92, 255, .45);
}
.brand-name span { color: var(--accent); }
.brand.small { font-size: 18px; }
.brand.small .brand-mark { width: 24px; height: 24px; font-size: 11px; }

/* ---------- Top bar ---------- */
.topbar {
   position: sticky;
   top: 0;
   z-index: 50;
   background: rgba(15,16,24,.92);
   backdrop-filter: blur(8px);
   border-bottom: 1px solid var(--line);
}
.topbar-inner {
   max-width: 1440px;
   margin: 0 auto;
   height: 62px;
   padding: 0 18px;
   display: flex;
   align-items: center;
   gap: 18px;
}
.search {
   flex: 1;
   max-width: 520px;
   display: flex;
   align-items: center;
   gap: 8px;
   background: var(--panel);
   border: 1px solid var(--line);
   border-radius: 12px;
   padding: 0 12px;
   height: 40px;
}
.search-ico { opacity: .6; font-size: 14px; }
.search input {
   flex: 1;
   background: transparent;
   border: 0;
   outline: 0;
   color: var(--text);
   font-size: 14px;
}
.search input::placeholder { color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn-ghost, .btn-primary {
   display: inline-flex;
   align-items: center;
   height: 38px;
   padding: 0 16px;
   border-radius: 10px;
   font-weight: 600;
   font-size: 14px;
   white-space: nowrap;
}
.btn-ghost { color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--panel); }
.btn-primary {
   color: #fff;
   background: linear-gradient(135deg, var(--accent), var(--accent-2));
   box-shadow: 0 6px 18px rgba(124, 92, 255, .4);
}
.btn-primary:hover { filter: brightness(1.07); }

/* ---------- Layout ---------- */
.layout {
   max-width: 1440px;
   margin: 0 auto;
   display: grid;
   grid-template-columns: 220px 1fr;
   gap: 22px;
   padding: 22px 18px 40px;
}

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 84px; align-self: start; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
   display: flex;
   align-items: center;
   gap: 11px;
   padding: 10px 12px;
   border-radius: 10px;
   color: var(--muted);
   font-size: 14.5px;
   font-weight: 600;
   transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active { background: rgba(124,92,255,.16); color: #fff; }
.nav-ico { width: 20px; text-align: center; font-size: 16px; }
.nav-sep { height: 1px; background: var(--line); margin: 12px 6px; }
.nav-title {
   font-size: 11px;
   letter-spacing: 1px;
   text-transform: uppercase;
   color: var(--muted);
   padding: 4px 12px 6px;
}

/* ---------- Content ---------- */
.content { min-width: 0; }

/* Hero */
.hero {
   display: block;
   position: relative;
   overflow: hidden;
   border-radius: 18px;
   padding: 34px 34px;
   margin-bottom: 26px;
   background:
      radial-gradient(120% 140% at 100% 0%, rgba(91,140,255,.55), transparent 55%),
      linear-gradient(120deg, #4327a6, #7c5cff 55%, #5b8cff);
   min-height: 190px;
}
.hero-badge {
   display: inline-block;
   background: rgba(255,255,255,.18);
   border: 1px solid rgba(255,255,255,.25);
   padding: 5px 12px;
   border-radius: 999px;
   font-size: 13px;
   font-weight: 700;
   margin-bottom: 14px;
}
.hero h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.1; }
.hero p { margin: 0 0 18px; max-width: 460px; color: rgba(255,255,255,.85); font-size: 15px; }
.hero-cta {
   display: inline-flex;
   align-items: center;
   height: 44px;
   padding: 0 24px;
   border-radius: 12px;
   background: #fff;
   color: #3a1fa6;
   font-weight: 800;
   font-size: 15px;
   box-shadow: 0 8px 22px rgba(0,0,0,.25);
   animation: pulse 1.6s ease infinite;
}
@keyframes pulse {
   0%,100% { transform: scale(1); }
   50% { transform: scale(1.05); }
}

/* Section header */
.section-head {
   display: flex;
   align-items: baseline;
   justify-content: space-between;
   margin: 0 2px 16px;
}
.section-head h2 { margin: 0; font-size: 22px; }
.section-count { color: var(--muted); font-size: 13px; }

/* Grid */
.grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
   gap: 16px;
}
.card {
   background: var(--panel);
   border: 1px solid var(--line);
   border-radius: 14px;
   overflow: hidden;
   transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.card:hover {
   transform: translateY(-4px);
   border-color: rgba(124,92,255,.6);
   box-shadow: 0 12px 26px rgba(0,0,0,.4);
}
.thumb {
   position: relative;
   aspect-ratio: 1 / 1;
   display: grid;
   place-items: center;
   background: var(--panel-2);
   overflow: hidden;
}
.thumb img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block;
   transition: transform .25s ease;
}
.card:hover .thumb img { transform: scale(1.08); }
.thumb-play {
   position: absolute;
   inset: 0;
   display: grid;
   place-items: center;
   font-size: 26px;
   color: #fff;
   background: rgba(0,0,0,.35);
   opacity: 0;
   transition: opacity .18s ease;
}
.card:hover .thumb-play { opacity: 1; }
.card-body { padding: 10px 12px 12px; }
.card-title {
   font-size: 14px;
   font-weight: 700;
   line-height: 1.25;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}
.card-meta { margin-top: 5px; }
.card-plays { color: var(--muted); font-size: 12px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: #0c0d14; }
.footer-inner {
   max-width: 1440px;
   margin: 0 auto;
   padding: 26px 18px;
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 16px 26px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--muted); font-size: 13px; margin-left: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
   .layout { grid-template-columns: 1fr; }
   .sidebar {
      position: static;
      overflow-x: auto;
   }
   .sidebar nav { flex-direction: row; flex-wrap: nowrap; }
   .nav-sep, .nav-title { display: none; }
   .nav-item { white-space: nowrap; }
}
@media (max-width: 560px) {
   .search { max-width: none; }
   .btn-ghost { display: none; }
   .hero h1 { font-size: 24px; }
   .hero { padding: 24px; }
   .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
   .footer-copy { margin-left: 0; width: 100%; }
}

/* ================= Auth modal ================= */
.modal-overlay {
   position: fixed;
   inset: 0;
   z-index: 200;
   display: none;
   align-items: center;
   justify-content: center;
   padding: 20px;
   background: rgba(6, 7, 12, .72);
   backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
   position: relative;
   width: 100%;
   max-width: 400px;
   background: var(--panel);
   border: 1px solid var(--line);
   border-radius: 18px;
   padding: 28px 26px 24px;
   box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
   animation: modalIn .18s ease;
}
@keyframes modalIn {
   from { opacity: 0; transform: translateY(12px) scale(.98); }
   to   { opacity: 1; transform: none; }
}
.modal-close {
   position: absolute;
   top: 14px; right: 14px;
   width: 32px; height: 32px;
   border: 0;
   border-radius: 9px;
   background: transparent;
   color: var(--muted);
   font-size: 15px;
   cursor: pointer;
}
.modal-close:hover { background: var(--panel-2); color: var(--text); }
.modal-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; margin-bottom: 14px; }
.modal-title { margin: 0 0 4px; font-size: 22px; }
.modal-sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.modal-err {
   background: rgba(226, 60, 83, .12);
   border: 1px solid rgba(226, 60, 83, .5);
   color: #ff8b9c;
   padding: 10px 12px;
   border-radius: 10px;
   font-size: 13.5px;
   font-weight: 600;
   margin-bottom: 16px;
}
.modal-err.shake { animation: shake .35s ease; }
@keyframes shake {
   10%, 90% { transform: translateX(-1px); }
   20%, 80% { transform: translateX(2px); }
   30%, 50%, 70% { transform: translateX(-4px); }
   40%, 60% { transform: translateX(4px); }
}
.google-btn {
   width: 100%;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 10px;
   height: 46px;
   border: 1px solid var(--line);
   border-radius: 11px;
   background: #fff;
   color: #1f2430;
   font-size: 14.5px;
   font-weight: 600;
   cursor: pointer;
   transition: filter .15s;
}
.google-btn:hover { filter: brightness(.96); }
.google-g { display: inline-grid; place-items: center; }
.modal-divider {
   display: flex;
   align-items: center;
   gap: 12px;
   color: var(--muted);
   font-size: 12px;
   margin: 16px 0;
}
.modal-divider::before, .modal-divider::after {
   content: "";
   flex: 1;
   height: 1px;
   background: var(--line);
}
.fld { display: block; margin-bottom: 13px; }
.fld span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.fld input {
   width: 100%;
   height: 44px;
   padding: 0 13px;
   background: var(--bg);
   border: 1px solid var(--line);
   border-radius: 10px;
   color: var(--text);
   font-size: 14.5px;
   outline: none;
}
.fld input:focus { border-color: var(--accent); }
.fld input::placeholder { color: #5b6072; }
.modal-submit {
   width: 100%;
   height: 46px;
   margin-top: 4px;
   border: 0;
   border-radius: 11px;
   background: linear-gradient(135deg, var(--accent), var(--accent-2));
   color: #fff;
   font-size: 15px;
   font-weight: 700;
   cursor: pointer;
   box-shadow: 0 8px 20px rgba(124, 92, 255, .35);
}
.modal-submit:hover { filter: brightness(1.06); }
.modal-switch { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.modal-switch a { color: var(--accent); font-weight: 600; }
.modal-switch a:hover { text-decoration: underline; }
