:root {
    --bg-night: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --neon-pink: #ff00ff;
    --neon-blue: #00ffff;
    --neon-green: #39ff14;
    --neon-yellow: #ffff00;
    --neon-orange: #ff9f1c;
    --neon-purple: #9d4edd;
    
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    
    --card-glow: var(--neon-blue);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fredoka', 'Quicksand', sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

body {
    min-height: 100vh;
    background: var(--bg-night);
    color: white;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Background animated stars */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.bg-star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: pulseStar var(--duration) infinite alternate ease-in-out;
}

@keyframes pulseStar {
    0% { opacity: 0.2; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}

/* Light beams */
.light-beam {
    position: fixed;
    top: -50%;
    width: 300px;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 1;
    transform: rotate(-30deg);
    pointer-events: none;
}
.beam-left { left: -10%; animation: swingBeam 15s infinite alternate ease-in-out; }
.beam-right { right: -10%; animation: swingBeam 20s infinite alternate ease-in-out; background: radial-gradient(circle, rgba(255, 0, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%); }

@keyframes swingBeam {
    0% { transform: rotate(-35deg) translateX(-50px); }
    100% { transform: rotate(-25deg) translateX(50px); }
}

/* Header */
header {
    width: 100%;
    max-width: 1200px;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.back-btn:hover {
    transform: scale(1.1) translateY(-3px);
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px var(--neon-pink);
}

.app-logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    letter-spacing: 2px;
    text-align: center;
}

.sparkle {
    display: inline-block;
    animation: bounceSparkle 1.5s infinite alternate;
}
.sparkle:nth-child(2) { animation-delay: 0.75s; }

@keyframes bounceSparkle {
    0% { transform: scale(1); }
    100% { transform: scale(1.3) rotate(15deg); }
}

.sound-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sound-btn:hover {
    transform: scale(1.1);
    border-color: var(--neon-yellow);
    box-shadow: 0 0 15px var(--neon-yellow);
}

/* Presentation Main Container */
.presentation-container {
    flex: 1;
    width: 100%;
    max-width: 800px;
    padding: 0 1.5rem 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    gap: 1.5rem;
}

/* Progress wrapper */
.progress-wrapper {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.progress-text {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    color: #e0e0e0;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 5%;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink));
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--neon-blue);
}

.progress-dots {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-top: 4px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: var(--neon-yellow);
    box-shadow: 0 0 8px var(--neon-yellow);
    transform: scale(1.4);
}

.progress-dot.completed {
    background: var(--neon-green);
}

/* Slide Card */
.slide-card {
    width: 100%;
    background: var(--glass-bg);
    border: 3px solid var(--glass-border);
    border-radius: 40px;
    backdrop-filter: blur(25px);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255,255,255,0.05);
    border-color: var(--card-glow);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3), 0 0 20px var(--card-glow);
    transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: cardEnter 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cardEnter {
    0% { opacity: 0; transform: translateY(40px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.slide-card.exit-left {
    transform: translateX(-150vw) rotate(-10deg);
    opacity: 0;
}
.slide-card.exit-right {
    transform: translateX(150vw) rotate(10deg);
    opacity: 0;
}
.slide-card.enter-left {
    animation: enterLeft 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.slide-card.enter-right {
    animation: enterRight 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes enterLeft {
    0% { transform: translateX(-100vw) rotate(-10deg); opacity: 0; }
    100% { transform: translateX(0) rotate(0deg); opacity: 1; }
}

@keyframes enterRight {
    0% { transform: translateX(100vw) rotate(10deg); opacity: 0; }
    100% { transform: translateX(0) rotate(0deg); opacity: 1; }
}

/* Visual Frame */
.visual-frame {
    width: 160px;
    height: 160px;
    border-radius: 35px;
    background: rgba(255,255,255,0.05);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: floatFrame 4s infinite ease-in-out;
    border-color: var(--card-glow);
}

@keyframes floatFrame {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(3deg); }
}

.emoji-display {
    font-size: 6.5rem;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    transition: transform 0.3s ease;
}

.visual-frame:hover .emoji-display {
    transform: scale(1.15) rotate(-5deg);
}

/* Content Frame */
.content-frame {
    text-align: center;
    width: 100%;
    margin-bottom: 2rem;
}

.slide-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.slide-desc {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.5;
    color: #f0f0f0;
    margin: 0 auto 1.5rem auto;
    max-width: 600px;
}

/* Speak Button */
.speak-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #000;
    font-weight: 700;
    font-size: 1.2rem;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(56, 239, 125, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.speak-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 239, 125, 0.6);
}

.speak-btn:active {
    transform: scale(0.95);
}

.speak-icon {
    font-size: 1.4rem;
    animation: speakPulse 1s infinite alternate;
}

@keyframes speakPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

/* Talking bubble for discussion */
.bubble-chat {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 25px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.mascot-avatar {
    font-size: 3rem;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    animation: floatMascot 3s infinite ease-in-out;
}

@keyframes floatMascot {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.bubble-content {
    flex: 1;
    text-align: left;
}

.bubble-title {
    font-size: 1.1rem;
    color: var(--neon-yellow);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bubble-text {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: #e2e2e2;
    line-height: 1.4;
}

/* Navigation buttons */
.navigation-controls {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 1rem;
}

.nav-btn {
    flex: 1;
    height: 75px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.prev-btn {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    color: white;
}

.prev-btn:hover:not(:disabled) {
    transform: translateY(-5px);
    border-color: var(--neon-pink);
    box-shadow: 0 0 25px rgba(255, 0, 255, 0.3);
}

.prev-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.next-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.next-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.5);
}

.nav-btn:active {
    transform: scale(0.96) translateY(2px);
}

/* Celebration Overlay */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 12, 41, 0.95);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.celebration-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.celebration-card {
    max-width: 500px;
    background: var(--glass-bg);
    border: 3px solid var(--neon-yellow);
    border-radius: 40px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 0 50px var(--neon-yellow);
    transform: scale(0.7);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.celebration-overlay.active .celebration-card {
    transform: scale(1);
}

.congrats-icon {
    font-size: 7rem;
    margin-bottom: 1.5rem;
    animation: winBounce 1s infinite alternate;
}

@keyframes winBounce {
    0% { transform: scale(1) translateY(0); }
    100% { transform: scale(1.2) translateY(-15px); }
}

.celebration-card h2 {
    font-size: 2.2rem;
    color: var(--neon-yellow);
    margin-bottom: 1rem;
}

.celebration-card p {
    font-size: 1.3rem;
    color: #e0e0e0;
    margin-bottom: 2rem;
    font-family: 'Quicksand', sans-serif;
}

.restart-btn {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border: none;
    color: white;
    font-weight: 700;
    font-size: 1.4rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 255, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.restart-btn:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 255, 255, 0.6);
}

/* Responsiveness */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    .app-logo {
        font-size: 1.4rem;
    }
    
    .presentation-container {
        padding-bottom: 1.5rem;
    }
    
    .slide-card {
        padding: 1.5rem;
        border-radius: 30px;
    }
    
    .visual-frame {
        width: 120px;
        height: 120px;
        margin-bottom: 1.2rem;
    }
    
    .emoji-display {
        font-size: 4.8rem;
    }
    
    .slide-title {
        font-size: 2rem;
    }
    
    .slide-desc {
        font-size: 1.15rem;
    }
    
    .bubble-chat {
        padding: 1rem;
        gap: 0.8rem;
    }
    
    .mascot-avatar {
        font-size: 2.2rem;
        width: 50px;
        height: 50px;
    }
    
    .bubble-title {
        font-size: 0.95rem;
    }
    
    .bubble-text {
        font-size: 0.95rem;
    }
    
    .nav-btn {
        height: 60px;
        font-size: 1.2rem;
        border-radius: 20px;
    }
}
