@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Space Grotesk", Arial, sans-serif;
    background-color: #000;
    color: #fff;
}

.nav-left {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.nav-right {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.nav-right a {
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 1.2em;
    background-color: transparent !important;
}

.nav-right a:hover {
    text-decoration: underline;
    background-color: transparent !important;
}

.video-grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 videos per row */
    grid-template-rows: repeat(3, 1fr);    /* 3 rows */
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* Hide scrollbars */
}

/* Responsive grid adjustments for 15 videos (5x3 base) */
/* Adjusting breakpoints and layouts for a more panoramic feel */

@media (max-width: 1600px) { /* Large screens, slightly less columns */
    .video-grid-container {
        grid-template-columns: repeat(4, 1fr); /* 4 videos per row */
        /* This would require more rows or fewer videos to fit 15.
           Let's assume we want to keep 15 videos, so we need to adjust rows.
           If we have 4 columns, we'd need 4 rows for 15 videos (3 full, 1 partial).
           Or, we can aim for a layout that still shows all 15.
           Let's try to maintain 15 videos. 4 columns means 15/4 = ~3.75 rows.
           This doesn't make a clean grid.
           Let's rethink responsive for 15 videos.
           Perhaps 3 columns for tablets. 15 videos / 3 columns = 5 rows.
           And 2 columns for phones. 15 videos / 2 columns = 7.5 rows (not ideal).
           Or 1 column for phones = 15 rows.
        */
    }
}


@media (max-width: 1200px) { /* Medium-large screens / tablets in landscape */
    .video-grid-container {
        grid-template-columns: repeat(3, 1fr); /* 3 videos per row */
        grid-template-rows: repeat(5, 1fr);    /* 5 rows (3x5 = 15 videos) */
    }
}

@media (max-width: 768px) { /* Smaller tablets / large phones */
    .video-grid-container {
        grid-template-columns: repeat(2, 1fr); /* 2 videos per row */
        /* For 15 videos, this means 7 full rows and 1 row with 1 video.
           Or we can make it 8 rows and the last row will have one video taking full width
           or two cells with one empty. Let's aim for 8 rows, last video might be centered or larger.
           For simplicity, let's make it 8 rows, and CSS grid will handle flow.
        */
        grid-template-rows: repeat(8, 1fr); /* Approx 2x8, last row might be sparse */
        /* A cleaner way for 15 items in 2 columns is not possible with pure grid rows like this.
           The items will flow. 15 items / 2 columns = 7.5. So 7 full rows, 1 item on 8th.
           The grid will create 8 rows if items flow into them.
        */
    }
}


@media (max-width: 480px) { /* Mobile phones */
    .video-grid-container {
        grid-template-columns: 1fr; /* 1 video per row */
        grid-template-rows: repeat(15, 1fr); /* 15 rows (1x15 = 15 videos) */
    }
}

/* Let's simplify the responsive breakpoints for a 5x3 grid (15 videos) */
/* Base: 5 columns, 3 rows */

@media (max-width: 1280px) { /* Slightly smaller desktops / large tablets */
    .video-grid-container {
        grid-template-columns: repeat(4, 1fr); /* 4 videos per row */
        /* 15 videos / 4 columns = 3.75. Grid will make 4 rows. */
    }
}

@media (max-width: 992px) { /* Tablets */
    .video-grid-container {
        grid-template-columns: repeat(3, 1fr); /* 3 videos per row */
        grid-template-rows: repeat(5, 1fr);    /* 3x5 = 15 videos */
    }
}

@media (max-width: 768px) { /* Large phones / Small tablets portrait */
    .video-grid-container {
        grid-template-columns: repeat(2, 1fr); /* 2 videos per row */
        /* 15 videos / 2 columns = 7.5. Grid will make 8 rows. */
    }
}

@media (max-width: 576px) { /* Phones */
    .video-grid-container {
        grid-template-columns: 1fr; /* 1 video per row */
        grid-template-rows: repeat(15, 1fr); /* 1x15 = 15 videos */
    }
}

.video-grid-container video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, might crop */
}

.content-container {
    padding: 80px 20px 20px; /* Adjust top padding to account for nav bar */
    text-align: center;
}

.content-container h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.content-container p {
    font-size: 1.2em;
    line-height: 1.6;
}

/* Modal Styles */
.modal {
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity for backdrop */
    
    display: flex; /* Always flex for layout */
    align-items: center;
    justify-content: center;

    opacity: 0; /* Start fully transparent */
    visibility: hidden; /* Start hidden */
    transition: opacity 0.4s ease-in-out, visibility 0s linear 0.4s; /* Delay visibility until opacity transition ends */
    /* The visibility transition makes it disappear from accessibility tree after fade out */
}

.modal.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease-in-out, visibility 0s linear 0s; /* Show immediately */
}

