/*
 * == THE BOUNCE LAB - MAIN STYLESHEET ==
 * This file combines all styles from all pages.
 *
 * UPDATED: Changed technician list to be all blue boxes with pink names.
 */

:root {
    --primary-neon-blue: #00ffff; /* bright cyan/aqua from logo */
    --secondary-neon-pink: #ff00ff; /* bright magenta from logo */
    --dark-background: #0d0d1a; /* very dark blue/purple, almost black */
    --text-color: #e0e0e0;
    --accent-glow: rgba(0, 255, 255, 0.5);
    --accent-glow-pink: rgba(255, 0, 255, 0.5);
    --neon-green: #39ff14; /* vibrant neon green */
    --neon-green-glow: rgba(57, 255, 20, 0.7);
}

body {
    font-family: 'montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--dark-background);
    color: var(--text-color);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* NEW: Style for all bold text */
strong, b {
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green-glow);
    font-weight: 700;
}


.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
    /* NEW BACKGROUND IMAGE */
    background-image: url('bouncelabbg2.jpg'); /* Make sure blcos.jpeg is in the same folder */
    background-size: cover; /* Ensures image covers the entire element */
    background-position: center center; /* Centers the image */
    background-repeat: no-repeat;
    filter: brightness(0.6) blur(0.5px); /* Slightly less bright and blurry to make the details visible */
    animation: backgroundglow 20s infinite alternate ease-in-out;
    transform: scale(1.02);
}


@keyframes backgroundglow {
    0% { filter: brightness(0.6) blur(0.5px); transform: scale(1.02); } /* Adjusted starting point */
    50% { filter: brightness(1.0) blur(0px); transform: scale(1); } /* Brighter and sharper at peak */
    100% { filter: brightness(0.6) blur(0.5px); transform: scale(1.02); } /* Adjusted ending point */
}

/* --- bubbles (new for image overlay) --- */
.animated-bubble {
    position: absolute;
    background-color: rgba(57, 255, 20, 0.8); /* neon green */
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 8px var(--neon-green);
    pointer-events: none; /* crucial so they don't interfere with interaction */
    animation: bubblefloat 5s linear forwards; /* animation name changed */
}

@keyframes bubblefloat {
    0% { transform: translateY(0) scale(0); opacity: 0; }
    20% { opacity: 0.8; transform: scale(1); }
    100% { transform: translateY(-200px) scale(0.5); opacity: 0; } /* float upwards and fade out */
}
/* --- end bubbles --- */


header {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px 40px;
    display: flex;
    flex-direction: column; /* Changed to column for better mobile stacking */
    justify-content: center;
    align-items: center;  
    position: relative;
    z-index: 10;
}

.logo-banner {
    width: 100%; /* Make banner responsive */
    max-width: 800px; /* Max width for larger screens */
    height: auto;
    
}

/* --- new dropdown menu styles --- */
.menu-container {
    position: relative; /* anchor for the dropdown */
    margin-top: 0; /* Adjusted margin */
}

/* === UPDATED MENU BUTTON STYLES === */
.menu-button {
    background-image: url('menuicon.png'); /* Ensure menuicon.png is in the same folder */
    background-color: transparent;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 246px; 
    height: 185px; 
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none; 
    border-radius: 8px; 
    filter: brightness(1.7); 
}

.menu-button:hover {
    transform: scale(1.05);
    filter: brightness(2.0); /* Brighter on hover, but no glow */
}

.menu-button.active {
    box-shadow: 0 0 25px var(--secondary-neon-pink), inset 0 0 15px var(--secondary-neon-pink); /* This is the "clicked" glow */
    transform: scale(1.02);
    filter: drop-shadow(0 0 20px var(--secondary-neon-pink)) brightness(2); /* This is the "clicked" glow */
}
/* === END UPDATED STYLES === */

/* === JANK FIX START === */

/* Animation for the dropdown box itself (maintains centering) */
@keyframes dropdownOpen {
    0% { opacity: 0; transform: translateY(20px) scale(0.8) translateX(-50%); }
    100% { opacity: 1; transform: translateY(0) scale(1) translateX(-50%); }
}

