/* ================================
   🎨 GLOBAL DESIGN SYSTEM
   ================================ */
:root {
  --neon: #8FD400;
  --neon-hover: #A9F000;
}

/* ================================
   🌍 GLOBAL BASE + UTILITIES
   ================================ */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  padding: 0 1rem;
}
a { color: inherit; }
.text-green { color: var(--neon); }
.border-green { border: 1px solid var(--neon); }
.shadow-green { box-shadow: 0 0 10px rgba(143,212,0,.4); }
.bg-green { background: var(--neon); color: #000; }

/* ================================
   🚧 CONSTRUCTION BANNER
   ================================ */
.construction-banner {
  background: var(--neon);
  color: #000;
  font-weight: bold;
  text-align: center;
  padding: 12px;
  font-size: 1.1rem;
  width: 100%;
  border-bottom: 2px solid #000;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}

/* ================================
   🦁 HERO
   ================================ */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}
.logo { max-width: 300px; height: auto; margin-bottom: .5rem; }
.tagline {
  font-family: 'Arial Black', Impact, sans-serif;
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: .3rem 0 .5rem;
  color: #fff;
  text-shadow: 0 0 6px rgba(255,255,255,.3);
}
.subline { font-size: 1.3rem; display: block; margin-top: .3rem; }
.download-buttons { margin: .8rem 0; display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }

/* ================================
   🍔 HAMBURGER + 🔔 BELL ROW
   ================================ */
.hero-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
}
#menu-btn.hamburger,
.hero-icons .notif-bell {
  background: #000;
  border: 1px solid var(--neon);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  font-size: 1.4rem;
  box-shadow: 0 0 6px rgba(143, 212, 0, 0.5);
}
#menu-btn.hamburger { color: #fff; cursor: pointer; }
#menu-btn.hamburger:hover { background: var(--neon); color: #000; }
.notif-bell {
  color: var(--neon);
  background: none;
  cursor: pointer;
  transition: transform .2s ease;
}
.notif-bell:hover { transform: scale(1.15); }
.notif-bell.off { opacity: .6; filter: grayscale(100%); }

/* Mobile positioning reset (bell/menu should follow normal flow) */
@media (max-width: 600px) {
  .notif-bell, #menu-btn { position: static !important; margin-top: 0; }
}

