/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --boom-purple: #8A2BE2;
    --boom-pink: #FF1493;
    --boom-orange: #FF8C00;
    --boom-yellow: #FFD700;
    --boom-green: #32CD32;
    --boom-blue: #00BFFF;
    --boom-red: #FF4500;
    --night-sky: #0B0B2F;
    --dark-purple: #1A0D1F;
    --gradient-explosion: linear-gradient(135deg, #FF1493 0%, #8A2BE2 25%, #00BFFF 50%, #32CD32 75%, #FFD700 100%);
    --gradient-night: linear-gradient(135deg, #0B0B2F 0%, #1A0D1F 100%);
    --shadow-colorful: 0 0 30px rgba(255, 20, 147, 0.6);
    --shadow-deep: 0 20px 40px rgba(0, 0, 0, 0.8);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gradient-night);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Fireworks Background */
.FireworksBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-night);
    z-index: -1;
    overflow: hidden;
}

.Firework {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: explode 3s ease-out infinite;
}

.Firework.color1 { background: var(--boom-pink); }
.Firework.color2 { background: var(--boom-orange); }
.Firework.color3 { background: var(--boom-yellow); }
.Firework.color4 { background: var(--boom-green); }
.Firework.color5 { background: var(--boom-blue); }
.Firework.color6 { background: var(--boom-purple); }

@keyframes explode {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
        box-shadow: 0 0 0 0 currentColor;
    }
    20% {
        opacity: 1;
        transform: scale(1) rotate(72deg);
        box-shadow:
                0 0 20px 5px currentColor,
                20px 0 10px 2px currentColor,
                -20px 0 10px 2px currentColor,
                0 20px 10px 2px currentColor,
                0 -20px 10px 2px currentColor;
    }
    100% {
        opacity: 0;
        transform: scale(2) rotate(360deg);
        box-shadow:
                0 0 50px 20px transparent,
                40px 0 30px 10px transparent,
                -40px 0 30px 10px transparent,
                0 40px 30px 10px transparent,
                0 -40px 30px 10px transparent;
    }
}

.ColorTrail {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
            radial-gradient(circle at 20% 80%, rgba(255, 20, 147, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 50% 50%, rgba(255, 140, 0, 0.05) 0%, transparent 50%);
    animation: colorShift 10s ease-in-out infinite;
}

@keyframes colorShift {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Header */
.GameHeader {
    position: sticky;
    top: 0;
    background: rgba(11, 11, 47, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 3px solid var(--boom-pink);
    padding: 16px 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(255, 20, 147, 0.4);
}

.HeaderContent {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.BackButton {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--boom-pink);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-bounce);
    padding: 10px 20px;
    border: 2px solid var(--boom-pink);
    border-radius: 25px;
    background: transparent;
}

.BackButton:hover {
    background: var(--boom-pink);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-colorful);
}

.GameLogo {
    font-family: 'Fredoka One', cursive;
    font-size: 28px;
    background: var(--gradient-explosion);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px var(--boom-pink));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 20px var(--boom-purple));
        transform: scale(1.05);
    }
}

/* Hero Section */
.GameHero {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
}

.HeroContainer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.GameTitle {
    font-family: 'Fredoka One', cursive;
    font-size: 72px;
    background: var(--gradient-explosion);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    letter-spacing: 3px;
    animation: titleBounce 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

@keyframes titleBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(1deg); }
    75% { transform: translateY(-5px) rotate(-1deg); }
}

.GameSubtitle {
    font-size: 28px;
    color: var(--boom-yellow);
    margin-bottom: 40px;
    font-weight: 600;
    text-shadow: 0 0 10px var(--boom-yellow);
    animation: subtitlePulse 2s ease-in-out infinite alternate;
}

@keyframes subtitlePulse {
    from { opacity: 0.8; }
    to { opacity: 1; text-shadow: 0 0 20px var(--boom-yellow); }
}

.GameDescription {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.AgeWarning {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--boom-red);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(255, 69, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: warningBlink 3s ease-in-out infinite;
}

@keyframes warningBlink {
    0%, 100% { box-shadow: 0 8px 25px rgba(255, 69, 0, 0.5); }
    50% { box-shadow: 0 8px 35px rgba(255, 69, 0, 0.8); }
}

.WarningIcon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

/* Game Container */
.GameContainer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.GameFrame {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 25px;
    padding: 30px;
    box-shadow: var(--shadow-deep);
    border: 4px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
}

.GameFrame::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: var(--gradient-explosion);
    border-radius: 25px;
    z-index: -1;
    animation: borderRainbow 3s linear infinite;
}

@keyframes borderRainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.GameIframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 15px;
    background: #000;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
}

