:root {
    /* Palette */
    --midnight-navy: #06131C;
    --stadium-blue: #102B3A;
    --pitch-green: #25634A;
    --fixture-gold: #D9A742;
    --signal-red: #B74747;
    --panel-white: rgba(248, 248, 244, 0.94);
    --glass-dark: rgba(6, 19, 28, 0.82);
    --light-text: #F5F7F4;
    --dark-text: #0E2028;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--light-text);
    background-color: var(--midnight-navy);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--fixture-gold);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Background Logic */
.home-page {
    background-image: url('images/stadium-night-background.png');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
}

.internal-page {
    background-color: var(--midnight-navy);
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.main-header {
    background: var(--glass-dark);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(217, 167, 66, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fixture-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: var(--light-text);
}

.main-nav a:hover, .main-nav a.active {
    color: var(--fixture-gold);
}

.header-right .tournament-stage {
    background: var(--fixture-gold);
    color: var(--midnight-navy);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--fixture-gold);
    transition: 0.3s;
}

/* Home Layout Elements */
.main-content {
    flex: 1;
}

.hero-section {
    text-align: center;
    padding: 4rem 2rem 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.hero-content .subline {
    font-size: 1.25rem;
    color: var(--fixture-gold);
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Fixture Room Board */
.fixture-room {
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.fixture-board-container {
    max-width: 1000px;
    width: 100%;
}

.fixture-board {
    background: var(--glass-dark);
    padding: 2rem;
    border: 2px solid var(--fixture-gold);
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* Card Styles */
.match-card {
    background: var(--panel-white);
    border-radius: 8px;
    padding: 1.5rem;
    color: var(--dark-text);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.match-card:hover {
    transform: translateY(-2px);
}

.match-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(14, 32, 40, 0.1);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.round-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--pitch-green);
    letter-spacing: 0.5px;
}

.time-label {
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--stadium-blue);
    color: var(--light-text);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.team {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.team:last-child {
    justify-content: flex-end;
}

.team-flag {
    width: 48px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.team-name {
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.vs-badge {
    font-size: 1rem;
    font-weight: 700;
    color: var(--signal-red);
    padding: 0 1rem;
}

/* Specific Card Layouts */
.compact-teams .team-name {
    font-size: 1.25rem;
}

.compact-teams .team-flag {
    width: 36px;
    height: 24px;
}

.vs-badge.small {
    font-size: 0.85rem;
}

/* Editorial Note */
.editorial-note {
    text-align: center;
    padding: 3rem 2rem;
}

.editorial-note .container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--glass-dark);
    padding: 2rem;
    border-left: 4px solid var(--fixture-gold);
    border-radius: 4px;
}

.editorial-note h2 {
    font-size: 1.2rem;
    color: var(--fixture-gold);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.editorial-note p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Internal Pages */
.page-content {
    flex: 1;
    padding: 4rem 2rem;
}

.page-content .container {
    max-width: 800px;
    margin: 0 auto;
}

.page-content h1 {
    font-size: 2.5rem;
    color: var(--fixture-gold);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.content-block {
    background: var(--stadium-blue);
    padding: 2.5rem;
    border-radius: 8px;
    border-top: 4px solid var(--fixture-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.content-block h2 {
    color: var(--fixture-gold);
    margin: 2rem 0 1rem;
    font-size: 1.4rem;
}

.content-block p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--light-text);
}

.action-row {
    margin-top: 3rem;
    text-align: left;
}

/* Forms */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--fixture-gold);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    background: var(--midnight-navy);
    color: var(--light-text);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--fixture-gold);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--pitch-green);
    color: var(--light-text);
}

.btn-primary:hover {
    background: #1e523d;
}

.btn-gold {
    background: var(--fixture-gold);
    color: var(--midnight-navy);
}

.btn-gold:hover {
    background: #c39233;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--fixture-gold);
    color: var(--fixture-gold);
}

.btn-secondary:hover {
    background: rgba(217, 167, 66, 0.1);
}

.btn-text {
    background: none;
    color: var(--light-text);
    text-decoration: underline;
    padding: 0.8rem 1rem;
}

.btn-text:hover {
    color: var(--fixture-gold);
}

/* Footer */
.main-footer {
    background: var(--glass-dark);
    padding: 3rem 2rem 2rem;
    border-top: 1px solid rgba(217, 167, 66, 0.2);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-disclaimer {
    background: rgba(183, 71, 71, 0.1);
    border: 1px solid rgba(183, 71, 71, 0.3);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.footer-disclaimer p {
    font-size: 0.85rem;
    color: #e0e0e0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--fixture-gold);
}

.footer-links a:hover {
    color: var(--light-text);
}

.footer-copyright {
    font-size: 0.85rem;
    color: #888;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--stadium-blue);
    border-top: 2px solid var(--fixture-gold);
    padding: 1.5rem 2rem;
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.cookie-content p {
    font-size: 0.95rem;
    margin: 0;
    flex: 1 1 300px;
}

.cookie-content a {
    color: var(--fixture-gold);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Breakpoints */

/* Desktop Layout for Fixture Board */
@media (min-width: 768px) {
    .fixture-board {
        grid-template-columns: 1fr 1fr;
    }
    
    .fixture-card, .match-card.top-row {
        grid-column: 1 / -1;
    }

    .match-card.bottom-row {
        grid-column: span 1;
    }
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: flex;
        z-index: 200;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background: var(--stadium-blue);
        padding-top: 5rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav a {
        display: block;
        padding: 1.5rem 2rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .header-right {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .team-name {
        font-size: 1.2rem;
    }

    .compact-teams .team-name {
        font-size: 1.1rem;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .match-teams, .compact-teams {
        flex-direction: column;
        gap: 1rem;
    }

    .team {
        width: 100%;
        justify-content: center;
    }

    .team:last-child {
        justify-content: center;
        flex-direction: row-reverse;
    }

    .vs-badge {
        padding: 0.5rem 0;
    }
}