/* ================================
   📜 SIDE MENU (Drawer)
   ================================ */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 4500;
  display: none;
}
.side-menu {
  position: fixed;
  top: 0; left: 0;
  height: 100%;
  width: 250px;
  background: #111;
  border-right: 2px solid var(--neon);
  padding: 1rem;
  box-shadow: 0 0 16px rgba(143,212,0,0.6);
  transform: translateX(-100%);
  transition: transform .3s ease;
  z-index: 4501;
  display: flex;
  flex-direction: column;
}
.side-menu.open { transform: translateX(0); }
.menu-close {
  background: none;
  border: none;
  color: var(--neon);
  font-size: 1.6rem;
  align-self: flex-end;
  cursor: pointer;
}
.menu-items { list-style: none; padding: 0; margin: 1rem 0 0; flex: 1; overflow-y: auto; }
.menu-items li { margin-bottom: 0.6rem; }
.menu-items a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
}
.menu-items a:hover { background: var(--neon); color: #000; }

/* ================================
   🔘 BUTTONS
   ================================ */
.btn, .join-btn, button, input[type=submit] {
  display: inline-block;
  padding: .6rem 1rem;
  background: var(--neon);
  color: #000;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(143,212,0,.4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover, .join-btn:hover, button:hover { transform: scale(1.05); box-shadow: 0 0 12px rgba(143,212,0,.7); }

/* White auth-style button (used by Clear buttons too) */
.btn-auth {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #ccc;
  font-weight: bold;
  border-radius: 6px;
}
.btn-auth:hover { background: #e0e0e0 !important; }

/* Dedicated auth controls (if shown elsewhere) */
#profile-btn, #signout-btn {
  background: #fff;
  color: #000;
  font-weight: bold;
  border: 1px solid #ccc;
  min-width: 150px;
  text-align: center;
  border-radius: 6px;
  padding: .6rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
#profile-btn:hover, #signout-btn:hover { background: #e0e0e0; }

/* ================================
   🗂️ CARDS + MATCH GRID
   ================================ */
.matches-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 1rem;
}
.card, .game-card, .match-card {
  background: #111;
  border: 1px solid var(--neon);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 0 10px rgba(143,212,0,.2);
  text-align: center;
  font-size: 1.05rem;
}
.match-card h3, .game-card h3 { color: var(--neon); margin-bottom: .6rem; }

/* Profile game cards */
.game-card { text-align: left; font-size: 0.95rem; padding: 0.8rem; }
.game-card .game-row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.game-card .game-row div { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card .game-date { font-size: 0.85rem; color: #aaa; margin-top: 0.3rem; }
.game-card .pill {
  background: none; border: 1px solid #ff4d4d; border-radius: 50%;
  padding: 0.25rem 0.4rem; cursor: pointer; font-size: 0.9rem; color: #ff4d4d;
  display: flex; align-items: center; justify-content: center;
}
.game-card .pill:hover { background: #ff4d4d; color: #fff; }

/* Desktop / Tablet grid tuning */
@media (min-width: 1200px) {
  .matches-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .matches-grid { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
}
@media (max-width: 767px) { .matches-grid { grid-template-columns: 1fr; } }

/* Card balance in multi-col */
.match-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 200px; }

/* ================================
   📰 NEWS
   ================================ */
.news-grid { display: flex; flex-direction: column; gap: 12px; }
.news-item {
  background: #fff; color: #000; border-radius: 10px; padding: 14px;
  font-weight: bold; box-shadow: 0 0 6px rgba(0,0,0,.3); text-align: left;
}
.news-source { font-size: .85rem; color: #333; margin-top: 4px; display: block; }

/* ================================
   📄 PAGE INDICATOR + PAGINATION
   ================================ */
.page-indicator { color: #fff; font-weight: bold; font-size: 1rem; letter-spacing: .5px; text-transform: uppercase; text-shadow: 0 0 6px rgba(255,255,255,.5); }
.pagination-controls button {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 6px;
  background: var(--neon);
  color: #000;
  font-weight: bold; font-size: 1rem;
  border: none; border-radius: 6px;
  padding: 0.6rem 1rem;
  box-shadow: 0 0 8px rgba(143,212,0,.4);
  cursor: pointer;
  min-width: 110px;
}
.pagination-controls button:hover { transform: scale(1.05); box-shadow: 0 0 12px rgba(143,212,0,.7); }
.pagination-controls button svg { width: 1rem; height: 1rem; fill: #000; }

/* ================================
   🔔 TOASTS + MISSED EVENTS
   ================================ */
#toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 2000;
  display: flex; flex-direction: column; gap: 8px; max-width: 300px;
}
.toast {
  background: var(--neon); color: #000; border-radius: 6px;
  padding: 10px 14px; margin: 8px 0; font-weight: bold;
  box-shadow: 0 0 10px rgba(143,212,0,.6);
  opacity: 0; transform: translateY(20px);
  transition: opacity .3s ease, transform .3s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.recap-center {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: var(--neon); color: #000; font-weight: bold; border-radius: 10px;
  padding: 16px 20px; box-shadow: 0 0 16px rgba(143,212,0,.6); z-index: 3000; text-align: center;
}
.overflow-badge {
  display: block; margin-top: 6px; font-size: .8rem; background: #fff; color: #000;
  padding: 2px 8px; border-radius: 10px; cursor: pointer; font-weight: bold;
  max-width: fit-content; margin-left: auto; margin-right: auto;
}

/* Missed events modal */
#missed-events-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 2999; display: none; opacity: 0; transition: opacity .3s ease; }
#missed-events-overlay.show { display: block; opacity: 1; }
#missed-events-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: #111; border: 2px solid var(--neon); border-radius: 12px;
  box-shadow: 0 0 16px rgba(143,212,0,.6); width: 90%; max-width: 500px;
  max-height: 30vh; overflow-y: auto; padding: 1rem; z-index: 3001; display: none;
  transition: max-height .3s ease;
}
#missed-events-modal.expanded { max-height: 70vh; }
#missed-events-content h3 { color: var(--neon); margin-bottom: .5rem; text-align: center; }
#missed-events-list { text-align: left; list-style: disc; padding-left: 1.5rem; margin-top: .5rem; }
#missed-events-modal .btn {
  display: inline-block; background: var(--neon); color: #000; font-weight: bold;
  margin-top: 1rem; border: none; border-radius: 6px; padding: .5rem 1rem; cursor: pointer;
  text-align: center; box-shadow: 0 0 10px rgba(143,212,0,.4);
}
#missed-events-modal .btn:hover { background: var(--neon-hover); }

/* ================================
   📱 MOBILE BASICS
   ================================ */
@media (max-width: 600px) {
  .btn, .join-btn, #profile-btn, #signout-btn {
    font-size: .9rem; padding: .5rem .9rem; width: 90%; max-width: 320px;
  }
}

/* ================================
   🎯 FILTER SYSTEM — Unified (Option B)
   - Applies to both Pro Matches (.filters) and Gambetas (.gambetas-filters)
   - Clear buttons kept WHITE and labeled “Clear” (HTML controls label)
   - Select widths constrained on desktop; full-width on mobile
   ================================ */
.filters, .gambetas-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
  margin: 0.5rem 0 1rem;
}
.filters select,
.filters input[type="date"],
.gambetas-filters select {
  background: #111;
  color: #fff;
  border: 1px solid var(--neon);
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 0.95rem;
  /* desktop widths */
  min-width: 140px;
  max-width: 220px;
  flex: 0 0 auto;
}
/* White CLEAR buttons (both sections) */
#clear-filters,
#clear-gambetas-filters {
  background: #fff;
  color: #000;
  border: 1px solid #ccc;
  font-weight: bold;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}
#clear-filters:hover,
#clear-gambetas-filters:hover { background: #e0e0e0; }

/* Mobile: stack and make inputs full-width; keep “Clear” a sensible width centered */
@media (max-width: 600px) {
  .filters, .gambetas-filters { flex-direction: column; align-items: stretch; }
  .filters select,
  .filters input[type="date"],
  .gambetas-filters select { width: 100%; max-width: 100%; }
  #clear-filters, #clear-gambetas-filters {
    width: 100%;
    max-width: 180px;
    align-self: center;
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
  }
}

/* ================================
   📆 DATE CONTROL (Pro Matches) — button styled like select
   ================================ */
.gambetas-date-button {
  padding: 0.5rem;
  background: #111;
  color: #fff;
  border: 1px solid var(--neon);
  border-radius: 6px;
  font-size: 0.95rem;
  flex: 0 0 auto;
  min-width: 140px;
  text-align: left;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gambetas-date-button::after {
  content: '\25BC';
  position: absolute;
  right: 0.7rem; top: 50%; transform: translateY(-50%);
  pointer-events: none;
  color: #fff; font-size: 0.8rem;
}
.gambetas-date-button:hover { background: #1a1a1a; }
@media (max-width: 600px) { .gambetas-date-button { width: 100%; } }

/* ================================
   🗓️ NEON CALENDAR OVERLAY (Restored)
   ================================ */
.calendar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;  /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.calendar-overlay.show { display: flex; }
.calendar-modal {
  background: #111;
  border: 2px solid var(--neon);
  border-radius: 12px;
  box-shadow: 0 0 16px rgba(143, 212, 0, 0.6);
  padding: 1rem;
  width: min(90vw, 360px);
  text-align: center;
  color: #fff;
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--neon);
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 8px rgba(143, 212, 0, 0.8);
}
.cal-nav {
  background: transparent;
  border: 1px solid var(--neon);
  border-radius: 6px;
  color: var(--neon);
  font-weight: bold;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cal-nav:hover { background: var(--neon); color: #000; box-shadow: 0 0 8px rgba(143, 212, 0, 0.7); }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.8rem;
}
.calendar-grid .calendar-label {
  font-weight: bold; color: var(--neon);
  text-align: center; padding: 0.2rem 0;
}
.cal-day, .calendar-grid .day {
  padding: 0.45rem 0;
  border: 1px solid #333;
  border-radius: 4px;
  background: #000;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 4px rgba(143, 212, 0, 0.25);
}
.calendar-grid .day.empty { background: transparent; border: none; cursor: default; }
.cal-day:hover, .calendar-grid .day:hover:not(.empty) { background: var(--neon); color: #000; box-shadow: 0 0 8px rgba(143, 212, 0, 0.7); }
.cal-day.selected, .calendar-grid .day.selected {
  background: var(--neon); color: #000; font-weight: bold; box-shadow: 0 0 10px rgba(143, 212, 0, 0.8);
}
.calendar-footer {
  display: flex; justify-content: space-around; gap: 1rem; margin-top: 0.5rem;
}
.calendar-footer .btn { flex: 1; font-weight: bold; border-radius: 8px; padding: 0.4rem 0; }

/* ================================
   🪟 GENERIC MODAL (Join Game etc.)
   ================================ */
.modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
  z-index: 3500;
}
.modal-content {
  background: #222;
  padding: 1rem;
  border-radius: 12px;
  width: min(92vw, 360px);
  color: #fff;
  border: 2px solid var(--neon);
}

/* ================================
   🧪 MISC HELPERS
   ================================ */
.section-title {
  font-size: 1.4rem;
  text-align: center;
  margin: 1rem 0 .5rem;
  font-weight: bold;
  color: var(--neon);
  text-shadow: 0 0 6px rgba(143,212,0,.5);
}
.badge {
  font-size: .85rem;
  background: #222;
  color: var(--neon);
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 8px;
  box-shadow: 0 0 6px rgba(143,212,0,.5);
}
#gambetas-match-count, #pro-match-count {
  background: #fff; color: #000; border: 1px solid var(--neon);
}

@media (max-width:600px){
  .section-title { font-size: 1.15rem; margin: .8rem 0 .3rem; }
  .badge { font-size: .7rem; padding: 2px 6px; }
  .match-card h3 { font-size: 1.05rem; }
}

/* END OF FILE */

/* === 2025-10-08 White Window Variant (CSS-only) === */
.match-card {
  position: relative !important;
  background: #000 !important;                 /* black body */
  border: 3px solid var(--neon) !important;    /* outer neon */
  border-radius: 12px !important;
  box-shadow: 0 0 12px rgba(143,212,0,.35) !important;
  padding: 16px !important;
  text-align: center !important;
  overflow: hidden !important;
}
/* White pane for content; leaves space for the bottom button */
.match-card::before {
  content: "" !important;
  position: absolute !important;
  left: 10px; right: 10px; top: 10px; bottom: 86px;
  background: #fff !important;
  border-radius: 10px !important;
  box-shadow: inset 0 0 0 2px #000 !important;
  z-index: 0 !important;
}
/* Lift real content above the pane */
.match-card > * { position: relative; z-index: 1; }
.match-card h3, .match-card p { color: #000 !important; }

/* Center the Join button and keep it on the black area */
.match-card .join-btn {
  display: block !important;
  width: 90% !important;
  max-width: 320px !important;
  margin: .5rem auto 0 !important;
  position: relative !important;
  z-index: 2 !important;
}
@media (max-width: 600px) {
  .match-card .join-btn { width: 90% !important; }
}

/* Stacked + centered indicator */
.page-indicator {
  display:flex; flex-direction:column; align-items:center; line-height:1.2;
  color:#fff; font-weight:bold; font-size:1rem; text-transform:uppercase;
}
.page-count { font-size:.75rem; opacity:.85; margin-bottom:2px; }

/* === 2025-10-08 White Window — Tight v2 (variable-based) === */
.match-card {
  position: relative !important;
  overflow: visible !important;
  --join-area: 56px; /* height of black band behind Join button */
}
@media (max-width: 600px){
  .match-card { --join-area: 60px; }
}
.match-card::before {
  content: "" !important;
  position: absolute !important;
  left: 10px; right: 10px; top: 10px; bottom: var(--join-area);
  background: #fff !important;
  border-radius: 10px !important;
  box-shadow: inset 0 0 0 2px #000 !important;
  z-index: 0 !important;
}
.match-card > * { position: relative; z-index: 1; }
.match-card h3, .match-card p { color: #000 !important; }

/* Join button centered; keep on black band */
.match-card .join-btn {
  display: block !important;
  width: 90% !important;
  max-width: 320px !important;
  margin: .25rem auto 0 !important;
  position: relative !important;
  z-index: 2 !important;
}

/* Footer */
.site-footer{
  margin:24px 0 40px;
  text-align:center;
  color:#9aa0a6;  /* muted gray */
  font-size:.9rem;
  line-height:1.25;
}

/* Optional: slightly tighter on small screens */
@media (max-width:480px){
  .site-footer{ margin:20px 0 28px; font-size:.88rem; }
}