/* NEW Animation for the links inside (just fade and move up) */
@keyframes linkFadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}


.menu-dropdown {
    display: none; /* controlled by js */
    position: absolute;
    top: 100%; /* Positioned below the button */
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-background);
    border: 2px solid var(--secondary-neon-pink);
    border-radius: 10px;
    box-shadow: 0 0 20px var(--accent-glow-pink);
    padding: 10px;
    width: 246px; 
    z-index: 100;
    opacity: 0;
    transform-origin: top center;
    box-sizing: border-box; 
}

.menu-dropdown.active {
    display: block;
    animation: dropdownOpen 0.3s ease-out forwards; /* <-- Use dropdown animation */
}

.menu-dropdown a {
    display: block;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    font-family: 'oswald', sans-serif;
    text-transform: uppercase;
    border-radius: 5px;
    margin: 5px 0;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0; /* for staggered animation */
}

/* stagger the link animations */
.menu-dropdown.active a {
    animation: linkFadeIn 0.5s ease-out forwards; /* <-- Use NEW link animation */
}
/* === END JANK FIX === */


.menu-dropdown.active a:nth-child(1) { animation-delay: 0.1s; }
.menu-dropdown.active a:nth-child(2) { animation-delay: 0.15s; }
.menu-dropdown.active a:nth-child(3) { animation-delay: 0.2s; }
.menu-dropdown.active a:nth-child(4) { animation-delay: 0.25s; }
.menu-dropdown.active a:nth-child(5) { animation-delay: 0.3s; }
.menu-dropdown.active a:nth-child(6) { animation-delay: 0.35s; } 

/* bubble hover effect */
.menu-dropdown a::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 8px;
    height: 8px;
    background-color: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-green);
    transition: all 0.3s ease;
    opacity: 0;
}

.menu-dropdown a:hover {
    color: var(--primary-neon-blue);
    text-shadow: 0 0 10px var(--primary-neon-blue);
    background-color: rgba(0, 255, 255, 0.1);
    transform: scale(1.03);
    padding-left: 30px; /* make room for the bubble */
}

.menu-dropdown a:hover::before {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}
/* --- end new menu styles --- */


main {
    flex-grow: 1;
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Default justify, schedule/contact override to flex-start */
    position: relative;
    z-index: 5;
}

/* Specificity for sub-pages */
body.page-schedule main,
body.page-contact main,
body.page-technicians main,
body.page-technician-detail main,
body.page-social-experiments main { 
    justify-content: flex-start;
}


h1 {
    font-family: 'oswald', sans-serif;
    font-size: 4em;
    color: var(--secondary-neon-pink);
    text-shadow: 0 0 20px var(--secondary-neon-pink), 0 0 30px var(--accent-glow-pink);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

/* --- Styles from index.html --- */
.welcome-box {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--primary-neon-blue); /* BLUE */
    box-shadow: 0 0 25px var(--primary-neon-blue), inset 0 0 10px var(--primary-neon-blue); /* BLUE */
    border-radius: 15px;
    padding: 25px 30px;
    width: 80%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    line-height: 1.6;
    font-size: 1.1em;
    margin-top: 30px; /* Added margin to separate boxes */
}

/* Make sure the first box on homepage has no top margin */
main > .welcome-box:first-of-type {
    margin-top: 0;
}


.player-container {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--primary-neon-blue); 
    box-shadow: 0 0 25px var(--primary-neon-blue), inset 0 0 10px var(--primary-neon-blue); 
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
    width: 80%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.current-track {
    margin-bottom: 20px;
}

.current-track h2 {
    font-family: 'oswald', sans-serif;
    color: var(--secondary-neon-pink); /* CHANGED TO PINK */
    font-size: 2.2em;
    text-shadow: 0 0 15px var(--secondary-neon-pink); /* CHANGED TO PINK */
    margin-bottom: 10px;
}

.current-track p {
    font-size: 1.2em;
    color: var(--text-color);
}

audio {
    width: 100%;
    margin-top: 20px;
    filter: hue-rotate(270deg) saturate(1.5) brightness(1.2); /* adjusts default player colors */
}

