/* ================================================== */
/*       APE SQUAD ESPORTS - ENHANCED STYLE SHEET     */
/* ================================================== */

/* --- CSS Custom Properties (Enhanced Theme) --- */
:root {
    --primary-purple: #9c46c8;
    --secondary-purple: #7346d9;
    --accent-orange: #f29045;
    --standout-blue: #03b7fa;
    --jungle-green: #1a4314;
    --jungle-dark: #0f2a0a;
    --jungle-light: #2d5a24;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --light-text: #f4f4f4;
    --font-headings: 'Bebas Neue', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --font-tech: 'Orbitron', monospace;
    --glow-shadow: 0 0 20px;
    --pulse-duration: 2s;
}

/* --- Global Styles & Reset --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    background: var(--dark-bg);
    color: var(--light-text);
    overflow-x: hidden;
    position: relative;
}

/* --- Animated Background Particles --- */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(156, 70, 200, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(3, 183, 250, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 40% 40%, rgba(242, 144, 69, 0.04) 0%, transparent 40%);
    animation: particleFloat 25s ease-in-out infinite;
    z-index: -1;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(15px) rotate(240deg); }
}

/* --- Core Layout & Typography --- */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

h1, h2, h3 {
    font-family: var(--font-headings);
    letter-spacing: 2px;
    color: var(--primary-purple);
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 8px var(--primary-purple);
    position: relative;
}

h2 {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 50px;
    text-transform: uppercase;
    background: linear-gradient(45deg, var(--primary-purple), var(--secondary-purple), var(--accent-orange), var(--standout-blue));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    text-shadow: none;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* --- Glitch Effect for Headers --- */
.glitch {
    position: relative;
    animation: glitch 3s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--standout-blue);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--accent-orange);
    z-index: -2;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-2px, -2px); }
    20% { transform: translate(2px, 2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    30% { transform: translate(2px, -2px); }
    60% { transform: translate(-2px, 2px); }
}

/* --- Header & Navigation --- */
header {
    background: 
        url('images/header-background.jpg') no-repeat center center/cover,
        linear-gradient(135deg, rgba(10, 10, 10, 0.8), rgba(156, 70, 200, 0.4));
    backdrop-filter: blur(15px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-purple), var(--secondary-purple), var(--accent-orange), var(--standout-blue)) 1;
    transition: all 0.3s ease;
}

header.scrolled {
    background: 
        url('images/header-background.jpg') no-repeat center center/cover,
        rgba(5, 5, 5, 0.9);
    box-shadow: 0 5px 30px rgba(156, 70, 200, 0.3);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo a {
    text-decoration: none;
}

header .logo h1 {
    font-size: 2.5rem;
    font-family: var(--font-tech);
    background: linear-gradient(45deg, var(--primary-purple), var(--secondary-purple), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

header nav li {
    display: inline;
}

header nav a {
    color: var(--light-text);
    text-decoration: none;
    font-family: var(--font-headings);
    font-size: 1.3rem;
    position: relative;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

header nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-purple), var(--standout-blue));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

header nav a:hover {
    color: var(--primary-purple);
    background: rgba(156, 70, 200, 0.1);
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.7),
        0 0 8px var(--primary-purple);
}

header nav a:hover::before {
    width: 100%;
}

/* --- Hero Section --- */
#hero {
    background: 
        url('/images/LOOP.mp4') no-repeat center center/cover,
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)),
        radial-gradient(circle at center, rgba(156, 70, 200, 0.1) 0%, transparent 70%);
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 98px,
            rgba(156, 70, 200, 0.02) 100px
        );
    animation: scanlines 3s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(100px); }
}

#hero .hero-content {
    z-index: 10;
    position: relative;
}

#hero h2 {
    font-size: 6rem;
    margin-bottom: 20px;
    animation: heroGlow 3s ease-in-out infinite;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 900;
    letter-spacing: 3px;
}

@keyframes heroGlow {
    0%, 100% { 
        text-shadow: 
            3px 3px 0px rgba(0, 0, 0, 0),
            4px 4px 8px rgba(0, 0, 0, 0),
            0 0 60px var(--primary-purple);
    }
    50% { 
        text-shadow: 
            3px 3px 0px rgba(0, 0, 0, 0),
            4px 4px 8px rgba(0, 0, 0, 0),
            0 0 60px var(--standout-blue);
    }
}

#hero p {
    font-size: 1.8rem;
    margin-bottom: 40px;
    font-family: var(--font-tech);
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.5s both;
    text-shadow: 
        2px 2px 0px rgba(0, 0, 0, 1),
        3px 3px 6px rgba(0, 0, 0, 0.8);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 600;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

/* --- Enhanced Buttons --- */
.btn {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-purple), var(--secondary-purple), var(--accent-orange));
    color: #fff;
    padding: 15px 40px;
    text-decoration: none;
    font-family: var(--font-tech);
    font-size: 1.3rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 
        0 5px 15px rgba(156, 70, 200, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 10px 25px rgba(156, 70, 200, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn:hover::before {
    left: 100%;
}

/* --- Team Section --- */
#team {
    background: 
        url('images/team-background.jpg') no-repeat center center/cover,
        linear-gradient(rgba(0, 0, 0, 1), rgba(0, 0, 0, 1)),
        radial-gradient(circle at 30% 70%, rgba(3, 183, 250, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    position: relative;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    perspective: 1000px;
}

.player-card {
    background: linear-gradient(145deg, var(--jungle-green), var(--jungle-dark));
    border: 2px solid transparent;
    border-radius: 20px;
    text-align: center;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    transform-style: preserve-3d;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary-purple), var(--secondary-purple), var(--accent-orange), var(--standout-blue));
    border-radius: 20px;
    padding: 2px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.player-card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(5deg);
    box-shadow: 
        0 20px 40px rgba(156, 70, 200, 0.3),
        0 0 30px rgba(3, 183, 250, 0.2);
}

.player-card:hover::before {
    opacity: 1;
}

.player-card img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-purple);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(156, 70, 200, 0.5);
}

.player-card:hover img {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--standout-blue);
    box-shadow: 0 0 30px rgba(3, 183, 250, 0.7);
}

