/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 100vh;
    max-width: 100vw;
}

body {
    font-family: 'Bungee', sans-serif;
    background-color: #000;
    color: #fff;
    position: relative;
    padding-top: 0; /* No nav bar on home page */
}

/* Loading screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background-color: #000;
    transition: opacity 0.3s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
}

.loading-text {
    position: relative;
    z-index: 10001;
    font-family: 'Bungee', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #fff;
    text-transform: lowercase;
    font-weight: 400;
    text-align: center;
}

.loading-dots {
    display: inline-block;
    letter-spacing: 0.15em;
    margin-left: 0.2em;
}

.loading-dots .dot {
    display: inline-block;
    animation: dotPulse 1.4s ease-in-out infinite;
    animation-fill-mode: both;
}

.loading-dots .dot:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    40% {
        transform: scale(1.5);
        opacity: 0.8;
    }
}

/* Content overlay - starts hidden, fades in after loading */
.content-overlay {
    transition: opacity 0.4s ease-in;
}

.content-overlay.loaded {
    opacity: 1 !important;
}

/* Background slideshow */
.slideshow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #000;
}

.slideshow-container .slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.4;
    transition: opacity 0.5s ease-in-out;
}

.slideshow-container .slideshow-image.active {
    opacity: 0.4;
}

.slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* Content overlay */
.content-overlay {
    position: relative;
    z-index: 10;
    height: 100vh;
    max-height: 100vh;
    width: 100%;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.5rem, 2vh, 1rem);
    overflow: hidden;
}

/* Header */
.main-header {
    width: 100%;
    text-align: center;
    padding: clamp(0.5rem, 2vh, 1rem) 1rem;
    margin-top: clamp(0.25rem, 1vh, 0.5rem);
    flex-shrink: 0;
}

.welcome-text {
    font-family: 'Bungee', sans-serif;
    font-size: clamp(0.75rem, 2vw, 1.25rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: clamp(0.25rem, 1vh, 0.5rem);
}

.main-header h1 {
    font-family: 'Bungee', sans-serif;
    font-size: clamp(1.25rem, 4vw, 2.5rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: #fff;
    margin: 0;
}

/* Circular menu container */
.circular-menu-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: clamp(0.5rem, 2vh, 1rem) clamp(0.5rem, 2vw, 1rem);
    min-height: 0;
    overflow: hidden;
}

.circular-menu {
    position: relative;
    width: 100%;
    max-width: min(600px, 70vh, 70vw);
    aspect-ratio: 1;
    margin: 0 auto;
}

.menu-item {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: clamp(60px, 12vw, 80px);
    height: clamp(60px, 12vw, 80px);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-radius 0.2s ease, border 0.2s ease;
    transform-origin: center;
    overflow: hidden;
}

/* Remove border and border-radius for items with icons */
.menu-item.has-icon {
    border: none;
    border-radius: 0;
    background-color: transparent;
}

.menu-item-image {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.25s ease, transform 0.2s ease, border-radius 0.2s ease;
    opacity: 1;
    filter: grayscale(0%);
}

/* Remove border-radius from image when parent has icon */
.menu-item.has-icon .menu-item-image {
    border-radius: 0;
}

.menu-item-label {
    position: absolute;
    font-family: 'Bungee', sans-serif;
    font-size: clamp(0.4rem, 1.5vw, 0.875rem);
    font-weight: 400;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.25s ease, font-size 0.2s ease;
    z-index: 10;
    pointer-events: none;
    filter: grayscale(100%) contrast(1.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 2px;
    box-sizing: border-box;
}

.menu-item:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(255, 255, 255, 0.3);
    z-index: 100;
    cursor: none; /* Hide cursor on hover to see label text */
}

/* Bright Crayola colors for each section on hover */
.menu-item[data-section="1"]:hover {
    background-color: #FF4444; /* Red */
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.6), 0 0 40px rgba(255, 68, 68, 0.4);
}