/* attempt to style audio controls, often browser-dependent */
audio::-webkit-media-controls-panel {
    background-color: rgba(0, 255, 255, 0.2); 
    border-radius: 10px;
}
audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: var(--primary-neon-blue);
    text-shadow: 0 0 5px var(--primary-neon-blue);
}
audio::-webkit-media-controls-timeline {
    background-color: rgba(255, 0, 255, 0.2); 
    border-radius: 5px;
}

/* --- Lab Technicians List Page --- */
.technician-list-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 90%;
    max-width: 900px;
    margin-top: 30px;
}

.technician-list-item {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 2px solid var(--primary-neon-blue); /* CHANGED */
    box-shadow: 0 0 25px var(--accent-glow), inset 0 0 10px var(--accent-glow); /* CHANGED */
}

.technician-list-item .technician-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--dark-background);
    border: 3px solid var(--primary-neon-blue); /* CHANGED */
    box-shadow: 0 0 15px var(--primary-neon-blue); /* CHANGED */
}

.technician-list-item-info {
    text-align: left;
}

.technician-list-item-info h3 {
    font-family: 'oswald', sans-serif;
    font-size: 2em;
    margin: 0 0 10px 0;
    color: var(--secondary-neon-pink); /* CHANGED */
    text-shadow: 0 0 15px var(--secondary-neon-pink); /* CHANGED */
}

.technician-list-item-info p {
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

/* -- Multi-color List Items -- */
/* REMOVED all nth-child rules for this section */


.technician-link-button {
    display: inline-block;
    background: transparent;
    border: 2px solid var(--secondary-neon-pink);
    box-shadow: 0 0 10px var(--accent-glow-pink), inset 0 0 5px var(--accent-glow-pink);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 8px;
    font-family: 'oswald', sans-serif;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.technician-link-button:hover {
    background-color: var(--accent-glow-pink);
    color: var(--dark-background);
    text-shadow: none;
}

/* --- Individual Technician Detail Page --- */
.back-link {
    display: inline-block;
    color: var(--primary-neon-blue);
    text-decoration: none;
    font-family: 'oswald', sans-serif;
    font-size: 1.1em;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-link:hover {
    text-shadow: 0 0 10px var(--primary-neon-blue);
    transform: scale(1.05);
}

.technician-detail-container {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* -- Multi-color Detail Boxes -- */
.technician-detail-blue {
    border: 2px solid var(--primary-neon-blue);
    box-shadow: 0 0 25px var(--primary-neon-blue), inset 0 0 10px var(--primary-neon-blue);
}
.technician-detail-pink {
    border: 2px solid var(--secondary-neon-pink);
    box-shadow: 0 0 25px var(--secondary-neon-pink), inset 0 0 10px var(--secondary-neon-pink);
}
.technician-detail-green {
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 25px var(--neon-green), inset 0 0 10px var(--neon-green);
}


.technician-detail-container .technician-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    background-color: var(--dark-background);
}
/* Match detail image border to box color */
.technician-detail-blue .technician-image {
    border: 3px solid var(--primary-neon-blue);
    box-shadow: 0 0 15px var(--primary-neon-blue);
}
.technician-detail-pink .technician-image {
    border: 3px solid var(--secondary-neon-pink);
    box-shadow: 0 0 15px var(--secondary-neon-pink);
}
.technician-detail-green .technician-image {
    border: 3px solid var(--neon-green);
    box-shadow: 0 0 15px var(--neon-green);
}


.technician-detail-container p {
    font-size: 1.1em;
    line-height: 1.6;
    text-align: center;
    max-width: 600px;
    margin-bottom: 30px;
}

.technician-detail-container h2 {
    font-family: 'oswald', sans-serif;
    color: var(--primary-neon-blue);
    font-size: 2.2em;
    text-shadow: 0 0 15px var(--primary-neon-blue);
    margin-bottom: 20px;
}

.technician-embeds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.youtube-embed {
    width: 100%;
    aspect-ratio: 16 / 9; /* For 16:9 videos */
    border: 1px dashed var(--accent-glow);
    border-radius: 10px;
}

.youtube-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.tiktok-embed-placeholder {
    width: 100%; 
    max-width: 325px; /* TikTok's default max */
    margin: 0 auto;
    background: rgba(255, 0, 255, 0.1);
    border: 1px dashed var(--secondary-neon-pink);
    border-radius: 10px;
    box-shadow: inset 0 0 8px var(--secondary-neon-pink);
    overflow: hidden;
    min-height: 300px; /* Give it some space */
}

/* --- Social Experiments Page --- */
.embed-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    width: 90%;
    max-width: 1200px;
    margin-top: 30px;
}

.embed-box {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--primary-neon-blue); /* BLUE */
    box-shadow: 0 0 25px var(--primary-neon-blue), inset 0 0 10px var(--primary-neon-blue); /* BLUE */
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.embed-box h3 {
    font-family: 'oswald', sans-serif;
    color: var(--secondary-neon-pink); /* CHANGED TO PINK */
    font-size: 2em;
    text-shadow: 0 0 15px var(--secondary-neon-pink); /* CHANGED TO PINK */
    margin: 0 0 15px 0;
}

/* === TWITCH FIX START === */
.twitch-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px dashed var(--accent-glow);
    border-radius: 10px;
    position: relative; /* Make it a positioning container */
}

/* This targets the div you created */
#twitch-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* === TWITCH FIX END === */

.twitch-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

/* Re-using existing styles for YouTube and TikTok embeds */
.embed-box .youtube-embed {
    width: 100%;
    max-width: none; /* Override technician page style */
}

.embed-box .tiktok-embed-placeholder {
    width: 100%;
    max-width: 325px; /* Keep this max-width */
    margin-bottom: 20px; /* Add some spacing */
}
/* --- End Technicians Page --- */


/* --- Lab Reports Section --- */
#lab-reports {
    text-align: left; /* Override main's center-align */
}

