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

:root {
    --bg-primary: #070d18;
    --bg-secondary: #0e1626;
    --surface: #141e33;
    --surface-hover: #1c2942;
    --surface-elevated: #1a2744;
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --live: #ef4444;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 9999px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --transition: all 0.25s ease;
}

body.light {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --text-main: #0f172a;
    --text-secondary: #475569;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: var(--bg-primary); color: var(--text-main); min-height: 100vh; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6, .logo, .score { font-family: 'Outfit', sans-serif; }

.container { display: flex; min-height: 100vh; width: 100%; }

.sidebar {
    width: 280px; background: var(--bg-secondary); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; padding: 24px 20px; position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
}
.logo { font-size: 24px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 12px; margin-bottom: 36px; padding-left: 8px; }
.logo img { width: 34px; height: 34px; object-fit: contain; flex: 0 0 34px; }
.public-navbar .logo img { width: 38px; height: 38px; }
.logo span { color: var(--accent); }
.sidebar ul { list-style: none; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sidebar li {
    display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: var(--radius-md);
    cursor: pointer; transition: var(--transition); font-size: 15px; font-weight: 500; color: var(--text-secondary);
}
.sidebar li i { width: 20px; text-align: center; }
.sidebar li:hover { background: var(--surface-hover); color: var(--text-main); }
.sidebar li.active { background: linear-gradient(135deg, var(--accent), #d97706); color: #070d18; font-weight: 600; }
.sidebar li.active i { color: #070d18; }

.main { flex: 1; margin-left: 280px; padding: 32px 40px; max-width: calc(100% - 280px); overflow-y: auto; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 36px; gap: 20px; }
.search-box { width: 420px; position: relative; }
.search-box input {
    width: 100%; padding: 12px 18px 12px 46px; border: 1px solid var(--border); outline: none;
    border-radius: var(--radius-pill); background: var(--surface); color: var(--text-main); font-size: 14px;
}
.search-box input:focus { border-color: var(--accent); }
.search-box i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); }
#searchResults {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); display: none; max-height: 360px; overflow-y: auto; z-index: 1000;
}
.search-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border); }
.search-item:hover { background: var(--surface-hover); }
.search-item img { width: 28px; height: 28px; object-fit: contain; }

.right-menu { display: flex; align-items: center; gap: 18px; }
#clock { font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600; color: var(--text-secondary); background: var(--surface); padding: 8px 16px; border-radius: var(--radius-pill); border: 1px solid var(--border); }
.icon-btn { width: 42px; height: 42px; display: flex; justify-content: center; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); cursor: pointer; color: var(--text-secondary); }
.icon-btn:hover { background: var(--surface-hover); color: var(--accent); border-color: var(--accent); }