.menu-item[data-section="2"]:hover {
    background-color: #FF8800; /* Orange */
    box-shadow: 0 0 20px rgba(255, 136, 0, 0.6), 0 0 40px rgba(255, 136, 0, 0.4);
}

.menu-item[data-section="3"]:hover {
    background-color: #FFDD00; /* Yellow */
    box-shadow: 0 0 20px rgba(255, 221, 0, 0.6), 0 0 40px rgba(255, 221, 0, 0.4);
}

.menu-item[data-section="4"]:hover {
    background-color: #44FF44; /* Green */
    box-shadow: 0 0 20px rgba(68, 255, 68, 0.6), 0 0 40px rgba(68, 255, 68, 0.4);
}

.menu-item[data-section="5"]:hover {
    background-color: #0088FF; /* Blue */
    box-shadow: 0 0 20px rgba(0, 136, 255, 0.6), 0 0 40px rgba(0, 136, 255, 0.4);
}

.menu-item[data-section="6"]:hover {
    background-color: #AA00FF; /* Purple */
    box-shadow: 0 0 20px rgba(170, 0, 255, 0.6), 0 0 40px rgba(170, 0, 255, 0.4);
}

/* Items with icons need border-radius restored on hover to show colored background */
.menu-item.has-icon:hover {
    border-radius: 50%;
}

/* Hide image and show label on hover for all items */
.menu-item:hover .menu-item-image {
    opacity: 0;
    filter: grayscale(100%);
}

.menu-item:hover .menu-item-label {
    opacity: 1;
    filter: grayscale(0%) contrast(1.2);
    color: #000; /* Black text for better contrast on bright colors */
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8); /* White shadow for readability */
    font-size: clamp(0.35rem, 1.2vw, 0.7rem); /* Smaller font size on hover */
}

/* Disabled placeholder sections - no hover effects, no click */
.menu-item-disabled {
    cursor: default !important;
    pointer-events: none;
    opacity: 0.5;
}

.menu-item-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.menu-item-disabled:hover .menu-item-image {
    opacity: 1 !important;
    filter: grayscale(100%) !important;
}

.menu-item-disabled:hover .menu-item-label {
    opacity: 0 !important;
}

.menu-item:active {
    transform: scale(1.05) rotate(-5deg);
}

.menu-item.ripple {
    animation: ripple 0.4s ease-out;
}

@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    100% {
        box-shadow: 0 0 0 30px rgba(255, 255, 255, 0);
    }
}

.circular-menu.loaded .menu-item {
    animation: fadeInRotate 0.5s ease-out forwards;
}

@keyframes fadeInRotate {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Notification banner */
.notification-banner-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 90%;
    max-width: 600px;
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 15px 15px 0 0;
    padding: clamp(0.75rem, 2vh, 1rem) clamp(2rem, 5vw, 3rem) clamp(0.75rem, 2vh, 1rem) clamp(1rem, 3vw, 1.5rem);
    margin-bottom: 0;
    z-index: 1000;
    transition: transform 0.25s ease-out;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    max-height: 50vh;
    overflow-y: auto;
}

/* When banner is visible, allow page to scroll */
body.banner-visible {
    overflow-y: auto;
}

body.banner-visible .content-overlay {
    min-height: 100vh;
    height: auto;
}

.notification-banner-container.visible {
    transform: translateX(-50%) translateY(0);
}

.notification-banner-container.clickable {
    cursor: pointer;
}

.notification-banner-content {
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.5;
}

.notification-banner-content a {
    color: #4a9eff;
    text-decoration: underline;
}

.notification-banner-content b {
    font-weight: 700;
}

.notification-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.notification-close:hover {
    opacity: 1;
}

