/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pink: #ff1493;
    --red: #ff0066;
    --light-pink: #ffb3d9;
    --dark-pink: #c71585;
    --white: #ffffff;
    --cream: #fff5f7;
    --shadow: rgba(255, 20, 147, 0.3);
    --gradient: linear-gradient(135deg, #ff0066, #ff1493, #ff69b4);
    --gradient-reverse: linear-gradient(135deg, #ff69b4, #ff1493, #ff0066);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a0010 0%, #330033 50%, #1a0010 100%);
    color: var(--white);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== PAGE SYSTEM ===== */
.page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: none;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    overflow-y: auto;
    padding: 20px;
}

.page.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== BACKGROUNDS ===== */
.hearts-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 20, 147, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 105, 180, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ===== LAYOUT ===== */
.content-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    gap: 30px;
    z-index: 1;
    position: relative;
}

/* ===== CARDS ===== */
.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px 30px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.glass-card {
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(255, 20, 147, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

/* ===== TYPOGRAPHY ===== */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    color: var(--light-pink);
    margin-bottom: 15px;
}

.handwriting {
    font-family: 'Pacifico', cursive;
    color: var(--pink);
    font-size: 2rem;
    text-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
}

.text-lg {
    font-size: 1.2rem;
    text-align: center;
    margin: 15px 0;
}

.text-md {
    font-size: 1rem;
    text-align: center;
    margin: 10px 0;
    color: var(--light-pink);
}

.small-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    text-align: center;
    margin-top: 15px;
}

/* ===== BUTTONS ===== */
.btn-primary,
.btn-secondary,
.btn-yes,
.btn-no {
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4);
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 20, 147, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-pink);
    border: 2px solid var(--pink);
}

.btn-yes {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: white;
    font-size: 1.5rem;
    padding: 20px 50px;
}

.btn-yes:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.5);
}

.btn-no {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    padding: 12px 30px;
    position: relative;
}

/* ===== PAGE 1: LANDING ===== */
.glitch-text {
    font-size: 2.2rem;
    font-weight: 700;
    position: relative;
    animation: glitch 2s infinite;
}

@keyframes glitch {

    0%,
    100% {
        text-shadow: 0 0 10px var(--pink);
    }

    25% {
        text-shadow: -2px 0 10px var(--red), 2px 0 10px var(--light-pink);
    }

    50% {
        text-shadow: 2px 0 10px var(--red), -2px 0 10px var(--light-pink);
    }

    75% {
        text-shadow: 0 0 10px var(--pink);
    }
}

.name-reveal {
    font-family: 'Pacifico', cursive;
    font-size: 2rem;
    color: var(--pink);
    animation: slideUp 1s ease-out, glow 2s infinite;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(255, 20, 147, 0.8);
    }

    50% {
        text-shadow: 0 0 40px rgba(255, 20, 147, 1);
    }
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Floating Hearts Animation */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.floating-hearts::before,
.floating-hearts::after {
    content: '💕';
    position: absolute;
    font-size: 2rem;
    animation: float 6s infinite;
}

.floating-hearts::before {
    left: 20%;
    animation-delay: 0s;
}

.floating-hearts::after {
    left: 70%;
    animation-delay: 3s;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ===== PAGE 2: WELCOME ===== */
.emoji-rain {
    font-size: 2rem;
    text-align: center;
    margin-top: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ===== PAGE 3 & 7: GAMES ===== */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    gap: 20px;
    padding: 20px;
}

.game-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 10px;
}

.game-subtitle {
    font-size: 1rem;
    color: var(--light-pink);
    text-align: center;
}

.score-board {
    display: flex;
    justify-content: space-around;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 15px;
    font-size: 1.1rem;
}

.game-area {
    position: relative;
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.heart-target {
    position: absolute;
    font-size: 2.5rem;
    cursor: pointer;
    animation: heartPop 0.3s ease-out;
    user-select: none;
}

@keyframes heartPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.heart-target:active {
    animation: heartCatch 0.3s ease-out;
}

@keyframes heartCatch {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Balloon Game */
.balloon-area {
    position: relative;
    width: 100%;
    height: 450px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.balloon {
    position: absolute;
    font-size: 4rem;
    cursor: pointer;
    animation: floatUp 6s linear;
    user-select: none;
    padding: 10px;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.balloon:hover {
    transform: scale(1.1);
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(-520px) rotate(15deg);
    }
}

.balloon:active {
    animation: pop 0.3s ease-out forwards;
}

@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.reasons-unlocked {
    min-height: 60px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    width: 100%;
}

#reason-display {
    font-size: 1.1rem;
    color: var(--light-pink);
    animation: fadeIn 0.5s ease-in;
}

/* ===== PAGE 4: GOSSIP ZONE ===== */
.gossip-card {
    padding: 40px 25px;
}

.gossip-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.gossip-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid var(--pink);
    opacity: 0;
}

.gossip-emoji {
    font-size: 2rem;
    flex-shrink: 0;
}

.gossip-item p {
    font-size: 1rem;
    margin: 0;
}

.slide-in {
    animation: slideIn 0.6s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== PAGE 5: CNJ PUB ===== */
.memory-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.pub-sign {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    padding: 30px 40px;
    border-radius: 20px;
    border: 4px solid #D2691E;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.pub-sign h2 {
    color: #FFD700;
    font-size: 2.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin: 0;
}

.pub-sign .subtitle {
    color: #FFF8DC;
    font-size: 1rem;
    margin-top: 10px;
    font-style: italic;
}

.bounce {
    animation: bounce 2s infinite;
}

.memory-card {
    padding: 35px 30px;
    text-align: center;
}

.memory-card h3 {
    margin-bottom: 20px;
}

.memory-card p {
    font-size: 1.1rem;
    margin: 10px 0;
    line-height: 1.6;
}

.sparkles {
    margin-top: 20px;
    font-size: 1.5rem;
    animation: sparkle 1.5s infinite;
}

.sparkles::before {
    content: '✨ ✨ ✨';
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ===== PAGE 6: LOVE LETTER ===== */
.letter-container {
    width: 100%;
    max-width: 500px;
}

.letter {
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.08);
}

.letter-content {
    margin-top: 25px;
    line-height: 1.8;
}

.letter-content p {
    margin: 15px 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.signature {
    margin-top: 30px;
    font-family: 'Pacifico', cursive;
    color: var(--pink);
    font-size: 1.2rem;
    text-align: right;
}

/* ===== PAGE 8: PLAYLIST ===== */
.playlist-card {
    padding: 35px 25px;
}

.playlist-container {
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
}

/* ===== PAGE 9: FINAL QUESTION ===== */
.final-card {
    padding: 50px 30px;
    text-align: center;
}

.big-question {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
}

.celebration {
    margin-top: 30px;
}

.celebration-text {
    font-size: 3rem;
    animation: celebrate 0.6s ease-out;
}

.celebration-subtext {
    font-size: 1.2rem;
    margin: 10px 0;
    color: var(--light-pink);
}

@keyframes celebrate {
    0% {
        transform: scale(0) rotate(-180deg);
    }

    50% {
        transform: scale(1.2) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ===== UTILITY ===== */
.hidden {
    display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .handwriting {
        font-size: 1.7rem;
    }

    .name-reveal {
        font-size: 1.6rem;
    }

    .btn-primary {
        padding: 14px 35px;
        font-size: 1rem;
    }

    .game-area,
    .balloon-area {
        height: 350px;
    }

    .big-question {
        font-size: 2rem;
    }

    .btn-yes {
        font-size: 1.3rem;
        padding: 18px 40px;
    }
}