* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: #090714;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 182, 217, .45), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(179, 136, 255, .45), transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(255, 105, 180, .35), transparent 40%);
    animation: auroraFlow 12s ease-in-out infinite;
}

@keyframes auroraFlow {
    0% {transform: scale(1);}
    50% {transform: scale(1.12);}
    100% {transform: scale(1);}
}

.landing-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.game-title {
    font-size: clamp(2.3rem, 5vw, 4.5rem);
    font-weight: 800;
    text-align: center;
    color: #fff;
    margin-bottom: 15px;
    text-shadow:
        0 0 10px rgba(255, 105, 180, .8),
        0 0 20px rgba(255, 105, 180, .7),
        0 0 35px rgba(255, 105, 180, .5);
    animation: titlePulse 2.5s ease-in-out infinite;
}

@keyframes titlePulse {
    0%,
    100% {transform: scale(1);}
    50% {transform: scale(1.02);}
}

.subtitle {
    font-size: 20px;
    color: #f3f3f3;
    margin-bottom: 40px;
    text-align: center;
    opacity: .9;
}

@keyframes titleIntro {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-size: 20px;
    color: #f3f3f3;
    margin-bottom: 40px;
    text-align: center;
}

.mode-wrapper {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.mode-card {
    background: rgba(255, 255, 255, .10);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 24px;
    padding: 24px;
    cursor: pointer;
    transition: .3s;
    overflow: hidden;
}
.mode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(255, 182, 217, .25);
}
.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
}
.card-icon {
    font-size: 34px;
}
.card-header h2 {
    font-size: 24px;
    color: #fff;
}
.card-description {
    margin-top: 12px;
    font-size: 15px;
    color: #e7e7e7;
}

.difficulty-box {
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: max-height .4s ease, margin-top .4s ease;
}
.mode-card.active .difficulty-box {
    max-height: 350px;
    margin-top: 20px;
}
.difficulty-btn {
    border: none;
    border-radius: 16px;
    padding: 16px;
    text-align: left;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s;
}
.difficulty-btn:hover {
    transform: scale(1.02);
}
.difficulty-btn small {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    font-weight: 400;
}

.easy {
    background: #d4ffe8;
    color: #111;
}
.medium {
    background: #fff0b3;
    color: #111;
}
.hard {
    background: #ffd4d4;
    color: #111;
}

.footer {
    width: 100%;
    padding: 25px;
    text-align: center;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 16px;
    line-height: 1.8;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

@media(max-width:768px) {
    .landing-container {
        padding: 30px 15px;
    }
    .game-title {
        font-size: 2rem;
    }
    .subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .mode-card {
        padding: 20px;
    }
    .card-header h2 {
        font-size: 20px;
    }
    .card-icon {
        font-size: 28px;
    }
    .difficulty-btn {
        font-size: 16px;
        padding: 14px;
    }
    .footer {
        font-size: 14px;
        padding: 20px;
    }
}

/* INTRO SYSTEM V2 */
.hidden-ui {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.show-ui {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: .7s ease;
}

/* INTRO OVERLAY */
#introScreen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}
#introCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* LOGO REVEAL */
#realHeading {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%)scale(.65);
    filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    text-shadow:
        0 0 12px rgba(255, 105, 180, .7),
        0 0 25px rgba(179, 136, 255, .5);
}
#realHeading.show {
    opacity: 1;
    transform:translate(-50%, -50%) scale(1);
    filter: blur(0);
    transition:
        opacity .9s ease,
        transform .9s ease,
        filter .9s ease;
}

#realHeading.glow {
    animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoGlow {
    0%,
    100% {
        text-shadow:
            0 0 15px rgba(255, 105, 180, .8),
            0 0 30px rgba(255, 105, 180, .4);
    }
    50% {
        text-shadow:
            0 0 30px rgba(255, 105, 180, 1),
            0 0 60px rgba(255, 105, 180, .8);
    }
}

/* START POPUP */
#startPopup {
    position: absolute;
    left: 50%;
    top: 58%;
    transform: translate(-50%, -50%) scale(.75);
    opacity: 0;
    pointer-events: none;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 24px;
    padding: 28px;
    min-width: 280px;
    text-align: center;
    transition:
        opacity .5s ease,
        transform .5s ease;
}

#startPopup.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}
#startPopup h2 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 20px;
}
#startBattleBtn {
    border: none;
    outline: none;
    cursor: pointer;
    padding: 15px 28px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 18px;
    background:
        linear-gradient(135deg,
            #ff5ea8,
            #ff9f68);
    color: #fff;
    transition: .3s;
}

@keyframes battleFloat {
    0%,
    100% {transform: translateY(0);}
    50% {transform: translateY(-6px);}
}

#startBattleBtn {
    animation:battleFloat 2.5s ease-in-out infinite;
}
#startBattleBtn:hover {
    transform: translateY(-2px);
    box-shadow:0 0 20px rgba(255, 105, 180, .5);
}
#startBattleBtn:active {
    transform: scale(.97);
}

/* MAIN PAGE APPEAR */
.landing-container {
    transition:
        opacity .7s ease,
        transform .7s ease;
}
.footer {
    transition:
        opacity .7s ease,
        transform .7s ease;
}

/* MOBILE */
@media(max-width:768px) {
    #realHeading {
        font-size: clamp(1.5rem, 7vw, 2.4rem);
        gap: 8px;
    }
    #startPopup {
        width: 85%;
        padding: 24px;
    }
    #startPopup h2 {
        font-size: 20px;
    }
    #startBattleBtn {
        width: 100%;
        font-size: 16px;
    }
}

#realHeading {
    transition:
        opacity .8s ease,
        transform .8s ease;
}
#realHeading.show {
    opacity: 1;
    transform:translate(-50%, -50%) scale(1);
}
#startPopup.show {
    animation:popupBounce .5s ease;
}

@keyframes popupBounce {
    0% {
        opacity: 0;
        transform:translate(-50%, -50%) scale(.4);}
    60% {
        opacity: 1;
        transform:translate(-50%, -50%) scale(1.08);}
    100% {
        transform:translate(-50%, -50%) scale(1);}
}
.game-title,
.subtitle,
.mode-card {
    opacity: 0;
    transform: translateY(30px);
}
.show-ui .game-title {
    opacity: 1;
    transform: translateY(0);
    transition: .7s ease;
}
.show-ui .subtitle {
    opacity: 1;
    transform: translateY(0);
    transition: .7s ease .15s;
}
.show-ui .mode-card:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition: .7s ease .3s;
}
.show-ui .mode-card:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition: .7s ease .45s;
}