.player-card h3 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-family: var(--font-tech);
    background: linear-gradient(45deg, var(--primary-purple), var(--standout-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.player-card p {
    color: var(--light-text);
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* --- Schedule Section --- */
#schedule {
    background: url('images/schedule-background.png') no-repeat center center/cover;
    background-attachment: fixed;
    position: relative;
}

#schedule::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 50px,
            rgba(156, 70, 200, 0.02) 52px
        );
    z-index: 1;
}

#schedule .container {
    position: relative;
    z-index: 2;
}

.schedule-container {
    display: grid;
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.match-card {
    background: linear-gradient(135deg, rgba(26, 67, 20, 0.9), rgba(15, 42, 10, 0.9));
    border: 2px solid var(--primary-purple);
    border-radius: 20px;
    padding: 30px 35px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(156, 70, 200, 0.1), transparent);
    transition: left 0.5s ease;
}

.match-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--standout-blue);
    box-shadow: 
        0 15px 35px rgba(156, 70, 200, 0.4),
        0 0 30px rgba(3, 183, 250, 0.2);
}

.match-card:hover::before {
    left: 100%;
}

.match-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.match-info h4 {
    font-family: var(--font-tech);
    font-size: 1.6rem;
    color: var(--accent-orange);
    margin: 0;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(242, 144, 69, 0.3);
}

.match-info p {
    font-size: 1rem;
    color: var(--light-text);
    opacity: 0.8;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.match-time {
    font-family: var(--font-tech);
    color: var(--standout-blue);
    font-weight: 700;
    font-size: 1.4rem;
    text-align: center;
    padding: 10px 20px;
    background: rgba(3, 183, 250, 0.1);
    border-radius: 10px;
    border: 1px solid var(--standout-blue);
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(3, 183, 250, 0.3);
}

.match-status {
    font-family: var(--font-tech);
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    background: linear-gradient(45deg, var(--primary-purple), var(--secondary-purple));
    color: #fff;
    text-align: center;
    box-shadow: 0 0 15px rgba(156, 70, 200, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* --- Loading Animation --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 1s ease-out 2s forwards;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--jungle-green);
    border-top: 3px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    #hero h2 {
        font-size: 4rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    header nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .match-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
    }
    
    .match-time {
        font-size: 1.2rem;
    }
}

/* ================================================== */
/*                  ENHANCED FOOTER                   */
/* ================================================== */

.site-footer {
    background: linear-gradient(135deg, var(--darker-bg), var(--jungle-dark));
    color: var(--light-text);
    padding: 60px 0 20px 0;
    position: relative;
    border-top: 4px solid;
    border-image: linear-gradient(90deg, var(--primary-purple), var(--standout-blue), var(--accent-orange)) 1;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); /* Fix for border-image */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.footer-section {
    flex: 1;
    min-width: 250px; /* Ensures sections don't get too squished */
}

.footer-section.about p {
    font-family: var(--font-body);
    opacity: 0.8;
    max-width: 350px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
}

.footer-section h3 {
    font-family: var(--font-headings);
    font-size: 1.8rem;
    color: var(--primary-purple);
    text-shadow: 0 0 8px rgba(156, 70, 200, 0.7);
    margin-bottom: 20px;
    position: relative;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: var(--light-text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.footer-section .links a {
    font-family: var(--font-headings);
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.footer-section .links a:hover {
    color: var(--accent-orange);
    padding-left: 8px;
    text-shadow: 0 0 5px var(--accent-orange);
}

.socials a {
    font-size: 1.8rem;
    margin-right: 20px;
}

.socials a:hover {
    color: var(--standout-blue);
    transform: scale(1.2) translateY(-3px);
    display: inline-block; /* Required for transform to work properly */
    text-shadow: 0 0 15px var(--standout-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.footer-bottom p {
    font-size: 0.9rem;
    opacity: 0.6;
    font-family: var(--font-tech);
    letter-spacing: 1px;
}

/* --- Footer Responsive Adjustments --- */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-section.about p {
        margin-left: auto;
        margin-right: auto;
    }

    .socials a {
        margin: 0 15px;
    }
}

/* ================================================== */
/*                  RANKINGS PAGE                     */
/* ================================================== */

#rankings {
    background: 
        linear-gradient(rgba(10, 10, 10, 0.7), var(--darker-bg)),
        radial-gradient(circle at 10% 20%, rgba(3, 183, 250, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(156, 70, 200, 0.05) 0%, transparent 40%);
    padding: 120px 0; /* Extra top padding for pages without a hero image */
}

.rankings-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.9;
}

.season-info {
    font-family: var(--font-tech);
    color: var(--accent-orange);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 25px;
    padding: 12px 20px;
    border: 1px solid rgba(242, 144, 69, 0.3);
    background: rgba(242, 144, 69, 0.05);
    border-radius: 8px;
    display: inline-block;
}

.rankings-image-container {
    max-width: 1000px;
    margin: 40px auto 0 auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 3px solid;
    border-image: linear-gradient(135deg, var(--primary-purple), var(--standout-blue)) 1;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); /* Fix for border-image display */
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(156, 70, 200, 0.2);
    transition: all 0.3s ease-in-out;
}

.rankings-image-container:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 50px rgba(3, 183, 250, 0.3);
    border-image: linear-gradient(135deg, var(--standout-blue), var(--accent-orange)) 1;
}

.rankings-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 10px; /* Rounds the corners of the image itself */
}

/* ================================================== */
/*                  DONATIONS PAGE                    */
/* ================================================== */

#donations {
    background: 
        linear-gradient(rgba(5, 5, 5, 0.8), var(--darker-bg) 70%),
        radial-gradient(circle at 50% 50%, rgba(156, 70, 200, 0.1), transparent 60%);
    padding: 120px 0;
}

.donation-content-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Image column, Text column */
    gap: 60px;
    align-items: center;
    margin-top: 50px;
}

/* --- Image Styling with Glow Effect --- */
.donation-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.donation-image-wrapper::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-purple), var(--standout-blue));
    border-radius: 20px;
    filter: blur(25px);
    opacity: 0.6;
    z-index: -1;
    animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.donation-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* --- Text and Button Styling --- */
.donation-text-wrapper h3 {
    font-family: var(--font-headings);
    font-size: 2.8rem;
    color: var(--light-text);
    text-shadow: 0 0 10px var(--accent-orange);
    margin-bottom: 25px;
}

