:root {
    --acid-green: #ccff00;
    --deep-blue: #020210;
    --grid-color: rgba(204, 255, 0, 0.15);
    --text-stroke: rgba(204, 255, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: none; /* Hide default cursor */
}

body {
    background-color: var(--deep-blue);
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    width: 100%;
    margin-top: 24px;
}

/* --- CUSTOM CURSOR --- */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 20000;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--acid-green);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--acid-green);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline.hovered {
    width: 80px;
    height: 80px;
    background-color: rgba(204, 255, 0, 0.1);
    backdrop-filter: invert(1);
    border: none;
}

/* --- WEBGL CANVAS BACKGROUND --- */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* --- PRELOADER --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--deep-blue);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;
}

.preloader h1 {
    font-size: clamp(1.5rem, 8vw, 2.5rem);
    line-height: 1.1;
    max-width: 90vw;
    margin: 0 auto;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: #333;
    margin-top: 20px;
    overflow: hidden;
}

.loader-progress {
    width: 0%;
    height: 100%;
    background: var(--acid-green);
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    max-width: 90vw;
    z-index: 9000;
    background: rgba(2, 2, 16, 0.6); /* --deep-blue with transparency */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 0.8rem 2rem;
    transition: transform 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 0;
}

.nav-logo {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(204, 255, 0, 0.3)); /* Optional glow effect to match theme */
    transition: transform 0.3s ease;
}

.nav-logo:hover .nav-logo-img {
    transform: scale(1.1) rotate(5deg);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s;
    letter-spacing: 1px;
}

.nav-link:hover {
    color: var(--acid-green);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 9002;
    padding: 10px; /* Increase click area */
}

.hamburger span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: white;
    transition: 0.3s;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    background: var(--deep-blue);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 8999;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-link {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2rem;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s;
}

.mobile-link:hover {
    color: var(--acid-green);
    -webkit-text-stroke: 1px var(--acid-green);
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

/* --- LAYOUT & TYPOGRAPHY --- */
.wrapper {
    position: relative;
    z-index: 2;
}

section {
    padding: 10vh 5vw;
    position: relative;
}

.hero-section {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.mega-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 15vw;
    line-height: 0.8;
    text-transform: uppercase;
    text-align: center;
    color: transparent;
    -webkit-text-stroke: 2px var(--acid-green);
    position: relative;
    mix-blend-mode: exclusion;
    will-change: transform;
}

.mega-title span {
    display: block;
    color: var(--acid-green);
    -webkit-text-stroke: 0;
}

.hero-meta {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    margin-top: 50px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- MARQUEE --- */
.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.marquee-strip {
    background: var(--acid-green);
    color: var(--deep-blue);
    font-family: 'Archivo Black';
    font-size: 3rem;
    padding: 20px 0;
    overflow: hidden;
    white-space: nowrap;
    transform: rotate(-2deg) scale(1.1);
    margin: 10vh 0;
    border-top: 5px solid white;
    border-bottom: 5px solid white;
    display: flex;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee-scroll 30s linear infinite;
}

.marquee-content span {
    padding-right: 0;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- CARDS & GRID --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-top: 100px;
}

.glass-card {
    grid-column: span 6;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    transition: transform 0.5s ease;
}

.glass-card.span-4 {
    grid-column: span 4;
}

.glass-card.span-12 {
    grid-column: span 12;
}

@media(max-width: 768px) {
    .glass-card, .glass-card.span-4, .glass-card.span-12 { grid-column: span 12; }
}

.glass-card:hover {
    border-color: var(--acid-green);
    background: rgba(204, 255, 0, 0.05);
}

h2.section-title {
    font-family: 'Archivo Black';
    font-size: 4rem;
    margin-bottom: 40px;
    color: white;
}

.prize-value {
    font-size: 5rem;
    font-family: 'Archivo Black';
    color: transparent;
    -webkit-text-stroke: 1px white;
    display: block;
    line-height: 1;
}

/* --- FORM --- */
.input-group {
    position: relative;
    margin-bottom: 40px;
}

input, textarea {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 2px solid #333;
    padding: 20px 0;
    color: white;
    font-family: 'Space Grotesk';
    font-size: 1.5rem;
    transition: 0.3s;
    border-radius: 0;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--acid-green);
}

label {
    position: absolute;
    left: 0;
    top: 20px;
    text-transform: uppercase;
    color: #666;
    pointer-events: none;
    transition: 0.3s;
}

/* Hide placeholder when not focused to prevent overlap with floating label */
input:not(:focus)::placeholder {
    color: transparent;
}

input:focus ~ label,
input:valid ~ label,
input:not(:placeholder-shown) ~ label,
textarea:focus ~ label,
textarea:valid ~ label,
textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    font-size: 0.8rem;
    color: var(--acid-green);
}

/* --- CUSTOM FILE INPUT --- */
.file-upload-wrapper {
    position: relative;
    width: 100%;
    height: 60px;
    border-bottom: 2px solid #333;
    display: flex;
    align-items: center;
    margin-top: 10px;
    cursor: pointer;
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.file-upload-button {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--acid-green);
    color: var(--acid-green);
    font-family: 'Space Grotesk';
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-right: 15px;
    transition: 0.3s;
}

