/* --- Basic Reset and Body Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ADD THIS: Ensure HTML and Body take up the full viewport height */
html, body {
    height: 100%;
    overflow: hidden; /* Prevent scrolling on the entire body */
}

body {
    font-family: 'Black Ops One', sans-serif;
    background-color: #0a0a0a;
    color: #eee;
    min-height: 100vh; /* Keep this as a fallback, but height: 100% is more strict */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Removed padding-bottom as it might cause overflow */
    /* Optional: Add the subtle red dots background pattern */
}

/* --- Header Styles --- */
header {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    flex-shrink: 0; /* Prevent header from shrinking */
}

header h1 {
    color: #FF4655;
    font-size: 2.5em;
    font-family: 'Black Ops One', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- Navigation Styles --- */
nav {
    width: 100%;
    text-align: center;
    padding-bottom: 20px;
    flex-shrink: 0; /* Prevent nav from shrinking */
}

nav ul {
    list-style: none;
    display: inline-block;
    padding: 0;
}

nav li {
    display: inline-block;
    margin: 0 15px;
}

nav a {
    text-decoration: none;
    color: #bbb;
    font-size: 1em;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #fff;
}

/* --- Main Content Container --- */
main {
    width: 100%;
    max-width: 1700px; /* Still limit overall width */
    padding: 0 20px;
    display: flex;
    justify-content: center; /* Centers the map-container or map-grid */
    flex-grow: 1; /* Allow main content to grow and fill space */
    overflow-y: auto; /* Allow scrolling *within* the main content if necessary */
    /* If you truly want NO scrolling EVER, change overflow-y to hidden */
}

/* --- Home Page Map Grid Styles --- */
.map-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding-top: 20px;
    /* Ensure the grid itself doesn't push content out */
}

.map-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: calc(((100% - (20px * 5)) / 6) - 1%);
    min-width: 160px;
    margin: 0;
    padding: 0;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, border-radius 0.3s ease-in-out, filter 0.3s ease-in-out;
    opacity: 0; /* Initial state for fade-in animation */
    transform: translateY(0); /* Keep transform at 0 for animation */
    animation: fadeIn 1s ease-out forwards; /* Apply fade-in animation */
}

.map-link:hover {
    transform: scale(0.95);
    border-radius: 20px;
    filter: sepia(40%);
}

.map-card {
    width: 100%;
    min-width: auto;
    background-color: #222;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    display: flex;
    flex-direction: column;
}

.map-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 0.7;
    object-fit: cover;
}

.map-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    text-align: center;
    color: #fff;
    font-size: 1.5em;
    font-weight: bold;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    background-color: rgba(0, 0, 0, 0.6);
}

/* --- Map Link Animation Delay --- */
.map-grid .map-link {
    animation-delay: calc(0.05s * var(--map-index));
}

/* --- Animation Keyframes --- */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* --- Map Detail Page Styles --- */
.map-container {
    margin: 20px auto; /* Still keeps horizontal centering and top/bottom margin */
    text-align: center; /* Center text and inline/inline-block elements */
    width: 100%;
    /* The height of this container will be managed by its content and the flex layout */
}

.map-container h2 {
    color: #FF4655;
    margin-bottom: 20px;
    flex-shrink: 0; /* Prevent the heading from shrinking */
}

.map-blueprint {
    width: 100%;
    max-width: 870px; /* Control the size of the map image container */
    margin: 0 auto;
    text-align: center;
    position: relative; /* Positioning context for absolute children */
    display: inline-block; /* Shrink-wrap to content */
    /* Removed fixed height/min-height here as it will depend on the image and controls */
}

.map-blueprint img {
    display: block;
    max-width: 100%; /* Make image responsive */
    height: auto;
    max-height: 70vh; /* Limit max height relative to viewport height */
    /* You might need to adjust this value (e.g., 80vh, 90vh) based on header/nav size */
    object-fit: contain;
}

/* --- Toggle Buttons Styles --- */
.controls {
    display: flex;
    gap: 15px;
    align-items: flex-start; /* Align items to the top */

    position: absolute; /* Position relative to .map-blueprint */
    top: 10px;
    left: 10px;
    z-index: 10;

    background-color: rgba(0, 0, 0, 0.5); /* Added back semi-transparent background */
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #888; /* Gray outline border */
}

.toggle-button {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.toggle-label {
    font-size: 0.9em;
    color: #bbb;
    margin-top: 5px;
    white-space: nowrap;
}

/* Switch (Slider) Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 40px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #FF4655; /* Base color - Valorant red */
    transition: .4s; /* Shorthand transition */
}

.slider:before {
    position: absolute;
    content: "";
    height: 32px;
    width: 32px;
    left: 4px;
    bottom: 4px;
    background-color: rgb(0, 0, 0); /* Slider color - Black */
    transition: .4s; /* Shorthand transition */
}

input:checked + .slider {
    background-color: #65ff46; /* Color when checked - Green */
}

input:focus + .slider {
    box-shadow: 0 0 1px #65ff46;
}

input:checked + .slider:before {
    transform: translateX(40px);
}

.slider.round {
    border-radius: 40px;
}

.slider.round:before {
    border-radius: 50%;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1700px) {
    .map-link {
        width: calc(((100% - (20px * 4)) / 5) - 1%);
    }
}

@media (max-width: 1500px) {
    .map-link {
        width: calc(((100% - (20px * 3)) / 4) - 1%);
    }
}

@media (max-width: 1200px) {
     .map-link {
        width: calc(((100% - (15px * 2)) / 3) - 1%);
    }
}

@media (max-width: 992px) {
    .map-grid {
         gap: 15px;
    }
     .map-link {
        width: calc(((100% - (15px * 2)) / 3) - 1%);
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    nav li {
        margin: 0 10px;
    }
    .map-grid {
        gap: 10px;
    }
    .map-link {
        width: calc(((100% - (10px * 1)) / 2) - 1%);
    }
}

@media (max-width: 480px) {
     header h1 {
        font-size: 1.8em;
    }
    nav li {
        margin: 0 8px;
    }
    nav a {
        font-size: 0.9em;
    }
    .map-link {
        width: 94%;
        min-width: auto;
    }
    .map-grid {
        gap: 10px;
    }
}
/* Add this CSS */
.map-card {
    /* Keep existing styles */
    width: 100%;
    min-width: auto;
    background-color: #222;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative; /* Ensure children can be positioned absolutely relative to this */
    display: flex;
    flex-direction: column;
}

.map-status-banner {
    position: absolute;
    top: 10px; /* Adjust as needed for vertical position */
    left: 0; /* Position at the left edge */
    z-index: 5; /* Ensure it's above the image but below map-name */
    background-color: #FFFF00; /* Yellow background */
    color: #000; /* Black text */
    padding: 5px 10px; /* Padding around the text */
    font-size: 0.9em; /* Adjust font size */
    font-weight: bold;
    text-transform: uppercase;
    /* Optional: Add a slight slant or border */
    transform: skewX(-10deg); /* Optional: Add a slant */
    transform-origin: left; /* Ensure skew is from the left */
}

.map-status-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: -10px; /* Adjust this value for the size of the corner point */
    width: 0;
    height: 0;
    border-top: 15px solid transparent; /* Adjust height */
    border-bottom: 15px solid transparent; /* Adjust height */
    border-right: 10px solid #FFFF00; /* Match background color */
}