.donation-text-wrapper p {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 20px;
}

.donation-buttons {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-primary-donate {
    background: linear-gradient(45deg, var(--accent-orange), var(--primary-purple));
    transform: scale(1.1);
    animation: button-pulse 2s ease-in-out infinite;
}

@keyframes button-pulse {
    50% {
        transform: scale(1.15);
        box-shadow: 
            0 10px 35px rgba(242, 144, 69, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.btn-primary-donate:hover {
    transform: scale(1.2) translateY(-3px); /* Enhance hover effect */
}

/* --- Responsive Adjustments for Donations Page --- */
@media (max-width: 992px) {
    .donation-content-grid {
        grid-template-columns: 1fr; /* Stack columns */
        gap: 50px;
    }
    .donation-text-wrapper {
        text-align: center;
    }
    .donation-buttons {
        justify-content: center;
    }
}

/* ================================================== */
/*                    MERCH PAGES                     */
/* ================================================== */

/* --- Merch Gallery Page Styling --- */
#merch-gallery {
    padding: 120px 0;
}

.merch-intro {
    text-align: center;
    max-width: 600px;
    margin: -30px auto 60px auto;
    font-size: 1.2rem;
    opacity: 0.8;
}

.merch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.merch-card {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    text-decoration: none;
    background: var(--jungle-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.merch-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(156, 70, 200, 0.3);
}

.merch-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.merch-card:hover .merch-card-image {
    transform: scale(1.05);
    filter: brightness(0.8);
}

.merch-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 20px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 20%, transparent);
    color: var(--light-text);
    transform: translateY(30%);
    transition: transform 0.4s ease;
}

.merch-card:hover .merch-card-info {
    transform: translateY(0);
}

.merch-card-title {
    font-family: var(--font-headings);
    font-size: 2rem;
    margin: 0;
    color: var(--light-text);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    transition: color 0.3s ease;
}

.merch-card:hover .merch-card-title {
    color: var(--accent-orange);
}

.merch-card-cta {
    font-family: var(--font-tech);
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.merch-card:hover .merch-card-cta {
    opacity: 1;
}


/* --- Individual Product Page Styling --- */
#product-page {
    padding: 120px 0;
}

.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.product-image-container img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.product-title {
    font-family: var(--font-headings);
    font-size: 4rem;
    line-height: 1.1;
    background: linear-gradient(45deg, var(--primary-purple), var(--standout-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-shadow: none;
}

.product-price {
    font-family: var(--font-tech);
    font-size: 2rem;
    color: var(--accent-orange);
    margin: 15px 0 25px 0;
}

.product-description {
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 30px;
}

.product-description ul {
    list-style-position: inside;
    padding-left: 5px;
    margin-top: 15px;
}

.product-info-container .btn {
    margin-bottom: 25px;
}

.back-link {
    color: var(--standout-blue);
    text-decoration: none;
    font-family: var(--font-tech);
    display: inline-block;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--accent-orange);
    transform: translateX(-5px);
}


/* --- Responsive for Product Pages --- */
@media (max-width: 992px) {
    .product-details-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================== */
/*             PRODUCT PAGE IMAGE CAROUSEL            */
/* ================================================== */

/* Overriding the old container style to work with the carousel */
.product-image-container {
    position: relative;
    overflow: hidden; /* This is important for rounded corners */
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.carousel-viewport {
    width: 100%;
    height: 100%;
    overflow: hidden; /* This hides the other slides */
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out; /* The sliding animation */
}

.carousel-slide {
    flex: 0 0 100%; /* Each slide takes up 100% of the viewport width */
    min-width: 100%;
    box-sizing: border-box;
}

.carousel-slide img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain; /* Use 'contain' to ensure the whole product is visible */
}

/* --- Carousel Buttons --- */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 10, 10, 0.6);
    color: var(--light-text);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    font-size: 1.2rem;
}

.carousel-button:hover {
    background: var(--primary-purple);
    border-color: var(--primary-purple);
    box-shadow: 0 0 15px var(--primary-purple);
}

.carousel-button.prev {
    left: 15px;
}

.carousel-button.next {
    right: 15px;
}

/* --- Carousel Indicator Dots --- */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator-dot.active {
    background: var(--standout-blue);
    box-shadow: 0 0 10px var(--standout-blue);
}

/* ================================================== */
/*          CORRECTED TOURNAMENTS PAGE STYLES         */
/* ================================================== */

/* --- Overrides for General Styles on the Tournaments Page --- */

#tournaments-page h2 {
    /* This rule ensures the main title on this page matches the global style */
    font-size: 3.5rem;
    background: linear-gradient(45deg, var(--primary-purple), var(--secondary-purple), var(--accent-orange), var(--standout-blue));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    text-shadow: none;
}

#tournaments-page .section-title {
    /* This overrides the global H3 style to be what we want for this page */
    color: var(--accent-orange);
    text-shadow: none;
    text-align: left;
    font-size: 2.5rem;
    border-left: 5px solid var(--jungle-green);
    padding-left: 15px;
    margin-bottom: 30px;
    margin-top: 50px;
}

#tournaments-page .section-title:first-of-type {
    margin-top: 0;
}

/* --- Styles for Tournament Cards --- */

#tournaments-page .tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

#tournaments-page .tournament-card {
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--jungle-green);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#tournaments-page .tournament-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

#tournaments-page .tournament-card.upcoming {
    border-color: var(--accent-orange);
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.3);
}

#tournaments-page .tournament-graphic img {
    width: 100%;
    height: auto;
    display: block;
}

#tournaments-page .tournament-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#tournaments-page .tournament-info h3 {
    /* Overriding the global H3 for the card title */
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--accent-orange);
    text-shadow: none;
    background: none;
    -webkit-text-fill-color: unset;
}

#tournaments-page .tournament-info .date {
    color: #bbb;
    font-style: italic;
    margin-bottom: 20px;
}

#tournaments-page .winners-podium,
#tournaments-page .status-info {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--jungle-green);
}

#tournaments-page .winners-podium h4,
#tournaments-page .status-info h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--light-text);
}

#tournaments-page .winners-podium ol {
    list-style: none;
    padding-left: 0;
}

