:root {
    --primary-color: #0d1b2a;
    --secondary-color: #1b263b;
    --accent-color: #e0aa3e;
    --text-color: #f0f0f0;
    --text-muted: #a0a0a0;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --gradient: linear-gradient(135deg, #e0aa3e 0%, #b8860b 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Global fix for sticky headers */
}

section {
    scroll-margin-top: 100px;
    /* Fallback/Specific adjusting */
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px var(--accent-color);
    }

    50% {
        box-shadow: 0 0 20px var(--accent-color);
    }

    100% {
        box-shadow: 0 0 5px var(--accent-color);
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(13, 27, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.menu-toggle {
    display: none;
}


.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo span {
    color: var(--white);
    text-transform: uppercase;
}

.logo span strong {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: url('../images/hero_cricket.jpg') no-repeat center center/cover;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(13, 27, 42, 0.6), rgba(13, 27, 42, 0.8));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(to right, #fff, #e0aa3e);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease-out forwards;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--gradient);
    color: #000;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 1s ease-out 0.6s forwards;
    opacity: 0;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(224, 170, 62, 0.3);
}

/* Features Section */
.features {
    padding: 5rem 10%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
    margin-top: -100px;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s, background 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.feature-text {
    color: var(--text-muted);
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.85rem;
}


/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
    }

    .logo {
        font-size: 1rem;
    }

    .logo img {
        height: 40px;
    }

    .menu-toggle {
        display: block;
        cursor: pointer;
    }

    .menu-toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        -webkit-transition: all 0.3s ease-in-out;
        transition: all 0.3s ease-in-out;
        background-color: var(--white);
    }

    /* Mobile Menu Active State (Hamburger to X) */
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        top: 70px;
        /* Below navbar */
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(13, 27, 42, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: 0.3s;
        border-top: 1px solid var(--glass-border);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .features,
    .teams-section,
    .rules-section {
        padding: 4rem 5%;
        margin-top: 0;
    }

    .teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.5rem;
    }
}

/* Teams Section */
.teams-section {
    padding: 4rem 10%;
    position: relative;
    z-index: 2;
    background: rgba(13, 27, 42, 0.6);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.teams-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Centers items in the last row too */
    gap: 2rem;
}

.team-card {
    flex: 0 1 220px;
    /* Base width, allows shrinking but not growing too much to keep uniform look */
    /* Or if we want them to respond like grid: flex: 1 1 200px; max-width: 300px; */
    min-width: 200px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.team-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--glass-border);
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-name {
    font-size: 1.1rem;
    color: var(--white);
    font-weight: 600;
}

/* Rules Section */
.rules-section {
    padding: 5rem 10%;
    background: var(--secondary-color);
    position: relative;
    z-index: 2;
}

.rules-content {
    max-width: 1200px;
    /* Wider for grid */
    margin: 0 auto;
    padding-bottom: 3rem;
    /* Add spacing before footer inside section if needed, though usually margin is better */
}

.rules-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Grid layout */
    gap: 1.5rem;
    /* Gap between cards */
}

.rules-list li {
    background: rgba(255, 255, 255, 0.03);
    /* Lighter glass */
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--accent-color);
    /* Accent border */
    border-radius: 12px;
    padding: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: flex-start;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rules-list li:hover {
    transform: translateY(-5px);
    /* Lift up */
    background: rgba(255, 255, 255, 0.08);
    /* Brighter hover */
    box-shadow: 0 10px 20px rgba(224, 170, 62, 0.15);
    /* Golden glow */
    border-color: var(--accent-color);
}

.rules-list li i {
    color: var(--accent-color);
    margin-right: 1rem;
    font-size: 1.5rem;
    /* Larger icon */
    margin-top: 2px;
    min-width: 30px;
    text-align: center;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: var(--secondary-color);
    border: 1px solid var(--accent-color);
    padding: 2.5rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 20px rgba(224, 170, 62, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--white);
    text-transform: uppercase;
}

.modal-message {
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.modal-btn {
    padding: 0.8rem 2rem;
    background: var(--gradient);
    border: none;
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.modal-btn:hover {
    transform: scale(1.05);
}