/* Import Hard Race font */
@font-face {
    font-family: 'Hard Race';
    src: url('../fonts/hard-race.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'Hard Race', 'Arial Black', Arial, sans-serif;
    background: #1a1a1a;
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Container for the main scene */
.space-kitchen-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Kitchen scene container */
.kitchen-scene {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main astronaut image */
.astronaut-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Navigation overlay */
.nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.nav-overlay * {
    pointer-events: auto;
}

/* Logo/Title link - positioned at top center */
.logo-link {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.6rem;
    font-weight: bold;
    color: #fff !important;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    font-family: 'Hard Race', 'Arial Black', Arial, sans-serif;
    z-index: 1001;
    display: block;
}

.logo-link:hover {
    color: #ff6b35 !important;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
}

/* Bottom overlay block */
.bottom-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: rgba(72, 50, 43, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Menu button - centered in bottom overlay */
.menu-button {
    font-size: 2rem;
    font-weight: bold;
    color: #fff !important;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    cursor: pointer;
    font-family: 'Hard Race', 'Arial Black', Arial, sans-serif;
    z-index: 1001;
    display: block;
}

.menu-button:hover {
    color: #ff6b35 !important;
    text-shadow: 0 0 40px rgba(255, 107, 53, 1);
    animation: menuPulse 2s infinite;
}

@keyframes menuPulse {
    0%, 100% { 
        text-shadow: 0 0 40px rgba(255, 107, 53, 1);
    }
    50% { 
        text-shadow: 0 0 60px rgba(255, 107, 53, 1), 0 0 80px rgba(255, 107, 53, 0.5);
    }
}


/* Floating animation for elements */
.floating {
    animation: float 6s ease-in-out infinite;
}

.floating-delayed {
    animation: float 6s ease-in-out infinite;
    animation-delay: -3s;
}

/* Ensure text elements also float */
.logo-link.floating {
    animation: float 6s ease-in-out infinite !important;
}

.menu-button.floating-delayed {
    animation: float 6s ease-in-out infinite !important;
    animation-delay: -3s !important;
}

/* Override any conflicting styles */
.nav-overlay .logo-link,
.nav-overlay .menu-button {
    opacity: 1 !important;
    visibility: visible !important;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
    }
    50% { 
        transform: translateY(-10px) rotate(1deg);
    }
}

/* Menu background overlay - shows original page content */
.menu-background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    z-index: 1;
    pointer-events: none;
}

/* Menu overlay that expands from center */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: menuExpand 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    transform-origin: center center;
}

@keyframes menuExpand {
    0% {
        transform: scale(0);
        opacity: 0;
        border-radius: 50%;
    }
    50% {
        opacity: 0.8;
        border-radius: 25%;
    }
    100% {
        transform: scale(1);
        opacity: 1;
        border-radius: 0%;
    }
}

/* Menu page styles */
.menu-page {
    min-height: 100vh;
    background: transparent;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.menu-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.menu-logo {
    display: block;
    margin-bottom: 80px;
    text-align: center;
    transition: all 0.3s ease;
}

.menu-logo:hover {
    transform: scale(1.05);
}

.logo-image {
    width: 96px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)) brightness(1);
    transition: all 0.3s ease;
}

.menu-logo:hover .logo-image {
    filter: drop-shadow(0 0 30px rgba(255, 107, 53, 0.8)) brightness(1.2) hue-rotate(15deg) saturate(1.5);
}

@keyframes titleGlow {
    from { 
        text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
    }
    to { 
        text-shadow: 0 0 50px rgba(255, 107, 53, 0.8), 0 0 70px rgba(255, 107, 53, 0.3);
    }
}

.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 50px;
    align-items: center;
}