#tournaments-page .winners-podium li {
    margin-bottom: 8px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

#tournaments-page .winners-podium li::before {
    font-family: var(--font-headings);
    font-weight: bold;
    margin-right: 10px;
    width: 40px;
}

#tournaments-page .winners-podium li:nth-child(1)::before { content: '1st:'; color: #ffd700; }
#tournaments-page .winners-podium li:nth-child(2)::before { content: '2nd:'; color: #c0c0c0; }
#tournaments-page .winners-podium li:nth-child(3)::before { content: '3rd:'; color: #cd7f32; }

#tournaments-page .tournament-links {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-top: 2px solid var(--jungle-green);
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* THIS IS THE KEY FIX: Specifically styling the buttons INSIDE the tournament cards */
#tournaments-page .tournament-links .btn {
    background: var(--accent-orange); /* Resetting background */
    color: #fff;
    padding: 10px 25px;
    text-decoration: none;
    font-family: var(--font-headings); /* Using a simpler font */
    font-size: 1.1rem;
    font-weight: normal; /* Resetting font weight */
    border: none;
    border-radius: 5px; /* Resetting border radius */
    text-transform: none; /* Resetting text transform */
    letter-spacing: 1px;
    box-shadow: none; /* Resetting box shadow */
    text-shadow: none;
}
#tournaments-page .tournament-links .btn:hover {
    background-color: #e07b00;
    transform: scale(1.05);
    box-shadow: none;
}
#tournaments-page .tournament-links .btn-secondary {
    background: transparent;
    border: 2px solid var(--accent-orange);
    color: var(--accent-orange);
}
#tournaments-page .tournament-links .btn-secondary:hover {
    background: var(--accent-orange);
    color: #fff;
}


/* --- New Styles for Tournament Modal & Accordion --- */
/* These styles are unique and should not conflict */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; transition: opacity 0.3s ease;
    overflow-y: auto; padding: 40px 0;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content {
    background: var(--dark-bg);
    border-radius: 15px;
    padding: 30px 40px; width: 90%; max-width: 800px;
    position: relative; transform: scale(0.95); transition: transform 0.3s ease;
    margin: auto;
    border: 3px solid;
    border-image: linear-gradient(135deg, var(--primary-purple), var(--standout-blue)) 1;
    box-shadow: 0 10px 40px rgba(156, 70, 200, 0.2);
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close-btn {
    position: absolute; top: 15px; right: 20px;
    background: none; border: none; color: var(--light-text); font-size: 2rem;
    font-family: sans-serif; cursor: pointer; line-height: 1;
    transition: color 0.3s ease, transform 0.3s ease;
}
.modal-close-btn:hover { color: var(--accent-orange); transform: scale(1.1); }
#modal-body h1 {
    font-size: 3rem;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(45deg, var(--primary-purple), var(--secondary-purple), var(--accent-orange), var(--standout-blue));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    text-shadow: none;
}
.placement-accordion {
    margin-bottom: 10px;
    background: linear-gradient(135deg, rgba(156, 70, 200, 0.05), rgba(0,0,0,0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.placement-accordion[open] {
    box-shadow: 0 0 20px rgba(156, 70, 200, 0.2);
    border-color: rgba(156, 70, 200, 0.3);
}
.placement-accordion summary {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1.1rem;
    position: relative;
}
.placement-accordion summary:hover { background-color: rgba(156, 70, 200, 0.1); }
.placement-accordion summary::-webkit-details-marker { display: none; }
.placement-accordion summary::after {
    content: '+';
    font-family: var(--font-tech);
    font-size: 1.5rem;
    color: var(--primary-purple);
    transition: transform 0.3s ease, color 0.3s ease;
}
.placement-accordion[open] summary::after {
    content: '−';
    transform: rotate(180deg);
    color: var(--accent-orange);
}
.placement-accordion .placement-rank {
    font-family: var(--font-tech);
    font-size: 1.3rem;
    letter-spacing: 1px;
    font-weight: 700;
    text-shadow: 0 0 8px;
}
.placement-rank.gold { color: #ffd700; }
.placement-rank.silver { color: #c0c0c0; }
.placement-rank.bronze { color: #cd7f32; }
.placement-accordion .team-name {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--light-text);
    font-size: 1.2rem;
}
.placement-accordion .player-list {
    list-style: none;
    padding: 15px 20px 20px 40px;
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.placement-accordion .player-list li {
    padding: 4px 0;
    color: #ccc;
    position: relative;
}
.placement-accordion .player-list li::before {
    content: '›';
    position: absolute;
    left: -20px;
    color: var(--accent-orange);
    font-weight: 700;
}

/* ================================================== */
/*        STYLES FOR MODAL CONTROLS (NEW)             */
/* ================================================== */

/* Container for the 'Expand All' button */
.modal-controls {
    text-align: center;
    margin-bottom: 25px; /* Adds space between the button and the accordion */
}

/* Specific styling for the button inside the modal */
.modal-controls .btn {
    padding: 8px 20px;
    font-size: 1rem;
    border-radius: 5px; /* A more standard button shape */
    background: transparent;
    border: 2px solid var(--primary-purple);
    color: var(--primary-purple);
    font-family: var(--font-headings);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: normal;
    box-shadow: none;
    text-shadow: none;
}

.modal-controls .btn:hover {
    background: var(--primary-purple);
    color: var(--light-text);
    transform: scale(1.05); /* Keep a simple hover effect */
    box-shadow: 0 0 10px var(--primary-purple);
}

/* ================================================== */
/*          CLEANER DROPDOWN MENU STYLES              */
/* ================================================== */

/* Container for the dropdown menu (the <li> element) */
header nav .dropdown {
    position: relative;
}

/* A sleeker, CSS-drawn arrow icon */
header nav .dropbtn::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-style: solid;
    border-color: var(--light-text);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: transform 0.3s ease-out, border-color 0.3s ease;
    margin-left: 8px;
    margin-bottom: 2px; /* Fine-tune vertical alignment */
}

/* Animate the arrow on hover */
header nav .dropdown:hover .dropbtn::after {
    transform: rotate(-135deg); /* Flips the arrow upwards */
    border-color: var(--primary-purple);
}

/* The dropdown content container (hidden by default) */
header nav .dropdown-content {
    display: none;
    position: absolute;
    /* Using a dark, solid background provides better contrast and looks cleaner */
    background: var(--darker-bg);
    min-width: 220px;
    border-radius: 8px; /* Softer radius */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); /* Softer shadow */
    z-index: 1001;
    overflow: hidden; /* Ensures children conform to the border-radius */
    
    /* A subtle top border to add a splash of color and definition */
    border-top: 3px solid var(--primary-purple);

    /* Positioning and animation */
    top: 100%;
    left: 50%;
    opacity: 0;
    transform: translateX(-50%) translateY(10px); /* Start slightly lower */
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 5px 0; /* Add a little space at the top and bottom */
}

/* The magic rule: Show the dropdown on hover */
header nav .dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0); /* Animate into place */
}

/* Styling for the individual links inside the dropdown */
header nav .dropdown-content a {
    font-family: var(--font-headings);
    font-size: 1.1rem;
    color: var(--light-text);
    padding: 13px 25px; /* More generous padding */
    display: block;
    text-align: left;
    position: relative;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Remove the underline effect from the main nav */
header nav .dropdown-content a::before {
    display: none;
}

/* Clean hover effect for dropdown links */
header nav .dropdown-content a:hover {
    color: var(--standout-blue); /* Use your standout blue for a nice accent */
    background-color: rgba(3, 183, 250, 0.1); /* Subtle background glow */
    text-shadow: 0 0 8px rgba(3, 183, 250, 0.5); /* Matching text glow */
}

/* Add a very fine line to separate the items */
header nav .dropdown-content a:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ================================================== */
/*                MAP ROTATION PAGE                   */
/* ================================================== */

#map-rotation-page {
    padding: 120px 0;
    background: 
        linear-gradient(rgba(10, 10, 10, 0.7), var(--darker-bg)),
        radial-gradient(circle at 10% 20%, rgba(3, 183, 250, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(156, 70, 200, 0.05) 0%, transparent 40%);
}

.rotation-intro {
    text-align: center;
    max-width: 700px;
    margin: -20px auto 50px auto;
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.8;
}

.map-rotation-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}

/* --- Main Card Styles --- */
.map-card {
    background-size: cover;
    background-position: center center;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--primary-purple);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 20%, rgba(10, 10, 10, 0.2) 60%, transparent 100%);
}