.modal-content {
    background-color: #000; /* Changed to black */
    color: #fff; /* Changed to white */
    margin: 0; /* Remove margin for fullscreen */
    padding: 40px; /* Increased padding */
    border-radius: 0; /* No border radius for fullscreen */
    width: 100%; /* Fullscreen width */
    height: 100%; /* Fullscreen height */
    display: flex; /* Use flex to center inner content */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    font-size: 1.2em; /* Slightly larger font */
    line-height: 1.7; /* Default line height for modal content */
    
    /* transform: scale(0.95); Removed scaling effect */
    /* Opacity of content is handled by parent .modal's opacity for simplicity of fade */
    /* transition: transform 0.4s ease-in-out; Removed transform transition */
    box-sizing: border-box; /* Ensure padding is included in width/height */
}

/* .modal.show .modal-content { */
    /* transform: scale(1); Removed scaling effect */
/* } */

/* Reduce line height specifically for paragraphs in the welcome modal */
#welcome-modal .modal-content p {
    line-height: 1.4; /* Adjust as needed */
    margin-bottom: 0px; /* Reduced space before the button */
}

.modal-content p a {
    color: #fff; /* Changed to white */
    text-decoration: underline;
}

.modal-content p a:hover {
    color: #ccc; /* Changed to light gray for hover on black bg */
}

.close-button {
    color: #fff; /* Changed to white */
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #ccc; /* Changed to light gray for hover on black bg */
    text-decoration: none;
}

.modal-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin-top: 15px;
    cursor: pointer;
    border-radius: 5px;
    font-family: "Space Grotesk", Arial, sans-serif;
}

#start-button.modal-button { /* Specific styling for start button */
    background-color: transparent;
    color: #fff; /* Changed to white */
    text-decoration: underline;
    padding: 10px 0; /* Adjust padding if only text */
    font-size: 2.4em; /* Match modal text size */
}

#start-button.modal-button:hover {
    background-color: transparent;
    color: #ccc; /* Changed to light gray for hover on black bg */
}


/* Video Wrapper and Play/Pause Button Styles */
.video-wrapper {
    position: relative; /* For absolute positioning of the button */
    width: 100%;
    height: 100%;
    display: flex; /* Ensure video fills wrapper */
    align-items: center;
    justify-content: center;
}

.video-wrapper video { /* Ensure video itself is also taking up space */
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.play-pause-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: transparent; /* Removed background */
    color: white;
    border: none;
    /* border-radius: 50%; Removed rounded border for circle */
    width: auto; /* Adjust size as needed, auto for icon */
    height: auto; /* Adjust size as needed, auto for icon */
    font-size: 48px; /* Adjust icon size - made larger for visibility */
    cursor: pointer;
    display: none; /* Initially hidden, shown when video is paused */
    align-items: center;
    justify-content: center;
    opacity: 0.8; /* Slight transparency */
    transition: opacity 0.2s ease-in-out;
    text-shadow: 0px 0px 10px rgba(0,0,0,0.7); /* Add shadow for better visibility */
}

.play-pause-button:hover {
    opacity: 1;
}

/* Show button only when video is paused and wrapper is hovered (optional) or always when paused */
.video-wrapper video:paused + .play-pause-button {
    display: flex; /* Show button when video is paused */
}

/* Style for when video is playing - button could be less prominent or hidden */
/* .video-wrapper video:not(:paused) + .play-pause-button { */
    /* opacity: 0; /* Hide button when video is playing */
/* } */
/* .video-wrapper:hover video:not(:paused) + .play-pause-button { */
    /* opacity: 0.7; /* Show on hover even if playing */
/* } */

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 120px; /* Width of the toggle - increased */
    height: 34px; /* Height of the toggle */
    /* margin-right: 15px; No longer needed as it's alone in nav-left */
    vertical-align: middle; 
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc; /* Background of the toggle track */
    border-radius: 34px; /* Make it rounded */
    transition: .4s;
    font-size: 0.8em; /* Smaller font for "Auto-play" text */
    line-height: 34px; /* Center text vertically */
    text-align: center;
    color: #333; /* Text color for "Off" state */
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 26px; /* Height of the slider button */
    width: 26px; /* Width of the slider button */
    left: 4px;
    bottom: 4px;
    background-color: white; /* Color of the slider button */
    border-radius: 50%; /* Make it circular */
    transition: .4s;
}

.toggle-input:checked + .toggle-label {
    background-color: #000; /* Background when toggle is ON - changed to black */
    color: white; /* Text color for "On" state - though text might be covered */
}

.toggle-input:checked + .toggle-label:before {
    transform: translateX(86px); /* Move slider button to the right for 120px width */
}

/* Text inside the label - adjust if needed */
.toggle-label:after {
    /* This is an alternative way to show text, if not directly on the label */
    /* content: 'Off'; */
    /* display: block; */
    /* text-align: center; */
    /* line-height: 34px; */
}

.toggle-input:checked + .toggle-label:after {
    /* content: 'On'; */
}
