/* Import fun font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Bubblegum+Sans&display=swap');

/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Floating Stars Animation */
.floating-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* Decorative Elements */
.popcorn-decoration {
    position: fixed;
    font-size: 5rem;
    opacity: 0.3;
    z-index: 1;
    animation: bounce 3s ease-in-out infinite;
}

.popcorn-decoration.left {
    left: 5%;
    top: 20%;
}

.popcorn-decoration.right {
    right: 5%;
    top: 60%;
    animation-delay: 1.5s;
}

.ticket-decoration {
    position: fixed;
    top: 10%;
    right: 15%;
    font-size: 4rem;
    opacity: 0.4;
    z-index: 1;
    animation: spin-float 8s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
}

@keyframes spin-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-40px) rotate(360deg);
    }
}

/* Main Container */
.container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 900px;
    text-align: center;
    padding: 40px;
}

/* Cinema Sign */
.cinema-sign {
    background: linear-gradient(145deg, #FFD700, #FFA500);
    padding: 30px 50px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                inset 0 -5px 20px rgba(0, 0, 0, 0.2),
                0 0 40px rgba(255, 215, 0, 0.6);
    margin-bottom: 40px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                    inset 0 -5px 20px rgba(0, 0, 0, 0.2),
                    0 0 40px rgba(255, 215, 0, 0.6);
    }
    50% {
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                    inset 0 -5px 20px rgba(0, 0, 0, 0.2),
                    0 0 60px rgba(255, 215, 0, 0.9);
    }
}

.cinema-title {
    font-family: 'Bubblegum Sans', cursive;
    font-size: 3.5rem;
    color: #2d1b69;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

/* Welcome Box */
.welcome-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 60px 50px;
    border-radius: 40px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.instruction {
    font-size: 2rem;
    color: #5a4a8f;
    margin-bottom: 40px;
    font-weight: 600;
}

/* Math Problem Display */
.math-problem {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 50px 0;
    padding: 40px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(245, 87, 108, 0.4);
}

.math-problem .number {
    font-size: 5rem;
    font-weight: 700;
    color: white;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
    animation: pop 0.5s ease-in-out;
}

.math-problem .operator {
    font-size: 4rem;
    color: #FFD700;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.math-problem .equals {
    font-size: 4rem;
    color: white;
    font-weight: 700;
}

.math-problem .question {
    font-size: 5rem;
    color: #FFD700;
    font-weight: 700;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Input Section */
.input-section {
    margin: 40px 0;
}

.answer-input {
    width: 100%;
    max-width: 400px;
    padding: 25px 35px;
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    border: 5px solid #667eea;
    border-radius: 25px;
    outline: none;
    font-family: 'Fredoka', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.answer-input:focus {
    border-color: #f5576c;
    box-shadow: 0 15px 40px rgba(245, 87, 108, 0.5);
    transform: scale(1.05);
}

/* Check Button */
.check-button {
    padding: 25px 60px;
    font-size: 2.2rem;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    color: white;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 15px 40px rgba(56, 239, 125, 0.4);
    transition: all 0.3s ease;
    margin-top: 20px;
}

.check-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(56, 239, 125, 0.6);
}

.check-button:active {
    transform: translateY(-2px) scale(1.02);
}

/* Message */
.message {
    margin-top: 30px;
    font-size: 2rem;
    font-weight: 600;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message.error {
    color: #f5576c;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#confetti-canvas.active {
    opacity: 1;
}

/* Success Overlay */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.success-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.success-message {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 60px 80px;
    border-radius: 40px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: zoom-in 0.6s ease;
}

.success-message h2 {
    font-size: 4rem;
    color: white;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.4);
    font-family: 'Bubblegum Sans', cursive;
}

@keyframes zoom-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================== MOVIE PAGE STYLES ==================== */

.movie-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.movie-container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    text-align: center;
}

.movie-header {
    margin-bottom: 40px;
}

.movie-title {
    font-family: 'Bubblegum Sans', cursive;
    font-size: 4rem;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                 3px 3px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 15px;
    animation: title-glow 2s ease-in-out infinite;
}

@keyframes title-glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                     3px 3px 10px rgba(0, 0, 0, 0.5);
    }
    50% {
        text-shadow: 0 0 40px rgba(255, 215, 0, 1),
                     3px 3px 10px rgba(0, 0, 0, 0.5);
    }
}

.movie-subtitle {
    font-size: 2rem;
    color: #f093fb;
    font-weight: 600;
}

.video-wrapper {
    background: linear-gradient(145deg, #2d1b69, #5a4a8f);
    padding: 40px;
    border-radius: 40px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
                inset 0 -5px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

video {
    width: 100%;
    max-width: 1200px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    outline: none;
}

.back-button {
    padding: 15px 40px;
    font-size: 1.3rem;
    font-weight: 600;
    font-family: 'Fredoka', sans-serif;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cinema-title {
        font-size: 2rem;
    }
    
    .instruction {
        font-size: 1.5rem;
    }
    
    .math-problem .number {
        font-size: 3rem;
    }
    
    .math-problem .operator,
    .math-problem .equals {
        font-size: 2.5rem;
    }
    
    .answer-input {
        font-size: 2rem;
    }
    
    .check-button {
        font-size: 1.5rem;
        padding: 20px 40px;
    }
    
    .movie-title {
        font-size: 2.5rem;
    }
}