.map-card-info {
    position: relative;
    z-index: 2;
    padding: 20px;
    color: var(--light-text);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.map-card-info .label {
    font-family: var(--font-headings);
    letter-spacing: 2px;
    font-size: 1.2rem;
    color: var(--standout-blue);
    text-shadow: 0 0 8px var(--standout-blue);
    margin-bottom: 5px;
}

.map-card-info .map-name {
    font-family: var(--font-tech);
    font-weight: 700;
    font-size: 3rem;
    line-height: 1.1;
    color: #fff;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* --- Current and Next Map Sizing --- */
.current-map-card {
    flex-basis: 100%;
    max-width: 800px;
    height: 400px;
    border-color: var(--accent-orange);
    box-shadow: 0 0 25px rgba(242, 144, 69, 0.3);
}

.next-map-card {
    flex-basis: 100%;
    max-width: 800px;
    background-color: var(--darker-bg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 20px;
    border-color: var(--jungle-green);
}

.next-map-card .map-name {
    font-size: 2.2rem;
}

.countdown-container {
    text-align: right;
}

.countdown-container .label {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--light-text);
    opacity: 0.8;
}

.countdown-timer {
    font-family: var(--font-tech);
    font-size: 3.5rem;
    color: var(--accent-orange);
    text-shadow: 0 0 15px var(--accent-orange);
}

/* --- Full Rotation List --- */
.full-rotation-list {
    flex-basis: 100%;
    max-width: 800px;
    margin-top: 20px;
    background: rgba(15, 42, 10, 0.5);
    border: 1px solid var(--jungle-green);
    border-radius: 10px;
    padding: 25px;
}

.full-rotation-list h3 {
    font-family: var(--font-tech);
    color: var(--light-text);
    text-shadow: none;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 20px;
}

.full-rotation-list ol {
    list-style: none;
    padding: 0;
    font-family: var(--font-headings);
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.full-rotation-list li {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-between;
}

.full-rotation-list li .map-index {
    color: var(--jungle-light);
    font-family: var(--font-tech);
    margin-right: 15px;
}

.full-rotation-list li.active {
    background: var(--accent-orange);
    color: var(--dark-bg);
    font-weight: 700;
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(242, 144, 69, 0.5);
}

.full-rotation-list li.active .map-index {
    color: rgba(0,0,0,0.7);
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .next-map-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    .countdown-container {
        text-align: center;
    }
    .map-card-info .map-name {
        font-size: 2.5rem;
    }
    .countdown-timer {
        font-size: 3rem;
    }
}

/* ================================================== */
/*           PAGE TRANSITION: FADE IN & OUT           */
/* ================================================== */

/* Animation for the new page fading IN */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animation for the old page fading OUT */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Apply the "IN" animation to the body by default */
body {
    /* ... your other existing body styles from the top of the file ... */
    /* Make sure to keep these if they are not already there */
    font-family: var(--font-body);
    line-height: 1.6;
    background: var(--dark-bg);
    color: var(--light-text);
    overflow-x: hidden;
    position: relative;
    
    /* This is the key change */
    animation: fadeIn 0.5s ease-out forwards;
}

/* Apply the "OUT" animation when we click a link */
body.is-leaving {
    animation: fadeOut 0.5s ease-in forwards;
}

/* ================================================== */
/*               ABOUT THE ARTIST SECTION             */
/* ================================================== */

#about-artist {
    /* Reusing a background gradient pattern from other pages for consistency */
    background: 
        linear-gradient(rgba(10, 10, 10, 0.7), var(--darker-bg)),
        radial-gradient(circle at 10% 20%, rgba(3, 183, 250, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(156, 70, 200, 0.05) 0%, transparent 40%);
    padding: 100px 0;
}

.artist-grid {
    display: grid;
    /* Adapting the two-column layout from your donations page */
    grid-template-columns: 1fr 2fr; 
    gap: 50px;
    align-items: center;
    margin-top: 20px;
}

.artist-image img {
    /* Using the circular, bordered style from your team cards for a cohesive look */
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto;
    display: block;

    /* Adding your theme's glow effect */
    border: 4px solid var(--primary-purple);
    box-shadow: 0 0 25px rgba(156, 70, 200, 0.5);
    transition: all 0.3s ease;
}

.artist-image img:hover {
    /* Reusing hover effects from team cards */
    transform: scale(1.05);
    border-color: var(--standout-blue);
    box-shadow: 0 0 35px rgba(3, 183, 250, 0.7);
}

.artist-bio h3 {
    /* Using the tech font for a standout heading */
    font-family: var(--font-tech);
    font-size: 2.5rem;
    color: var(--accent-orange);
    text-shadow: 0 0 10px var(--accent-orange);
    margin-bottom: 20px;
    letter-spacing: 1px;
    /* Resetting global h3 styles */
    background: none;
    -webkit-text-fill-color: unset; 
}

.artist-bio p {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 30px;
}

.artist-socials {
    margin-top: 20px;
}

.artist-socials a {
    /* Exactly matching your footer's social icon style for consistency */
    color: var(--light-text);
    font-size: 1.8rem;
    margin-right: 25px;
    display: inline-block; /* Required for transform to work properly */
    transition: all 0.3s ease;
}

.artist-socials a:hover {
    color: var(--standout-blue);
    transform: scale(1.2) translateY(-3px);
    text-shadow: 0 0 15px var(--standout-blue);
}

/* --- Responsive adjustments for the artist section --- */
@media (max-width: 768px) {
    .artist-grid {
        grid-template-columns: 1fr; /* Stack columns */
        gap: 40px;
        text-align: center;
    }

    .artist-image img {
        max-width: 220px;
    }

    .artist-bio h3 {
        font-size: 2rem;
    }
    
    .artist-socials a {
        margin: 0 15px; /* Adjust spacing for centered layout */
    }
}

/* ========================================= */
/* --- NEW STYLES: Donation Tiers (Swag) --- */
/* ========================================= */

.donation-tiers-wrapper {
    padding-top: 5rem; 
    margin-top: 5rem;
    border-top: 2px solid var(--jungle-green);
    text-align: center;
}

.tier-title {
    font-family: var(--font-headings);
    font-size: 3rem;
    color: var(--accent-orange);
    text-shadow: 0 0 10px var(--accent-orange);
    margin-bottom: 3rem;
    letter-spacing: 3px;
    /* Reset global h3 styles to avoid conflicts */
    background: none;
    -webkit-text-fill-color: unset;
}

/* --- UPDATED TIER GRID FOR 5-COLUMN LAYOUT --- */
.tier-grid {
    display: grid;
    gap: 2.5rem;
    /* 
      DEFAULT (Mobile/Tablet):
      Creates a responsive grid that fits as many 300px cards as possible before wrapping.
      This will result in 1, 2, or 3 columns on smaller screens.
    */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* 
  MEDIA QUERY (Large Desktops):
  When the screen width is 1400px or wider, this rule activates
  and overrides the default, forcing the grid into exactly 5 columns.
*/
@media (min-width: 1400px) {
    .tier-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.tier-card {
    background: linear-gradient(145deg, var(--jungle-dark), var(--darker-bg));
    border: 2px solid var(--jungle-green);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tier-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-orange);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(242, 144, 69, 0.2);
}

.tier-image {
    width: 160px; 
    height: 160px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.1));
}

.tier-name {
    font-family: var(--font-tech);
    font-size: 1.8rem;
    margin: 0.5rem 0;
    text-shadow: 0 0 8px;
}

.tier-reward {
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-body);
    min-height: 90px;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.tier-amount {
    font-family: var(--font-tech);
    font-size: 1rem;
    font-weight: bold;
    color: var(--standout-blue);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 5px var(--standout-blue);
}

/* Use a more restrained button for the cards to not clash with the main donate button */
.tier-card .btn {
    font-size: 1.1rem;
    padding: 12px 30px;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--primary-purple), var(--secondary-purple));
}