.file-upload-filename {
    font-family: 'Space Grotesk';
    color: #666;
    font-size: 1rem;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.file-upload-wrapper:hover {
    border-color: var(--acid-green);
}

.file-upload-wrapper:hover .file-upload-button {
    background: var(--acid-green);
    color: var(--deep-blue);
}

/* --- BUTTON --- */
.magnetic-btn {
    background: var(--acid-green);
    color: var(--deep-blue);
    border: none;
    padding: 25px 50px;
    font-size: 1.2rem;
    font-family: 'Archivo Black';
    text-transform: uppercase;
    border-radius: 100px;
    cursor: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none; /* Ensure no underline for anchor tags */
    z-index: 10;
}

.cta-button {
    margin-top: 32px;
}

.scroll-indicator {
    justify-content: center;
    margin-top: 100px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.magnetic-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: white;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
}

.magnetic-btn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.magnetic-btn span {
    position: relative;
    z-index: 2;
    color: var(--deep-blue);
}

/* --- UTILS --- */
.reveal-text {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.char {
    display: inline-block;
    transform-origin: 50% 100%;
}

/* --- QR MODAL --- */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(2, 2, 16, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    background-color: transparent;
    margin: auto;
    padding: 0;
    width: auto;
    max-width: 90%;
    text-align: center;
    border: 1px solid var(--acid-green);
    box-shadow: 0 0 20px rgba(204, 255, 0, 0.2);
}

.qr-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--acid-green);
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1;
}

.close-modal:hover {
    color: white;
}

.view-qr-btn {
    background: none;
    border: 1px solid var(--acid-green);
    color: var(--acid-green);
    padding: 5px 15px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.view-qr-btn:hover {
    background: var(--acid-green);
    color: var(--deep-blue);
}

.download-qr-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--acid-green);
    color: var(--acid-green);
    padding: 10px 25px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.download-qr-btn:hover {
    background: var(--acid-green);
    color: var(--deep-blue);
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- TOURNAMENT STATS --- */
.stats-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 40px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Removed flex: 1 as it might stretch oddly in column mode */
}

.stat-number {
    font-family: 'Archivo Black', sans-serif;
    font-size: 3.5rem;
    color: var(--acid-green);
    line-height: 1;
    text-shadow: 0 0 20px rgba(204, 255, 0, 0.3);
}

.stat-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    color: white;
    letter-spacing: 1px;
    margin-top: 10px;
    opacity: 0.8;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .stats-container {
        flex-direction: column;
        gap: 40px;
        padding: 20px 0;
    }
    
    .stat-number {
        font-size: 5rem;
    }
}

/* --- DETAILS LIST --- */
.details-list {
    list-style: none;
    padding: 0;
}

.details-list li {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
    border-left: 2px solid var(--acid-green);
    padding-left: 20px;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--acid-green);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.2rem;
    font-weight: 500;
    color: white;
}

@media (max-width: 768px) {
    .detail-value {
        font-size: 1.1rem;
    }
}

/* --- MOBILE RESPONSIVENESS REFINEMENTS --- */

/* Mobile Refinements (768px) */
@media (max-width: 768px) {
    section {
        padding: 60px 20px; /* Standardize mobile padding */
    }

    h2.section-title {
        font-size: 2.5rem;
        margin-bottom: 25px;
    }

    .mega-title {
        font-size: 14vw; /* Optimized to prevent overflow on tablets */
    }

    .hero-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 30px;
        text-align: center;
        font-size: 1rem;
    }

    .marquee-strip {
        font-size: 1.5rem;
        padding: 10px 0;
    }

    .marquee-content {
        animation-duration: 15s; /* Faster on mobile for better flow */
    }

    .glass-card {
        padding: 25px; /* Reduce padding to save space */
    }

    .prize-value {
        font-size: 3.5rem;
    }

    .stat-number {
        font-size: 3rem !important; /* Override the 5rem set earlier in file */
    }

    .schedule-row {
        font-size: 1.1rem !important;
        padding: 20px 0 !important;
    }

    .navbar {
        padding: 0.6rem 1.5rem;
    }

    .input-group {
        margin-bottom: 30px;
    }

    input, textarea {
        font-size: 1.1rem; /* Better scale for mobile */
    }

    .magnetic-btn {
        padding: 20px 40px;
        font-size: 1rem;
    }
}

/* Small Mobile Refinements (480px) */
@media (max-width: 480px) {
    h2.section-title {
        font-size: 2rem;
    }
    .mega-title {
        font-size: 15vw; /* Reduced for better fit */
    }
    .nav-logo-img {
        height: 28px;
    }
    .mobile-menu {
        gap: 20px;
    }
    .mobile-link {
        font-size: 1.2rem;
    }
    .navbar {
        width: 95vw;
        max-width: 95vw;
        padding: 0.6rem 1.2rem;
    }
    .nav-container {
        width: 100%;
        justify-content: space-between;
        gap: 0;
    }
}

/* Disable custom cursor on touch devices and mobile screens */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
    * {
        cursor: auto !important;
    }
    .cursor-dot, .cursor-outline {
        display: none !important;
    }
    .magnetic-btn {
        cursor: pointer !important;
    }
    a, button, input, textarea, label {
        cursor: pointer !important;
    }
}