.welcome { background: linear-gradient(135deg, var(--surface), var(--surface-elevated)); padding: 32px; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 32px; display: flex; justify-content: space-between; align-items: center; }
.welcome h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.welcome h1 span { color: var(--accent); }
.welcome p { color: var(--text-secondary); font-size: 15px; max-width: 600px; }
.welcome img { width: 110px; height: 110px; object-fit: contain; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 36px; }
.card { background: var(--surface); border: 1px solid var(--border); padding: 24px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card h4 { color: var(--text-secondary); font-size: 13px; font-weight: 600; text-transform: uppercase; margin-bottom: 10px; }
.card h2 { font-size: 32px; font-weight: 700; color: var(--text-main); }


/* ===========================
   Public Navigation & Topbar
   =========================== */
.public-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(7, 13, 24, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.public-nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}

.public-nav-links a:hover, .public-nav-links a.active {
    color: var(--accent);
}

.public-hero {
    padding: 80px 40px 60px;
    text-align: center;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.public-hero h1 {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    line-height: 1.1;
}

.public-hero h1 span {
    color: var(--accent);
}

.public-hero p {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 650px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.boom-pick-badge {
    background: linear-gradient(135deg, var(--accent), #d97706);
    color: #070d18;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.section { margin-bottom: 40px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-title h2 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }

.matches { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.matches--list { display: flex; flex-direction: column; gap: 10px; }
.matches--list .football-match-card { padding: 14px 18px; }
.matches--list .match-meta { margin-top: 8px; }
.match-statistics { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; color: var(--accent); font-size: 12px; font-weight: 700; text-decoration: none; }
.match-statistics:hover { background: var(--surface-hover); border-color: var(--accent); }
.live-view-button[aria-pressed="true"] { background: var(--accent); color: #111827; border-color: var(--accent); }
#boomPredictionsContainer { min-width: 0; }
#boomPredictionsContainer article > div:last-child > div { min-width: 0; overflow: hidden; }
#boomPredictionsContainer article > div:last-child > div > div[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important; min-width: 0; }
#boomPredictionsContainer article b { overflow-wrap: anywhere; }
#aboutContent { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.about-card { padding: 22px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 12px; animation: about-reveal .45s ease both; transition: transform .2s ease, border-color .2s ease; }
.about-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.about-card i { color: var(--accent); font-size: 20px; margin-bottom: 12px; }
.about-card h3 { color: var(--text-main); margin-bottom: 8px; }
.about-card p { margin: 0; }
.contact-card { display: flex; align-items: flex-start; gap: 14px; padding: 18px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 10px; transition: transform .2s ease, border-color .2s ease; }
.contact-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.contact-card i { color: var(--accent); font-size: 18px; width: 22px; text-align: center; }
@keyframes about-reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.match-card, .fixture-card, .result-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); transition: var(--transition); cursor: pointer; }
.match-card:hover, .fixture-card:hover, .result-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.match-header { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 16px; text-transform: uppercase; }
.match-header .live { background: rgba(239, 68, 68, 0.15); color: var(--live); padding: 3px 10px; border-radius: var(--radius-pill); font-weight: 700; }
.team { display: flex; align-items: center; justify-content: space-between; margin: 12px 0; }
.team-info { display: flex; align-items: center; gap: 12px; }
.team-logo { width: 32px; height: 32px; object-fit: contain; }
.team-name { font-weight: 600; font-size: 15px; color: var(--text-main); }
.score { font-size: 18px; font-weight: 700; color: var(--accent); }
.match-status { color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: 11px; }
.match-meta { color: var(--text-secondary); font-size: 12px; margin-top: 14px; }
.data-state { width: 100%; padding: 48px 24px; text-align: center; color: var(--text-secondary); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-lg); }
.data-state h2, .data-state h3 { color: var(--text-main); margin-bottom: 8px; }
.data-state p { margin-bottom: 16px; }
.data-state--error { border-color: rgba(239, 68, 68, .45); }
.data-updated { color: var(--text-secondary); font-size: 12px; margin-top: 12px; text-align: right; }
.public-page { max-width: 1120px; margin: 0 auto; padding: 40px; }
.back-link { display: inline-block; margin-bottom: 22px; color: var(--accent); text-decoration: none; font-weight: 600; }
.back-link { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 9px 14px; cursor: pointer; font: inherit; }
.site-footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 32px 40px 20px; color: var(--text-secondary); font-size: 13px; }
.site-footer__grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; }
.site-footer strong { color: var(--text-main); font-family: 'Outfit', sans-serif; font-size: 18px; }
.site-footer p { margin-top: 8px; line-height: 1.6; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav span { color: var(--text-main); font-weight: 700; margin-bottom: 2px; }
.site-footer a { color: var(--text-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer__legal { max-width: 1200px; margin: 28px auto 0; padding-top: 16px; border-top: 1px solid var(--border); }
.match-details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.match-scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; padding: 36px 16px; margin: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.match-team { display: flex; align-items: center; gap: 14px; font-size: 18px; }
.match-team:last-child { justify-content: flex-end; text-align: right; }
.match-team img { width: 64px; height: 64px; object-fit: contain; }
.match-score { font: 800 34px 'Outfit', sans-serif; color: var(--accent); white-space: nowrap; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.detail-grid > div { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: var(--surface-hover); border-radius: var(--radius-md); }
.detail-grid span { color: var(--text-secondary); font-size: 12px; }
.unavailable-panel { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.unavailable-panel h2 { margin-bottom: 8px; }
.unavailable-panel > p { color: var(--text-secondary); margin-bottom: 14px; }

.table-container { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th { background: var(--surface-elevated); padding: 16px 20px; font-weight: 600; color: var(--text-secondary); border-bottom: 1px solid var(--border); font-size: 12px; text-transform: uppercase; }
td { padding: 14px 20px; border-bottom: 1px solid var(--border); color: var(--text-main); }
tr:hover td { background: var(--surface-hover); }

select { background: var(--surface); color: var(--text-main); border: 1px solid var(--border); padding: 10px 16px; border-radius: var(--radius-md); outline: none; font-size: 14px; }
button, .btn { padding: 11px 20px; background: var(--accent); color: #070d18; border: none; border-radius: var(--radius-md); font-weight: 600; font-size: 14px; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; }
button:hover, .btn:hover { background: var(--accent-hover); transform: translateY(-2px); }

#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface-elevated); color: var(--text-main); padding: 14px 20px; border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; }
.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid var(--live); }

@media(max-width: 1024px) {
    .sidebar { width: 80px; padding: 20px 10px; }
    .sidebar span { display: none; }
    .main { margin-left: 80px; max-width: calc(100% - 80px); }
    .cards { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width: 768px) {
    .cards { grid-template-columns: 1fr; }
    .topbar { flex-direction: column; align-items: stretch; }
    .search-box { width: 100%; }
    .welcome { flex-direction: column; text-align: center; gap: 20px; }
    .public-page { padding: 24px 16px; }
    .match-scoreboard { grid-template-columns: 1fr; text-align: center; }
    .match-team, .match-team:last-child { justify-content: center; text-align: center; }
    .match-score { order: -1; }
    .site-footer { padding: 26px 16px 18px; }
    .site-footer__grid { grid-template-columns: 1fr; gap: 20px; }
}

/* Admin prediction and team forms */
#predictionModal label, #teamModal label { display: flex; flex-direction: column; gap: 6px; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
#predictionModal input, #predictionModal textarea, #teamModal input { width: 100%; box-sizing: border-box; padding: 10px 12px; background: var(--bg-primary); border: 1px solid var(--border); color: var(--text-main); border-radius: 8px; font: inherit; }
#predictionModal input[type="checkbox"] { width: auto; padding: 0; accent-color: var(--accent); }
#predictionModal textarea { resize: vertical; min-height: 96px; }
#adminDropdownMenu button { width: 100%; background: transparent; color: var(--text-main); justify-content: flex-start; padding: 9px 10px; }
#adminDropdownMenu button:hover { background: var(--surface-hover); color: var(--accent); transform: none; }
@media (max-width: 768px) {
  .public-navbar { padding: 14px 16px !important; flex-wrap: wrap; gap: 12px; }
  .public-navbar .public-nav-links { order: 3; width: 100%; overflow-x: auto; gap: 14px !important; padding-bottom: 4px; }
  #predictionModal, #teamModal { padding: 8px !important; }
  #predictionModal > div, #teamModal > div { padding: 18px !important; }
  #predictionModal [style*="justify-content:flex-end"] { flex-wrap: wrap; }
  .table-container { overflow-x: auto; }
    #aboutContent { grid-template-columns: 1fr; }
    #contactContent { padding: 16px !important; }
}
/* Modern Competition Selector */
.boom-competition-selector { position: relative; width: 100%; max-width: 380px; font-family: 'Inter', sans-serif; }
.boom-selector-trigger { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); padding: 12px 18px; border-radius: var(--radius-md); cursor: pointer; color: var(--text-main); font-weight: 600; font-size: 14px; transition: var(--transition); }
.boom-selector-trigger:hover { border-color: var(--accent); background: var(--surface-hover); }
.boom-selector-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.boom-selector-trigger i.fa-chevron-down { transition: transform 0.2s ease; }
.boom-selector-trigger[aria-expanded="true"] i.fa-chevron-down { transform: rotate(180deg); }
.boom-selector-dropdown { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); z-index: 1000; max-height: 440px; overflow-y: auto; padding: 12px; opacity: 0; transform: translateY(-6px); visibility: hidden; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease; }
.boom-competition-selector.open .boom-selector-dropdown { opacity: 1; transform: translateY(0); visibility: visible; pointer-events: auto; }
.boom-selector-search-wrap { position: relative; margin-bottom: 10px; }
.boom-selector-search-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); font-size: 13px; }
.boom-selector-search { width: 100%; padding: 10px 14px 10px 38px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--text-main); font-size: 13px; outline: none; }
.boom-selector-search:focus { border-color: var(--accent); }
.boom-country-item { border-bottom: 1px solid var(--border); }
.boom-country-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; cursor: pointer; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--text-main); transition: var(--transition); }
.boom-country-header:hover { background: var(--surface-hover); color: var(--accent); }
.boom-country-leagues { display: none; padding-left: 16px; padding-bottom: 8px; }
.boom-country-item.expanded .boom-country-leagues { display: block; }
.boom-league-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; border-radius: 6px; font-size: 13px; color: var(--text-secondary); transition: var(--transition); }
.boom-league-item:hover { background: var(--surface-hover); color: var(--text-main); }
.boom-league-item.selected { background: var(--accent); color: #070d18; font-weight: 700; }
.boom-league-item img { width: 20px; height: 20px; object-fit: contain; }

/* Mobile: collapse fixed sidebar into a scrollable top bar so content gets full width */
@media (max-width: 768px) {
    .container { flex-direction: column; }
    .sidebar {
        position: static; width: 100%; flex-direction: column; gap: 10px;
        padding: 14px 16px; border-right: none; border-bottom: 1px solid var(--border);
    }
    .sidebar ul { flex-direction: row; overflow-x: auto; gap: 2px; padding-bottom: 4px; }
    .sidebar li { padding: 9px 12px; font-size: 13px; white-space: nowrap; }
    .logo { margin-bottom: 0; padding-left: 0; font-size: 20px; }
    .main { margin-left: 0; max-width: 100%; padding: 20px 16px; }
    .topbar { flex-wrap: wrap; }
    .search-box { width: 100%; }
    .controls-bar { flex-wrap: wrap; gap: 10px; }
    .controls-bar select { max-width: 100%; }
    .boom-competition-selector { max-width: 100%; }
}