.tier-card .btn:hover {
    background: linear-gradient(45deg, var(--secondary-purple), var(--primary-purple));
}


/* --- Tier Name and Highlight Colors --- */
.tier-bronze  { color: #cd7f32; }
.tier-silver  { color: #c0c0c0; }
.tier-gold    { color: #ffd700; }
.tier-diamond { color: #b9f2ff; }
.tier-ruby    { color: #e0115f; }

/* ================================================== */
/*        MOBILE NAVIGATION & OVERLAY STYLES          */
/* ================================================== */

/* --- The Hamburger Menu Button --- */
.mobile-nav-toggle {
    display: none; /* Hidden on desktop by default */
    position: relative;
    z-index: 9999; /* Highest z-index to be on top of everything inside the header */
    background: transparent;
    border: 0;
    padding: 0.5em;
    cursor: pointer;
}

.mobile-nav-toggle .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mobile-nav-toggle::before,
.mobile-nav-toggle::after,
.mobile-nav-toggle span {
    content: '';
    display: block;
    position: relative;
    width: 30px;
    height: 3px;
    background: var(--light-text);
    border-radius: 2px;
    transition: transform 0.3s ease-out, opacity 0.2s ease;
}

.mobile-nav-toggle::before { margin-bottom: 7px; }
.mobile-nav-toggle::after { margin-top: 7px; }

/* Animate to an "X" when the menu is open */
.mobile-nav-toggle[aria-expanded="true"]::before { transform: translateY(10px) rotate(45deg); }
.mobile-nav-toggle[aria-expanded="true"] span { opacity: 0; }
.mobile-nav-toggle[aria-expanded="true"]::after { transform: translateY(-10px) rotate(-45deg); }

/* --- Mobile Media Query (for screens 900px or less) --- */
@media (max-width: 900px) {
    /* Show the hamburger button on smaller screens */
    .mobile-nav-toggle {
        display: block;
    }

    /* Hide the default desktop nav links */
    header nav ul {
        display: none;
    }
    
    /* When the menu is open, show the nav list in its new panel */
    header nav[data-visible="true"] ul {
        display: flex; /* Overrides the 'none' above */
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: min(20vh, 10rem) 2em;
    }

    /* Style the <nav> element itself as a slide-out panel */
    header nav {
        position: fixed;
        inset: 0 0 0 30%; /* top, right, bottom, left */
        z-index: 9998; /* High z-index, but below the toggle button */
        
        background: var(--dark-bg); 
        border-left: 2px solid var(--primary-purple);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);

        transform: translateX(100%);
        transition: transform 350ms ease-out;
    }

    /* When menu is open, slide the panel into view */
    header nav[data-visible="true"] {
        transform: translateX(0%);
    }

    /* Style the links inside the mobile panel */
    header nav a {
        font-size: 1.5rem;
        width: 100%;
        padding: 1.2rem 1.5rem;
        border-radius: 0;
    }
    
    header nav a:hover {
        background: rgba(156, 70, 200, 0.2);
    }
    
    header nav a::before {
        display: none; /* Remove desktop underline effect */
    }

    /* --- Mobile Dropdown Handling --- */
    header nav .dropdown-content {
        position: static; /* Let it sit naturally in the flow */
        display: block;
        opacity: 1;
        transform: none;
        background: transparent;
        box-shadow: none;
        border: none;
        min-width: unset;
        padding: 0 0 0 1.5rem; /* Indent sub-items */
        max-height: 0; /* Hidden by default */
        overflow: hidden;
        transition: max-height 0.4s ease-out;
    }
    
    header nav .dropdown.active .dropdown-content {
        max-height: 200px; /* Animate it open */
    }

    header nav .dropdown-content a {
        font-size: 1.2rem;
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
        color: #ccc;
    }
    
    header nav .dropdown .dropbtn::after {
        transform: rotate(45deg); /* Arrow points down */
    }
    
    header nav .dropdown.active .dropbtn::after {
        transform: rotate(-135deg); /* Arrow points up */
    }
}

/* --- Mobile Navigation Overlay --- */
body.nav-open {
    overflow: hidden; /* Lock page scrolling */
}

/* Create the dark overlay on the body */
body.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    
    /* === THE FINAL, CRITICAL FIX IS HERE === */
    /* This z-index is lower than the header's z-index (1000) */
    z-index: 999; 
    
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ================================================== */
/*             GADGET WIKI PAGE                       */
/* ================================================== */

#gadget-wiki {
    background: 
        linear-gradient(rgba(10, 10, 10, 0.7), var(--darker-bg)),
        radial-gradient(circle at 10% 20%, rgba(3, 183, 250, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(156, 70, 200, 0.05) 0%, transparent 40%);
    padding: 120px 0;
}

.gadget-intro {
    text-align: center;
    max-width: 800px;
    margin: -20px auto 60px auto;
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.8;
}

/* --- Class-based Section Titles --- */
.gadget-class-section {
    margin-bottom: 80px;
}

/* Reusing the tournament page section title style for consistency */
.gadget-class-title {
    color: var(--accent-orange);
    text-shadow: none;
    text-align: left;
    font-size: 2.8rem;
    border-left: 5px solid var(--accent-orange);
    padding-left: 20px;
    margin-bottom: 40px;
    text-transform: uppercase;
}

/* --- Gadget Grid Layout --- */
.gadget-grid {
    display: grid;
    /* Using a single-column layout as cards are now much taller */
    grid-template-columns: 1fr;
    gap: 40px;
}

/* --- Detailed Gadget Card Styling --- */
.gadget-card {
    background: linear-gradient(160deg, var(--jungle-dark), var(--darker-bg));
    border-radius: 15px;
    border: 2px solid var(--jungle-green);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden; /* Important for inner elements */
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.gadget-card:hover {
    border-color: var(--standout-blue);
    box-shadow: 0 15px 40px rgba(0,0,0,0.7), 0 0 25px rgba(3, 183, 250, 0.2);
}

/* --- Main Card Content Area --- */
.gadget-main-content {
    padding: 30px;
    display: grid;
    grid-template-columns: 200px 1fr; /* Icon column | Info column */
    gap: 30px;
    align-items: flex-start;
}

.gadget-identity {
    text-align: center;
}

.gadget-identity img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(3, 183, 250, 0.4));
    margin-bottom: 20px;
}

.gadget-identity h3 {
    font-size: 2.5rem;
    font-family: var(--font-tech);
    background: linear-gradient(45deg, var(--primary-purple), var(--standout-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-bottom: 0;
}

.gadget-details p {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 25px;
}

.gadget-details p.quote {
    font-style: italic;
    color: var(--accent-orange);
    border-left: 3px solid var(--accent-orange);
    padding-left: 15px;
    opacity: 1;
}

.gadget-stats-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
    text-align: center;
    flex-grow: 1;
}

.stat-item .stat-name {
    font-family: var(--font-headings);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--light-text);
    opacity: 0.7;
}

.stat-item .stat-value {
    font-family: var(--font-tech);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--standout-blue);
    text-shadow: 0 0 8px var(--standout-blue);
}

/* --- Properties Accordion --- */
.gadget-properties-accordion {
    background: var(--dark-bg);
    border-top: 2px solid var(--jungle-green);
}

.gadget-properties-accordion summary {
    padding: 15px 30px;
    cursor: pointer;
    font-family: var(--font-headings);
    font-size: 1.3rem;
    letter-spacing: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.gadget-properties-accordion summary:hover {
    background-color: var(--jungle-dark);
}

.gadget-properties-accordion summary::-webkit-details-marker { display: none; }
.gadget-properties-accordion summary::after {
    content: '+';
    font-family: var(--font-tech);
    font-size: 1.5rem;
    color: var(--primary-purple);
    transition: transform 0.3s ease;
}
.gadget-properties-accordion[open] summary::after {
    transform: rotate(45deg);
}

.properties-content {
    padding: 0 30px 30px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.property-group h4 {
    font-family: var(--font-tech);
    color: var(--accent-orange);
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--jungle-green);
    padding-bottom: 8px;
}

.property-group ul {
    list-style: none;
    padding-left: 0;
}

.property-group li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #ccc;
}

.property-group li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--standout-blue);
    font-weight: 700;
}

