/* =========================================
   1. CORE PAGE STYLES
   ========================================= */
  /* --- RESET & CORE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

   html { 
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

body::-webkit-scrollbar { 
    display: none; 
}



body {
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    background-color: #050000;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* body, html {
    margin: 0; padding: 0;
    font-family: 'Montserrat', sans-serif; 
    background-color: #000; color: #fff;
    overflow-x: hidden; touch-action: manipulation;
} */

.page-wrapper {
    position: relative; min-height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), url('images/background-image.jpeg');
    background-size: cover; background-position: center;
    display: flex; flex-direction: column; align-items: center;
}

/* =========================================
   2. NAVIGATION & LOGO
   ========================================= */
nav {
    display: flex; justify-content: space-between; align-items: center;
    /* Padding adjusted to match Contact Page exactly */
    padding: 15px 50px 15px 35px; 
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 50, 50, 0.3);
    position: fixed; top: 0; width: 100%; height: 80px;
    z-index: 1000; transition: all 0.3s ease;
}

/* --- LOGO CSS --- */
.logo {
    display: flex; align-items: center; z-index: 2001; 
}

.logo img {
    height: 45px; width: auto; display: block;
    mix-blend-mode: screen; /* Remove Black Background */
    margin-left: -5px; 
    transition: transform 0.3s ease, filter 0.3s ease;
    will-change: transform, filter;
}

.logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.8)); 
}

/* Navigation Links */
.nav-links { display: flex; gap: 30px; }
.nav-links a {
    text-decoration: none; color: #ccc; font-size: 0.9rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
    transition: all 0.3s ease; position: relative; padding: 5px 0;
}
.nav-links a:hover, .nav-links a.active { color: #ff3333; text-shadow: 0 0 8px rgba(255, 0, 0, 0.6); }
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0;
    background-color: #ff3333; transition: width 0.3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.nav-clicked::after { width: 100%; transition: width 0.5s ease-out; }

.hamburger {
    display: none; cursor: pointer; flex-direction: column; gap: 5px; z-index: 2001;
}
.hamburger span {
    display: block; width: 25px; height: 3px; background-color: #fff; transition: all 0.3s ease;
}

/* =========================================
   3. HERO & GRID
   ========================================= */


.hero { text-align: center; margin: 8rem 0 5rem; padding: 0 1rem; }

.hero h1 { 
    font-family: 'Orbitron', sans-serif; font-size: 2.8rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 2px; color: #fff; text-shadow: 0 2px 10px rgba(255, 0, 0, 0.4); 
}

.hero p {  color: #ff3333; letter-spacing: 3px; font-size: 0.9rem; font-weight: 600; text-transform: uppercase; }

.events-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem;
    width: 90%; max-width: 1200px; margin-bottom: 5rem;
}

/* =========================================
   4. VAULT ANIMATION & CARDS
   ========================================= */
.day-card {
    text-align: center;
    position: relative; width: 100%; aspect-ratio: 1 / 1;
    background-color: #111; border-radius: 10px; perspective: 2000px;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
}

.cover {
    position: absolute; inset: 0; transform-origin: left; transform-style: preserve-3d;
    z-index: 10; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;
}

.day-card.unlocked .cover {
    transform: rotateY(-115deg); 
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.2s;
}

.door-front, .door-back {
    position: absolute; width: 100%; height: 100%; backface-visibility: hidden;
    border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.05);
}

.door-front { 
    background-color: #000; 
    background-image: url('images/vault-door-texture.jpg'); 
    background-size: cover; 
    background-position: center; 
    z-index: 2; 
    overflow: hidden; 
    /* Ensure the front face is always treated as the top layer before interaction */
    -webkit-transform: rotateY(0deg);
    transform: rotateY(0deg);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.door-back { 
    background-color: #111; 
    background-image: url('images/events_page_i1.jpeg'); 
    background-size: cover; background-position: center; 
    transform: rotateY(180deg); z-index: 1; 
}


.vault-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Ensure it takes up space */
    opacity: 1;
    /* This prevents the "blank" flicker on iOS */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}



video[poster] {
    object-fit: cover;
}

.text-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 10; transition: opacity 0.3s; }

.day-card.unlocked .text-overlay { opacity: 0; }

.day-text { 
    font-family: 'Orbitron', sans-serif; color: #fbbf24; 
    font-size: 2.2rem; font-weight: 700; letter-spacing: 0.15em; 
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
    align-self: center;
}