.report-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--primary-neon-blue);
}

.report-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.report-item p {
    margin: 0;
    line-height: 1.6;
}

.report-item a {
    color: var(--primary-neon-blue);
    text-decoration: none;
    font-weight: 700;
}

.report-item a:hover {
    text-shadow: 0 0 10px var(--primary-neon-blue);
}
/* --- End Lab Reports Section --- */


/* --- Footer --- */
footer {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    text-align: center;
    color: var(--text-color);
    border-top: 2px solid var(--primary-neon-blue); /* CHANGED TO BLUE */
    box-shadow: 0 0 15px var(--primary-neon-blue); /* CHANGED TO BLUE */
    margin-top: 40px;
    position: relative;
    z-index: 10;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    main {
        padding: 20px;
    }

    header {
        flex-direction: column;
        padding: 15px 20px;
    }

    .logo-banner {
        max-width: 100%; /* Ensure it takes full width on smaller screens */
        margin-bottom: 10px;
    }

    /* Make image button responsive */
    .menu-button {
        width: 202px; 
        height: 151px; 
    }
    
    .menu-dropdown {
        top: calc(100% - 20px); /* Adjust overlap for new button */
        width: 202px; /* <-- This now matches the mobile button */
        box-sizing: border-box; /* <-- THIS IS THE FIX */
    }

    h1 {
        font-size: 2.5em;
    }

    .player-container, .welcome-box {
        width: 95%;
        padding: 20px;
    }
    
    .welcome-box {
        font-size: 1em; /* Slightly smaller text on mobile */
    }

    .current-track h2 {
        font-size: 1.8em;
    }

    .current-track p {
        font-size: 1em;
    }
    
    /* Technicians List Page Responsive */
    .technician-list-container {
        width: 95%;
    }
    
    .technician-list-item {
        flex-direction: column;
        text-align: center;
    }
    
    .technician-list-item-info {
        text-align: center;
    }

    /* Technician Detail Page Responsive */
    .technician-detail-container {
        width: 95%;
        padding: 20px;
    }

    .technician-embeds {
        grid-template-columns: 1fr; /* Stack embeds on mobile */
        width: 95%;
        max-width: 325px;
    }

    /* Social Experiments Page Responsive */
    .embed-grid-container {
        grid-template-columns: 1fr;
        width: 95%;
    }

    .tiktok-embed-placeholder {
        width: 100%;
        max-width: 325px;
    }
}