.property-group li strong {
    color: var(--light-text);
    font-weight: 700;
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .gadget-main-content {
        grid-template-columns: 1fr; /* Stack icon and details */
        text-align: center;
    }

    .gadget-identity img {
        margin-left: auto;
        margin-right: auto;
    }
    
    .gadget-stats-grid {
        justify-content: center;
    }
}
/* --- Stats Table for Complex Gadgets like H+ Infuser --- */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    font-family: var(--font-body);
}

.stats-table th, .stats-table td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid var(--jungle-green);
}

.stats-table th {
    background-color: rgba(26, 67, 20, 0.5); /* Reusing a theme color */
    font-family: var(--font-headings);
    letter-spacing: 1px;
    font-weight: normal;
    font-size: 1.1rem;
    color: var(--light-text);
}

.stats-table td {
    font-size: 1rem;
    color: #ccc;
}

.stats-table .sub-header {
    font-size: 0.8rem;
    font-weight: bold;
    color: #aaa;
    border-bottom: 1px solid var(--jungle-green);
}

.stats-table .target-class {
    font-weight: bold;
    color: var(--light-text);
}

/* ================================================== */
/*   FINAL RESPONSIVE BRACKET STYLES (V4)             */
/* ================================================== */

#bracket-page {
    padding: 120px 0;
    background: 
        linear-gradient(rgba(10, 10, 10, 0.7), var(--darker-bg)),
        radial-gradient(circle at 10% 20%, rgba(3, 183, 250, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(156, 70, 200, 0.05) 0%, transparent 40%);
}