.interior-content {
    position: absolute; inset: 0; display: flex; flex-direction: column; 
    align-items: center; justify-content: center;
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('images/events_page_i1.jpeg');
    background-size: cover; background-position: center; border-radius: 10px;
    opacity: 0; z-index: 1; transition: opacity 0.2s ease 0s;
}

.day-card.unlocked .interior-content { opacity: 1; transition: opacity 0.4s ease 1.5s; }

.rulebook-heading { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; letter-spacing: 0.2em; color: #fff; margin-bottom: 10px; }

.view-btn {
    margin-top: 20px; padding: 10px 24px; background: #e53e3e; color: #fff; 
    text-decoration: none; font-size: 0.9rem; font-weight: 700; 
    border-radius: 4px; box-shadow: 0 4px 15px rgba(229, 62, 62, 0.4); 
    transition: transform 0.2s; text-transform: uppercase;
}

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

/* =========================================
   5. RULEBOOK MODAL & "COMING SOON" CONTENT
   ========================================= */
.rulebook-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(8px); z-index: 6000;
    display: flex; justify-content: center; align-items: top;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
    padding: 20px; box-sizing: border-box;
}

.rulebook-overlay.active { opacity: 1; pointer-events: all; }


/* Updated Metallic Card */
.metallic-card {
    position: relative; 
    width: 70%; /* Better fit for mobile */
    max-width: 500px; 
    max-height: 80vh; /* Keeps it from disappearing off the top/bottom */
    background-image: url('images/rulebook background.jpg'); 
    background-size: cover; 
    background-position: center;

    box-shadow: 0 20px 50px rgba(0,0,0,1);
    padding: 3rem 1.5rem 1.5rem; 
    display: flex; 
    flex-direction: column; 
    color: #1a1a1a;
    overflow: visible; /* Allows the Register button to pop out */
}

.close-modal {
    position: absolute; top: 15px; right: 20px; font-size: 2.5rem;
    font-weight: 900; color: #6b0202; cursor: pointer;
    z-index: 6100; transition: transform 0.2s ease;

}

