* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #001a4d;
    color: #fff;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ASCII Rain */
.ascii-rain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 18px;
    line-height: 1.2;
    font-family: 'Courier New', monospace;
    white-space: pre;
    overflow: hidden;
    color: #ff1493;
    text-shadow: 0 0 10px #ff1493, 0 0 20px #ff1493;
    letter-spacing: 2px;
    z-index: 1;
}

.rain-char {
    position: absolute;
    font-weight: bold;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

/* Countdown Display */
.countdown-display {
    position: absolute;
    font-size: 150px;
    font-weight: bold;
    color: #ff1493;
    text-shadow: 0 0 20px #ff1493, 0 0 40px #ff1493;
    z-index: 10;
    opacity: 0;
    animation: countdownFade 1s ease-in-out forwards;
}

@keyframes countdownFade {
    0% {
        opacity: 1;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}

/* Text Sequence */
.text-sequence-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.text-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    font-size: 80px;
    font-weight: bold;
    color: #ff1493;
    text-shadow: 0 0 15px #ff1493, 0 0 30px #ff1493;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.text-item.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Heart Container */
.heart-container {
    position: absolute;
    font-size: 25px;
    font-family: 'Courier New', monospace;
    white-space: pre;
    color: #ff1493;
    text-shadow: 0 0 15px #ff1493, 0 0 30px #ff1493;
    z-index: 8;
    line-height: 1;
    letter-spacing: 2px;
    text-align: center;
}

.heart-ascii {
    animation: heartBeat 0.8s ease-in-out infinite;
}

.back-btn,
.replay-btn {
    position: fixed;
    bottom: 24px;
    z-index: 20;
    padding: 12px 20px;
    border: none;
    border-radius: 999px;
    background: #ff1493;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 20, 147, 0.35);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.back-btn {
    right: 24px;
}

.replay-btn {
    left: 24px;
}

.back-btn.show,
.replay-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }
    20% {
        transform: scale(1.04);
    }
    40% {
        transform: scale(1.08);
    }
    60% {
        transform: scale(1.05);
    }
    80% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .countdown-display {
        font-size: 80px;
    }

    .text-item {
        font-size: 48px;
    }

    .heart-container {
        font-size: 15px;
    }
}