.bracket-section-title {
    color: var(--accent-orange);
    text-shadow: none;
    font-size: 2.5rem;
    border-left: 5px solid var(--jungle-green);
    padding-left: 15px;
    margin-bottom: 30px;
    margin-top: 50px;
}
.bracket-section-title:first-of-type { margin-top: 0; }

.tournament-container {
    /* KEY CHANGE: Re-introduce horizontal scroll ONLY when needed */
    overflow-x: auto;
    width: 100%;
    padding: 20px 10px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--jungle-green);
    border-radius: 10px;
}
/* Style the scrollbar to match the theme */
.tournament-container::-webkit-scrollbar { height: 8px; }
.tournament-container::-webkit-scrollbar-track { background: var(--darker-bg); border-radius: 4px;}
.tournament-container::-webkit-scrollbar-thumb { background: var(--jungle-green); border-radius: 4px; }
.tournament-container::-webkit-scrollbar-thumb:hover { background: var(--jungle-light); }


.bracket {
    display: flex;
    align-items: center; /* Vertically aligns rounds and connectors */
}
/* DEFINE MIN-WIDTHS HERE INSTEAD OF INLINE HTML */
.upper-bracket { min-width: 1420px; }
.lower-bracket { min-width: 1760px; }


/* --- Round & Match Styling (Largely Unchanged) --- */
.round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 280px;
    flex-shrink: 0;
}
.round-title {
    font-family: var(--font-tech);
    color: var(--light-text);
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 20px;
}
.match { margin-bottom: 20px; }
.match:last-child { margin-bottom: 0; }
.match-wrapper {
    background-color: var(--jungle-dark);
    border: 1px solid var(--jungle-light);
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    overflow: hidden;
}
.participant {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    font-size: 1rem;
    color: #ccc;
}
.participant:first-of-type { border-bottom: 1px solid var(--jungle-light); }
.participant.winner { color: var(--accent-orange); font-weight: bold; }
.participant.winner .team-name { text-shadow: 0 0 5px var(--accent-orange); }
.participant .score { font-family: var(--font-tech); color: var(--standout-blue); font-weight: 700; }
.tbd { color: #666; font-style: italic; }


/* --- HORIZONTAL CONNECTORS (DESKTOP) --- */
.connectors {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 60px;
    height: 100%;
    flex-shrink: 0;
}
.connector { position: relative; width: 100%; height: 100%; }
.connector::before, .connector::after {
    content: ''; position: absolute; top: 50%; width: 50%; height: 2px;
    background-color: var(--jungle-light); transform: translateY(-50%);
}
.connector::before { left: 0; }
.connector::after { right: 0; }
.connector-line {
    position: absolute; top: 0; left: 50%; width: 2px; height: 100%;
    background-color: var(--jungle-light); transform: translateX(-50%);
}
.final-connector { height: 100%; }
.final-connector .connector-line { display: none; }
.final-connector .connector::before { width: 100%; }
.final-connector .connector::after { display: none; }


/* --- VERTICAL CONNECTORS (MOBILE) --- */
.vertical-connector {
    display: none; /* Hidden on desktop by default */
    padding: 20px 0;
    justify-content: center;
    align-items: center;
    color: var(--jungle-light);
    font-size: 2rem;
}


/* --- Grand Final Styling --- */
.grand-final-wrapper {
    padding: 20px 0;
    display: flex;
    justify-content: center;
}
.grand-final .round { width: 350px; }
.grand-final .match-wrapper {
    border: 2px solid var(--accent-orange);
    box-shadow: 0 0 20px rgba(242, 144, 69, 0.4);
}
.grand-final .round-title {
    font-size: 1.5rem;
    color: var(--accent-orange);
}

/* ================================================== */
/*       RESPONSIVE BRACKET MEDIA QUERY (MOBILE)      */
/* ================================================== */
@media (max-width: 1024px) {
    .tournament-container {
        /* KEY CHANGE: Turn off horizontal scrolling for the vertical mobile view */
        overflow-x: hidden;
        border: none;
        background: transparent;
        padding: 0;
    }

    .bracket {
        flex-direction: column; /* Stack rounds vertically */
        align-items: stretch;   /* Make rounds take full width */
        min-width: 0 !important; /* Override min-width */
    }

    .round {
        width: 100%; /* Rounds take up the full container width */
        margin-bottom: 20px;
    }

    .connectors {
        display: none; /* Hide the horizontal connector lines */
    }
    
    .vertical-connector {
        display: flex; /* Show the vertical down-arrow connectors */
    }
    
    .grand-final .round {
        width: 100%; /* Grand final also takes full width */
    }
}

/* ================================================== */
/*     PAGE-SPECIFIC WIDE CONTAINER (FOR BRACKET)     */
/* ================================================== */

/* A wider container for specific pages like the bracket */
.container-full-width {
    width: 95%; /* Take up most of the screen */
    max-width: 2560px; /* A very generous max-width for large monitors */
    margin: auto;
    position: relative;
    z-index: 2;
}