/* Responsive breakpoints */
/* Mobile - smaller screens */
@media (max-width: 767px) {
    .main-header {
        padding: clamp(0.75rem, 2vh, 1rem) 0.5rem;
    }
    
    .welcome-text {
        font-size: clamp(1rem, 3vw, 1.5rem);
        margin-bottom: clamp(0.5rem, 1.5vh, 0.75rem);
    }
    
    .main-header h1 {
        font-size: clamp(1.75rem, 6vw, 3rem);
        line-height: 1.2;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .circular-menu {
        max-width: min(95vw, 95vh);
    }
    
    .menu-item {
        width: clamp(80px, 18vw, 120px);
        height: clamp(80px, 18vw, 120px);
    }
    
    .menu-item-label {
        font-size: clamp(0.6rem, 2.5vw, 1rem);
        padding: 0 3px;
        letter-spacing: 0.03em;
    }
}

/* Tablet */
@media (min-width: 768px) {
    .main-header {
        padding: clamp(0.75rem, 2vh, 1.5rem) 1rem;
    }

    .welcome-text {
        font-size: clamp(0.875rem, 2.5vw, 1.5rem);
    }

    .main-header h1 {
        font-size: clamp(1.5rem, 4vw, 2.75rem);
    }

    .circular-menu {
        max-width: min(700px, 65vh, 65vw);
    }

    .menu-item {
        width: clamp(50px, 7vw, 90px);
        height: clamp(50px, 7vw, 90px);
    }
    
    .menu-item-label {
        font-size: clamp(0.45rem, 1.3vw, 0.75rem);
    }

    .notification-banner-container {
        padding: clamp(1rem, 2.5vh, 1.25rem) clamp(2.5rem, 6vw, 3.5rem) clamp(1rem, 2.5vh, 1.25rem) clamp(1.5rem, 4vw, 2rem);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .content-overlay {
        padding: clamp(1rem, 2vh, 2rem);
    }

    .main-header {
        padding: clamp(1rem, 2.5vh, 2rem) 1rem;
    }

    .circular-menu {
        max-width: min(800px, 60vh, 60vw);
    }

    .menu-item {
        width: clamp(60px, 6vw, 100px);
        height: clamp(60px, 6vw, 100px);
    }
    
    .menu-item-label {
        font-size: clamp(0.5rem, 1.5vw, 0.875rem);
    }

    .menu-item:hover {
        transform: scale(1.2) rotate(8deg);
    }
    
    /* Enhanced glow for bright colors on desktop */
    .menu-item[data-section="1"]:hover {
        box-shadow: 0 0 25px rgba(255, 68, 68, 0.7), 0 0 50px rgba(255, 68, 68, 0.5);
    }
    
    .menu-item[data-section="2"]:hover {
        box-shadow: 0 0 25px rgba(255, 136, 0, 0.7), 0 0 50px rgba(255, 136, 0, 0.5);
    }
    
    .menu-item[data-section="3"]:hover {
        box-shadow: 0 0 25px rgba(255, 221, 0, 0.7), 0 0 50px rgba(255, 221, 0, 0.5);
    }
    
    .menu-item[data-section="4"]:hover {
        box-shadow: 0 0 25px rgba(68, 255, 68, 0.7), 0 0 50px rgba(68, 255, 68, 0.5);
    }
    
    .menu-item[data-section="5"]:hover {
        box-shadow: 0 0 25px rgba(0, 136, 255, 0.7), 0 0 50px rgba(0, 136, 255, 0.5);
    }
    
    .menu-item[data-section="6"]:hover {
        box-shadow: 0 0 25px rgba(170, 0, 255, 0.7), 0 0 50px rgba(170, 0, 255, 0.5);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.menu-item:focus {
    outline: 3px solid #4a9eff;
    outline-offset: 3px;
}

.notification-close:focus {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

/* ============================================
   Global Site Navigation Bar
   ============================================ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 16px;
    z-index: 9999;
    font-family: 'Bungee', sans-serif;
}

.site-nav-home {
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.site-nav-home:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.site-nav-home:focus {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

/* Adjust content to account for nav bar (only when nav bar exists) */
body:has(.site-nav) {
    padding-top: 36px;
}

/* Version display */
.version-display {
    position: fixed;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    z-index: 9999;
    pointer-events: none;
    letter-spacing: 0.05em;
    font-weight: 500;
}