.menu-item {
    background: transparent;
    border: none;
    padding: 0;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.menu-item:hover {
    transform: scale(1.1);
}

.menu-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #fff;
    font-family: 'Hard Race', 'Arial Black', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.menu-item:hover h3 {
    color: #ff6b35;
    text-shadow: 0 0 40px rgba(255, 107, 53, 1);
}

.menu-item p {
    display: none;
}

.menu-item i {
    display: none;
}

.back-link {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.back-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.5);
    background: linear-gradient(45deg, #ff8c42, #ff6b35);
}

/* Volume Control in Menu */
.volume-control {
    margin-top: 80px;
    text-align: center;
}

.volume-icon {
    color: #fff;
    cursor: pointer;
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    transition: all 0.3s ease;
}

.volume-icon:hover {
    color: #ff6b35;
    filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.8));
    transform: scale(1.2);
}

/* Menu item links */
.menu-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.menu-item a:hover {
    text-decoration: none;
    color: inherit;
}

/* Responsive design */
@media (max-width: 768px) {
    .logo-link {
        top: 30px;
        left: 30px;
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .menu-button {
        bottom: 30px;
        left: 30px;
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .menu-title {
        font-size: 2.5rem;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-link {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .menu-button {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .menu-title {
        font-size: 2rem;
    }
}

/* Loading animation */
.loading {
    opacity: 1 !important;
    animation: fadeIn 1s ease-in forwards;
}

/* Terminal cursor blink animation */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Particle effect background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: particle-float 20s infinite linear;
}

.particle:nth-child(odd) {
    animation-delay: -10s;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* SPA Page Content Styles */
.page-content {
    position: relative;
    width: 100%;
    height: 100vh;
}

.content-page {
    min-height: 100vh;
    background: rgba(26, 26, 26, 0.95);
    padding: 50px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1001;
}

.content-page .back-button {
    position: absolute;
    top: 30px;
    left: 30px;
    color: #ff6b35;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 25px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.content-page .back-button:hover {
    background: rgba(255, 107, 53, 0.2);
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.content-page .back-button i {
    width: 18px;
    height: 18px;
}

.content-body {
    max-width: 800px;
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.content-body h1 {
    font-size: 3rem;
    margin-bottom: 30px;
    color: #ff6b35;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    font-family: 'Hard Race', Arial, sans-serif;
}

.content-body p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #e0e0e0;
    margin-bottom: 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Disabled link styles */
.disabled-link {
    cursor: not-allowed !important;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.disabled-link:hover {
    opacity: 0.5;
    transform: scale(0.95);
}

.disabled-menu-button {
    cursor: not-allowed !important;
    opacity: 0.8;
}

.disabled-menu-button:hover {
    opacity: 0.6;
}

/* Global floating music control - Always visible across all pages */
.global-music-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999; /* Very high z-index to stay above all content */
    background: rgba(255, 107, 53, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.2);
    transition: all 0.3s ease;
}

.global-music-control:hover {
    background: rgba(255, 107, 53, 0.2);
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.4);
}

.global-music-control .music-icon {
    font-size: 1.2rem;
    color: #ff6b35;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Prevent text selection on mobile */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Better touch response */
    -webkit-tap-highlight-color: rgba(255, 107, 53, 0.3);
    -webkit-touch-callout: none;
}

/* Active state for mobile feedback */
.global-music-control .music-icon:active {
    transform: scale(0.95);
}

/* Breathing animation for the floating button */
@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.global-music-control {
    animation: breathe 4s ease-in-out infinite;
}

.global-music-control:hover {
    animation: none; /* Stop breathing when hovered */
}

@media (max-width: 768px) {
    .global-music-control {
        bottom: 20px;
        right: 20px;
        padding: 18px;
    }
    
    .global-music-control .music-icon {
        font-size: 1.3rem;
        /* Reasonable touch target on mobile */
        width: 28px;
        height: 28px;
    }
}

/* Mobile responsiveness for content pages */
@media (max-width: 768px) {
    .content-page {
        padding: 30px 20px;
    }
    
    .content-page .back-button {
        top: 20px;
        left: 20px;
        font-size: 1rem;
        padding: 8px 12px;
    }
    
    .content-body h1 {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
    
    .content-body p {
        font-size: 1.1rem;
    }
}
