/* ==========================================================================
   Design System variables & Pitch Reset
   ========================================================================== */
:root {
    --bg-darkest: #0a0a0a;
    --bg-card: rgba(22, 22, 22, 0.9);
    --gold: #d4af37;
    --gold-hover: #f3e5ab;
    --accent-blue: #001aff;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --danger: #ff3333;
    --success: #00ff66;
    --border-color: #222222;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-darkest);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   Cinematic Full-Screen Splash Overlay
   ========================================================================== */
#splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #151515 0%, #050505 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s cubic-bezier(0.55, 0.055, 0.675, 0.19), visibility 0.6s;
}

#splash.zooming {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    text-align: center;
}

.logo-wrapper {
    margin-bottom: 2rem;
}

.splash-ball {
    font-size: 5rem;
    color: var(--gold);
    animation: ballSpin 3s linear infinite;
    margin-bottom: 1rem;
}

.splash-title {
    font-size: 3.5rem;
    letter-spacing: 6px;
    font-weight: 900;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.splash-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    letter-spacing: 4px;
}

.loader-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.loader-dots span {
    width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    animation: dotPulse 1.4s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.loader-dots span:nth-child(2) { animation-delay: -0.16s; }
.loader-dots span:nth-child(3) { animation-delay: -0.08s; }

@keyframes ballSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.2); opacity: 1; background: var(--gold); }
}

.skip {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    cursor: pointer;
    border: 1px solid #333;
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
    transition: all 0.3s;
}

.skip:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
}

/* ==========================================================================
   Slide Out Navigation Drawer System
   ========================================================================== */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: #0f0f0f;
    z-index: 2500;
    box-shadow: 5px 0 25px rgba(0,0,0,0.7);
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.sidebar-menu.open {
    left: 0;
}

.drawer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 800;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.close-sidebar {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
}

.menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-list li a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-main);
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}

.menu-list li a:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
}

.menu-list .divider {
    height: 1px;
    background: var(--border-color);
    margin: 15px 0;
}

.menu-list .section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    padding-left: 15px;
    margin-bottom: 5px;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.drawer-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.sidebar-profile-section {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--gold);
}

/* ==========================================================================
   Header Navbar Core Layout
   ========================================================================== */
