/* Kiosk Space Theme - Cenario Espacial Animado */
/* Inspirado em Subway Surfers / Jogos Infantis */

:root {
    --space-primary: #6f42c1;
    --space-secondary: #00d4ff;
    --space-accent: #ff6b6b;
    --space-yellow: #ffd93d;
    --space-pink: #ff9ff3;
    --space-purple: #a855f7;
}

/* Container do Cenario Espacial */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

/* Camada de Estrelas */
.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.stars-layer::before,
.stars-layer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #ffffff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #ffffff, transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 160px 120px, #ffffff, transparent),
        radial-gradient(2px 2px at 200px 50px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 250px 160px, #ffffff, transparent),
        radial-gradient(2px 2px at 300px 90px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 350px 200px, #ffffff, transparent),
        radial-gradient(2px 2px at 400px 130px, rgba(255,255,255,0.8), transparent);
    background-size: 500px 500px;
    animation: stars-twinkle 4s ease-in-out infinite;
}

.stars-layer::after {
    background-size: 300px 300px;
    animation: stars-twinkle 6s ease-in-out infinite reverse;
    opacity: 0.5;
}

@keyframes stars-twinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Estrelas Cadentes */
.shooting-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #ffffff, transparent);
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255,255,255,0.5);
    animation: shooting 3s ease-in-out infinite;
}

.shooting-star::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), transparent);
    transform: translateX(-100%);
    border-radius: 50%;
}

.shooting-star:nth-child(1) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.shooting-star:nth-child(2) {
    top: 30%;
    left: 60%;
    animation-delay: 2s;
}

.shooting-star:nth-child(3) {
    top: 50%;
    left: 40%;
    animation-delay: 4s;
}

@keyframes shooting {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translateX(300px) translateY(300px);
        opacity: 0;
    }
}

/* Foguetes Animados */
.rocket {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
    animation: float-rocket 8s ease-in-out infinite;
}

.rocket-1 {
    top: 15%;
    right: 10%;
    animation-delay: 0s;
}

.rocket-2 {
    top: 60%;
    left: 5%;
    animation-delay: 3s;
    transform: scaleX(-1);
}

.rocket-3 {
    top: 80%;
    right: 20%;
    animation-delay: 6s;
    width: 40px;
    height: 40px;
}

@keyframes float-rocket {
    0%, 100% {
        transform: translateY(0) rotate(-15deg);
    }
    25% {
        transform: translateY(-30px) rotate(-10deg);
    }
    50% {
        transform: translateY(-10px) rotate(-20deg);
    }
    75% {
        transform: translateY(-40px) rotate(-12deg);
    }
}

.rocket-2 {
    animation-name: float-rocket-reverse;
}

@keyframes float-rocket-reverse {
    0%, 100% {
        transform: scaleX(-1) translateY(0) rotate(15deg);
    }
    25% {
        transform: scaleX(-1) translateY(-20px) rotate(10deg);
    }
    50% {
        transform: scaleX(-1) translateY(-35px) rotate(20deg);
    }
    75% {
        transform: scaleX(-1) translateY(-15px) rotate(12deg);
    }
}

/* Planetas Decorativos */
.planet {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.planet-1 {
    width: 120px;
    height: 120px;
    top: 5%;
    left: -30px;
    background: radial-gradient(circle at 30% 30%, #ff9ff3, #f368e0, #be2edd);
    box-shadow: 
        inset -20px -20px 40px rgba(0,0,0,0.3),
        0 0 60px rgba(243, 104, 224, 0.4);
    animation: planet-rotate 20s linear infinite;
}

.planet-2 {
    width: 80px;
    height: 80px;
    bottom: 10%;
    right: -20px;
    background: radial-gradient(circle at 30% 30%, #ffd93d, #ff9f43, #ee5a24);
    box-shadow: 
        inset -15px -15px 30px rgba(0,0,0,0.3),
        0 0 40px rgba(255, 159, 67, 0.4);
    animation: planet-rotate 15s linear infinite reverse;
}

.planet-3 {
    width: 50px;
    height: 50px;
    top: 40%;
    right: 5%;
    background: radial-gradient(circle at 30% 30%, #00d4ff, #0984e3, #0652dd);
    box-shadow: 
        inset -10px -10px 20px rgba(0,0,0,0.3),
        0 0 30px rgba(0, 212, 255, 0.4);
    animation: planet-rotate 12s linear infinite;
}

@keyframes planet-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Anéis de Saturno para planeta 1 */
.planet-1::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -20px;
    width: 160px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translateY(-50%) rotateX(70deg);
}

/* Nebulosas */
.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    pointer-events: none;
    animation: nebula-pulse 10s ease-in-out infinite;
}

.nebula-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, var(--space-purple), transparent);
}

.nebula-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
    background: radial-gradient(circle, var(--space-secondary), transparent);
    animation-delay: 5s;
}

.nebula-3 {
    width: 250px;
    height: 250px;
    top: 50%;
    left: 30%;
    background: radial-gradient(circle, var(--space-pink), transparent);
    animation-delay: 2s;
}

@keyframes nebula-pulse {
    0%, 100% { 
        opacity: 0.2;
        transform: scale(1);
    }
    50% { 
        opacity: 0.4;
        transform: scale(1.1);
    }
}

/* Particulas Brilhantes */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: particle-float 6s ease-in-out infinite;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 40%; left: 30%; animation-delay: 1s; width: 4px; height: 4px; }
.particle:nth-child(3) { top: 60%; left: 50%; animation-delay: 2s; }
.particle:nth-child(4) { top: 80%; left: 70%; animation-delay: 3s; width: 4px; height: 4px; }
.particle:nth-child(5) { top: 30%; left: 80%; animation-delay: 4s; }
.particle:nth-child(6) { top: 70%; left: 20%; animation-delay: 5s; width: 3px; height: 3px; }
.particle:nth-child(7) { top: 10%; left: 60%; animation-delay: 1.5s; }
.particle:nth-child(8) { top: 50%; left: 90%; animation-delay: 2.5s; width: 4px; height: 4px; }
.particle:nth-child(9) { top: 90%; left: 40%; animation-delay: 3.5s; }
.particle:nth-child(10) { top: 25%; left: 75%; animation-delay: 4.5s; width: 3px; height: 3px; }

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) scale(1.5);
        opacity: 1;
    }
}

/* Controles de Audio */
.audio-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.audio-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--space-primary);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.4);
}

.audio-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.6);
}

.audio-btn.playing {
    animation: pulse-glow 1s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(111, 66, 193, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(111, 66, 193, 0.8);
    }
}

.volume-slider {
    width: 80px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Responsividade */
@media (max-width: 768px) {
    .planet-1 { width: 80px; height: 80px; }
    .planet-2 { width: 60px; height: 60px; }
    .planet-3 { width: 40px; height: 40px; }
    .rocket { width: 40px; height: 40px; }
    .rocket-3 { width: 30px; height: 30px; }
    .nebula { filter: blur(40px); }
    .audio-control { padding: 8px 12px; }
    .audio-btn { width: 40px; height: 40px; font-size: 1.2rem; }
}