.LoadingOverlay {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    bottom: 30px;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    transition: opacity 0.5s ease;
}

.LoadingSpinner {
    width: 60px;
    height: 60px;
    border: 4px solid transparent;
    border-left: 4px solid var(--boom-pink);
    border-right: 4px solid var(--boom-blue);
    border-radius: 50%;
    animation: spinRainbow 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spinRainbow {
    0% {
        transform: rotate(0deg);
        border-left-color: var(--boom-pink);
        border-right-color: var(--boom-blue);
    }
    25% {
        border-left-color: var(--boom-yellow);
        border-right-color: var(--boom-green);
    }
    50% {
        transform: rotate(180deg);
        border-left-color: var(--boom-orange);
        border-right-color: var(--boom-purple);
    }
    75% {
        border-left-color: var(--boom-green);
        border-right-color: var(--boom-pink);
    }
    100% {
        transform: rotate(360deg);
        border-left-color: var(--boom-pink);
        border-right-color: var(--boom-blue);
    }
}

.LoadingText {
    background: var(--gradient-explosion);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Fredoka One', cursive;
}

/* Game Controls */
.GameControls {
    margin-top: 40px;
    text-align: center;
}

.ControlButton {
    background: var(--gradient-explosion);
    color: white;
    border: none;
    padding: 16px 36px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    margin: 0 8px;
    transition: var(--transition-bounce);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Fredoka One', cursive;
    position: relative;
    overflow: hidden;
}

.ControlButton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.ControlButton:hover::before {
    left: 100%;
}

.ControlButton:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 30px rgba(255, 20, 147, 0.6);
}

.ControlButton.Secondary {
    background: transparent;
    border: 3px solid var(--boom-purple);
    color: var(--boom-purple);
}

.ControlButton.Secondary:hover {
    background: var(--boom-purple);
    color: white;
    border-color: var(--boom-purple);
}

/* Game Info */
.GameInfo {
    margin-top: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.InfoCard {
    background: rgba(26, 13, 31, 0.8);
    border-radius: 20px;
    padding: 32px;
    border: 2px solid var(--boom-pink);
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.InfoCard::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
            var(--boom-pink) 0deg,
            var(--boom-purple) 60deg,
            var(--boom-blue) 120deg,
            var(--boom-green) 180deg,
            var(--boom-yellow) 240deg,
            var(--boom-orange) 300deg,
            var(--boom-pink) 360deg
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: rotate 4s linear infinite;
    z-index: -1;
}

.InfoCard:hover::after {
    opacity: 0.1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.InfoCard:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 20, 147, 0.4);
    border-color: var(--boom-yellow);
}

.InfoCard h3 {
    font-family: 'Fredoka One', cursive;
    background: var(--gradient-explosion);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 22px;
    margin-bottom: 16px;
}

.InfoCard p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Features */
.GameFeatures {
    margin-top: 40px;
}

.FeaturesGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.FeatureItem {
    background: rgba(11, 11, 47, 0.6);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    border: 2px solid var(--boom-blue);
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.FeatureItem::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-explosion);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.FeatureItem:hover::before {
    opacity: 0.1;
}

.FeatureItem:hover {
    transform: translateY(-8px) rotate(2deg);
    border-color: var(--boom-pink);
    box-shadow: 0 15px 30px rgba(138, 43, 226, 0.4);
}

.FeatureIcon {
    width: 56px;
    height: 56px;
    background: var(--gradient-explosion);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

.FeatureIcon img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

.FeatureTitle {
    background: var(--gradient-explosion);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 12px;
    font-family: 'Fredoka One', cursive;
}

.FeatureText {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .HeaderContent {
        flex-direction: column;
        gap: 16px;
    }

    .GameTitle {
        font-size: 48px;
    }

    .GameSubtitle {
        font-size: 22px;
    }

    .GameInfo {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .GameFrame {
        padding: 20px;
    }

    .GameIframe {
        height: 400px;
    }

    .FeaturesGrid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .GameTitle {
        font-size: 36px;
    }

    .GameSubtitle {
        font-size: 18px;
    }

    .GameFrame {
        padding: 16px;
    }

    .GameIframe {
        height: 300px;
    }

    .InfoCard {
        padding: 24px;
    }
}

/* Explosion Particle Effect */
.ExplosionParticle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    animation: particleExplode 1s ease-out forwards;
}

@keyframes particleExplode {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0) translate(var(--random-x, 50px), var(--random-y, 50px));
    }
}

/* Special Button Effects */
.ExplodeEffect {
    animation: buttonExplode 0.6s ease-out;
}

@keyframes buttonExplode {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); box-shadow: 0 0 30px var(--boom-pink); }
    100% { transform: scale(1); }
}