header {
    background-color: #0d0d0d;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    width: 92%;
    max-width: 1400px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left-block {
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

.menu-toggle:hover span {
    background-color: var(--gold);
}

.desktop-nav a {
    color: var(--text-main);
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.desktop-nav a:hover, .desktop-nav a.active {
    color: var(--gold);
}

.gold-txt { color: var(--gold) !important; }
.live-pulse { animation: redBlink 1.5s infinite; color: var(--danger); }
@keyframes redBlink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ==========================================================================
   Viewports Routing Setup
   ========================================================================== */
.page-route { display: block; }
.page-route.hidden { display: none !important; }

/* Route A: Home Marketing Layout Portal */
.hero-section {
    text-align: center;
    padding: 5rem 1.5rem;
    background: linear-gradient(135deg, #111111 0%, #1c1a12 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero-section h2 { font-size: 2.2rem; margin-bottom: 1rem; font-weight: 800; }
.hero-section p { color: var(--text-muted); font-size: 1.1rem; max-width: 700px; margin: 0 auto 1.5rem; }

#clickBtn {
    background-color: var(--gold);
    color: #000;
    padding: 14px 28px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

#clickBtn:hover {
    background-color: var(--gold-hover);
    transform: translateY(-2px);
}

.features-section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: auto;
}

.features-section h2 { text-align: center; margin-bottom: 3rem; font-size: 2rem; }
.grid-container { display: grid; grid-template-columns: 1fr; gap: 25px; }

.card {
    background: #111111;
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 8px;
    position: relative;
    transition: transform 0.3s;
}

.card:hover { transform: translateY(-5px); border-color: var(--gold); }
.card-icon-header { font-size: 2rem; color: var(--gold); margin-bottom: 15px; }
.card h3 { margin-bottom: 10px; font-size: 1.3rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

/* Platform Form Elements Layout */
.form-section { background-color: #090909; padding: 5rem 1.5rem; border-top: 1px solid var(--border-color); }
.form-section h2 { text-align: center; margin-bottom: 10px; font-size: 2rem; }
.form-section p { text-align: center; color: var(--text-muted); margin-bottom: 2.5rem; }

form {
    background: #111;
    border: 1px solid var(--border-color);
    padding: 35px;
    border-radius: 8px;
    max-width: 500px;
    margin: auto;
}

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: bold; font-size: 0.9rem; }
.form-group input {
    width: 100%;
    padding: 12px;
    background: #181818;
    border: 1px solid #333;
    border-radius: 4px;
    color: white;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus { outline: none; border-color: var(--gold); }
form button[type="submit"] {
    width: 100%;
    background-color: var(--gold);
    color: black;
    padding: 14px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}
form button[type="submit"]:hover { background-color: var(--gold-hover); }

/* ==========================================================================
   Route B: Integrated Live Match Center App Shell
   ========================================================================== */
.app-container {
    max-width: 550px;
    margin: 2.5rem auto;
    background-color: #111;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 680px;
}

.app-inner-header {
    background: #151515;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.search-container {
    position: relative;
    margin-bottom: 15px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

#team-search {
    width: 100%;
    padding: 10px 10px 10px 38px;
    background: #202020;
    border: 1px solid #333;
    border-radius: 6px;
    color: white;
}

#team-search:focus { outline: none; border-color: var(--gold); }

.menu-tabs { display: flex; gap: 10px; margin-bottom: 15px; }
.menu-btn {
    flex: 1;
    padding: 10px;
    background: #202020;
    border: 1px solid transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.menu-btn.is-selected { background: var(--gold); color: black; }

.league-filter { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.filter-btn {
    background: #1a1a1a;
    border: 1px solid #333;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    font-size: 0.85rem;
}

.filter-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(212, 175, 55, 0.05); }

.app-view-body { pading: 20px; flex: 1; overflow-y: auto; padding: 20px; }
.sub-view-panel { display: block; }
.sub-view-panel.hidden { display: none !important; }

/* Interactive Cards Design */
.match-card, .news-card {
    background: #161616;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.match-card:hover { border-color: #444; }
.match-card-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 12px; }
.status-badge { padding: 2px 6px; border-radius: 4px; font-weight: bold; font-size: 0.7rem; }
.status-badge.live { background: var(--danger); color: white; }
.status-badge.upcoming { background: #333; color: var(--text-muted); }

.teams-grid { display: flex; justify-content: space-between; align-items: center; }
.team-row-block { display: flex; flex-direction: column; align-items: center; width: 35%; text-align: center; }
.team-avatar-box { width: 44px; height: 44px; background: #252525; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; font-size: 1.2rem; color: var(--gold); }
.score-box-center { width: 30%; text-align: center; }
.score-txt-val { font-size: 1.6rem; font-weight: 900; letter-spacing: 2px; }
.match-timer-val { font-size: 0.8rem; color: var(--gold); }

/* News Viewport Specific Cards */
.news-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.news-card p { color: var(--text-muted); font-size: 0.9rem; }
.news-timestamp { display: block; margin-top: 10px; font-size: 0.75rem; color: var(--gold); }

/* Modal Poll Architecture Setup */
#pollModal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    z-index: 5000;
    display: flex; align-items: center; justify-content: center;
}

#pollModal.modalhidden { display: none !important; }
.modal-content-wrapper { background: #151515; border: 1px solid var(--border-color); padding: 30px; border-radius: 12px; width: 90%; max-width: 420px; position: relative; }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 1.8rem; color: var(--text-muted); cursor: pointer; }
#poll-title-heading { margin-bottom: 20px; font-size: 1.2rem; text-align: center; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.poll-options-stack { display: flex; flex-direction: column; gap: 10px; }
.poll-opt-btn { width: 100%; padding: 12px; background: #222; border: 1px solid #333; color: white; font-weight: bold; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.poll-opt-btn:hover { background: var(--gold); color: black; }

/* Dynamic Poll Graphical Bars Styling */
.poll-bar-wrapper { margin-top: 15px; }
.poll-label-info { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 4px; }
.poll-track-bg { width: 100%; height: 8px; background: #222; border-radius: 4px; overflow: hidden; }
.poll-fill-metrics { height: 100%; background: var(--gold); border-radius: 4px; transition: width 0.6s ease-out; }

/* Global Footers Layout */
footer { background-color: #0a0a0a; border-top: 1px solid var(--border-color); text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.9rem; }

/* ==========================================================================
   Responsive Breakpoints Responsive View Matrix
   ========================================================================== */
@media screen and (min-width: 768px) {
    .grid-container { grid-template-columns: repeat(2, 1fr); }
    .header-container { width: 88%; }
    .app-container { max-width: 650px; }
}

@media screen and (min-width: 1025px) {
    .grid-container { grid-template-columns: repeat(3, 1fr); }
    .header-container { width: 82%; }
}

/* ==========================================================================
   Light Theme Support (combined CSS)
   ========================================================================== */
body.light-theme {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

body.light-theme header {
    background-color: #1a252f;
    color: #ffffff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

body.light-theme .header-container {
    width: 90%;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.light-theme nav a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
    transition: color 0.3s ease;
}

body.light-theme nav a:hover,
body.light-theme nav a.active {
    color: #3498db;
    text-decoration: underline;
}

body.light-theme .hero-section {
    text-align: center;
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
}

body.light-theme #clickBtn {
    background-color: #e74c3c;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

body.light-theme #clickBtn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

body.light-theme #message {
    margin-top: 1.5rem;
    font-weight: bold;
    font-size: 1.1rem;
}

body.light-theme .features-section {
    padding: 3rem 1.5rem;
    max-width: 1200px;
    margin: auto;
}

body.light-theme .features-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

body.light-theme .grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

body.light-theme .card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-top: 5px solid #3498db;
}

body.light-theme .form-section {
    background-color: #eaeded;
    padding: 3rem 1.5rem;
}

body.light-theme form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    max-width: 500px;
    margin: auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

body.light-theme .form-group {
    margin-bottom: 1.5rem;
}

body.light-theme .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

body.light-theme .form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

body.light-theme .form-group input:focus {
    outline: none;
    border-color: #3498db;
}

body.light-theme form button[type="submit"] {
    width: 100%;
    background-color: #2ecc71;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
}

body.light-theme form button[type="submit"]:hover {
    background-color: #27ae60;
}

body.light-theme footer {
    background-color: #1a252f;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* ==========================================================================
   Enriched Premium Features Visual UI
   ========================================================================== */
.feature-card-premium {
    display: flex;
    flex-direction: column;
    padding: 0 !important; /* Allow the layout elements to sit flush */
    overflow: hidden;
    background: #121212 !important;
    border: 1px solid var(--border-color);
}

.card-text-content {
    padding: 25px;
    position: relative;
}

/* Simulated Visual Previews (Replacing Static Images) */
.card-visual-preview {
    height: 160px;
    background: #1a1a1a;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    display: flex;
    padding: 15px;
    gap: 15px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Visual 1: Squad Mini Pitch Styles */
.squad-preview {
    background: radial-gradient(circle at center, #112916 0%, #07120a 100%);
}

.mini-pitch {
    width: 100px;
    height: 130px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    position: relative;
    background: linear-gradient(to bottom, transparent 49%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.1) 51%, transparent 52%);
}

.pitch-player {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--gold);
    color: black;
    border-radius: 50%;
    font-size: 9px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-st { top: 15px; left: 42px; }
.pos-lm { top: 50px; left: 10px; }
.pos-rm { top: 50px; right: 10px; }
.pos-gk { bottom: 10px; left: 42px; background: #fff; }

.mini-roster-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.roster-row {
    background: rgba(0,0,0,0.4);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    border-left: 2px solid var(--gold);
}

.status-active {
    color: var(--gold);
    font-weight: bold;
}

/* Visual 2: Banner Creator Canvas Display Mockup */
.banner-preview {
    background: #161616;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
}

.banner-canvas-mockup {
    width: 90%;
    height: 90px;
    background: url('https://images.unsplash.com/photo-1508098682722-e99c43a406b2?auto=format&fit=crop&w=400&q=80') center/cover;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.banner-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.3));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.match-vs-display {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 1px;
}

.vs-badge {
    font-size: 10px;
    background: var(--gold);
    color: black;
    padding: 1px 4px;
    border-radius: 3px;
}

.banner-footer-meta {
    font-size: 8px;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 1px;
}

.canvas-controls-simulator {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 90%;
}

.control-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.control-text {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
}

/* Visual 3: Performance Analytics Chart Layouts */
.analytics-preview {
    background: #141414;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.chart-bars-container {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    height: 80px;
    width: 80%;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
}

.chart-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    align-items: center;
}

.bar-fill {
    width: 100%;
    background: linear-gradient(to top, #8a6f27, var(--gold));
    border-radius: 3px 3px 0 0;
    animation: growBar 1.5s ease-out forwards;
}

.bar-lbl {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 4px;
}

.analytics-metrics-panel {
    font-size: 11px;
    background: rgba(0, 255, 102, 0.1);
    color: var(--success);
    padding: 2px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 102, 0.2);
}

/* Supplementary Detail Elements */
.feature-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #222;
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--gold);
    border: 1px solid #333;
}

@keyframes growBar {
    from { height: 0; }
    to { height: auto; }
}