.close-modal:hover { transform: scale(1.1); color: #e53e3e; }

.modal-heading { 
    font-family: 'Orbitron', sans-serif; font-size: 2.2rem; 
    text-align: center; margin-bottom: 2rem; text-transform: uppercase; 
    letter-spacing: 6px; color: #fbbf24; font-weight: 900; 
    border-bottom: 2px solid #2e1a12; padding-bottom: 0px; 
}

.rules-list { 
    list-style: none; padding: 0; margin: 0px 0; 
    flex-grow: 1; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
}

.rules-list li { 
    display: flex; align-items: center; justify-content: center;
    font-family: 'Orbitron', sans-serif; font-size: 2.2rem; 
    font-weight: 900; color: #7f2b2b; line-height: 1.2; 
    text-transform: uppercase; letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.rules-list li::before { 
    content: '_'; color: #2e1a12; margin-right: 15px; 
    animation: blink 1s step-end infinite; 
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Style the Registration Button to pop out of the bottom */
.reg-btn {
    position: absolute;
    bottom: -60px; /* Pulls it halfway out of the box */
    left: 50%;
    transform: translateX(-50%); /* Centers it perfectly */
    
    display: inline-block;
    padding: 15px 35px;
    background: linear-gradient(135deg, #00ffcc 0%, #008b70 100%);
    color: #000;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 2px;
    border-radius: 50px; /* Rounded pill shape for "finesse" */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #000;
    box-shadow: 0 10px 20px rgba(0, 255, 204, 0.3);
    white-space: nowrap;
    z-index: 6200;
}

.reg-btn:hover {
    transform: translateX(-50%) translateY(-5px) scale(1.05);
    box-shadow: 0 15px 25px rgba(0, 255, 204, 0.5);
    background: #00ffcc;
    color: #000;
}

/* =========================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 968px) {
    nav { 
        padding: 0 20px; 
        height: 72px; /* Reduced from 80px (80% of original) */
    }

            /* Adjust logo size to fit the smaller nav height */
    .logo img {
        height: 37px; /* Reduced from 45px */
    }

    .hamburger { display: flex; }

            /* Mobile Menu Styling - Contact Page Style */
    .nav-links {
        position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
        background: linear-gradient(to left, #000000 0%, #000000 55%, rgba(0,0,0,0.1) 100%);
        backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
        flex-direction: column; align-items: flex-end; justify-content: flex-start;
        padding-top: 90px;
        padding-right: 50px;
        transform: translateX(100%); opacity: 0;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
        z-index: 2000; pointer-events: none;
        will-change: transform, opacity;
    }
    .nav-links.active { transform: translateX(0); opacity: 1; pointer-events: all; }
            
    .nav-links a { 
        font-size: 1.1rem; 
        margin: 12px 0;    
        width: auto; 
        text-align: right; 
        display: block; 
        font-weight: 500; 
    }
    .nav-links a::after { left: auto; right: 0; }

    .hamburger.toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .hamburger.toggle span:nth-child(2) { opacity: 0; }
    .hamburger.toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}














@media (max-width: 768px) {
    .rulebook-overlay {
        top: -60px;
    }
    .events-grid { grid-template-columns: 1fr; max-width: 350px; }
    .hero h1 { font-size: 2.5rem; }
    .rulebook-overlay {
        align-items: center;
    }
}

@media (max-width: 600px) {
    .close-modal {
        top: 10px; right: 10px; font-size: 2rem;
        display: flex; align-items: center; justify-content: center; border-radius: 50%;
    }
}


.interior-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Adds space between the heading and buttons */
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Adds space between the two buttons */
    width: 100%;
    align-items: center;
}

/* Styling the new Register Button to stand out */
.reg-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #00ffcc; /* Example: A bright teal/matrix color */
    color: #000;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    width: 80%; /* Consistent width */
    text-align: center;
}

.reg-btn:hover {
    background: transparent;
    color: #00ffcc;
    border: 2px solid #00ffcc;
    box-shadow: 0 0 15px #00ffcc;
}

/* Ensure the original view-btn has a similar width for symmetry */
.view-btn {
    width: 80%;
    text-align: center;
}


.minimal-footer {
    width: 100%;
    /* Use clamp for responsive padding: min 15px, preferred 3vw, max 25px */
    padding: clamp(15px, 3vw, 25px) 0; 
    background-color: #050000;
    opacity: 0.6;
    border-top: 1px solid rgba(255, 50, 50, 0.1);
    text-align: center;
    margin-top: auto;
}

.minimal-footer p {
    font-family: 'Montserrat', sans-serif;
    /* Scales font size based on screen width so it doesn't look huge on phones */
    font-size: clamp(0.75rem, 2vw, 1rem); 
    color: #ff0000;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    /* Prevents text from hitting the screen edges on mobile */
    margin: 0 15px; 
    line-height: 1.4;
}

/*

/* =========================================
   UPDATED RULEBOOK IMAGE STYLES
   ========================================= */

/* Scrollable Image Container - DISABLED SCROLLING FOR LAPTOP */
.rulebook-img-container {
    width: 100%;
    /* Changed from flex: 1 to auto to prevent stretching */
    flex: 0 1 auto; 
    /* Remove scrollbars for laptop view */
    overflow: hidden; 
    margin-bottom: 0px;
    padding-right: 0;
    display: flex;
    justify-content: top;
    align-items: flex-start;
}

#rulebookImage {
    width: 100%; 
    height: auto; 
    /* Ensures the image fits within the modal height without triggering scroll */
    max-height: 60vh; 
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

/* Targeted Fix for 968px Media */
@media (max-width: 968px) {
    .metallic-card {
        max-width: 450px;
    }

    .rulebook-img-container {
        /* Strictly ensure no scrollbars appear */
        overflow: hidden; 
        padding-right: 0;
    }

    #rulebookImage {
        width: 100%;
        height: 100%;
        /* Adjust max-height for tablets to keep image R1, R2, R3 fully visible */
        max-height: 55vh; 
        object-fit: contain;
    }
}

@media (max-width: 600px) {
    .metallic-card {
        padding: 2.5rem 1rem 1rem;
        max-height: 75vh; /* Shorter on small phones to ensure button is visible */
    }

    .modal-heading {
        font-size: 1.5rem;
        letter-spacing: 3px;
        margin-bottom: 1rem;
    }

    .reg-btn {
        bottom: -50px; /* Adjusted position for smaller screens */
        font-size: 0.9rem;
        padding: 12px 25px;
    }
}

@media (max-width: 768px) {
    /* Grid adjustment for tablets */
    .events-grid { 
        grid-template-columns: repeat(1, 1fr); /* 2 columns instead of 1 */
        max-width: 700px; 
        gap: 1.5rem;
    }

    /* Modal size for tablets */
    .metallic-card {
        width: 85%; /* Slightly wider than mobile for better readability */
        max-width: 480px;
        max-height: 80vh; /* Keeps card height consistent */
        padding: 3rem 1.5rem 1.5rem;
    }

    .modal-heading {
        font-size: 1.8rem;
        letter-spacing: 4px;
    }
}