@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Raleway:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', 'Segoe UI', sans-serif;
    background: #0a0a0f;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(139, 69, 139, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(75, 0, 130, 0.15) 0%, transparent 50%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    color: #e8d5e8;
}

/* Animated gradient overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        rgba(139, 69, 139, 0.05) 0%,
        rgba(75, 0, 130, 0.08) 25%,
        rgba(106, 13, 173, 0.05) 50%,
        rgba(139, 69, 139, 0.08) 75%,
        rgba(75, 0, 130, 0.05) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.stage {
    display: none;
    animation: fadeIn 1.5s ease-in;
}

.stage.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mystery Box Styling - Dark Romantic Theme */
.mystery-box, .final-box, .slider-box {
    background: rgba(20, 15, 30, 0.85);
    backdrop-filter: blur(20px);
    padding: 50px 40px;
    border-radius: 25px;
    box-shadow:
        0 8px 32px 0 rgba(139, 69, 139, 0.3),
        0 0 80px rgba(106, 13, 173, 0.2),
        inset 0 0 60px rgba(139, 69, 139, 0.05);
    border: 1px solid rgba(139, 69, 139, 0.2);
    max-width: 650px;
    width: 100%;
    text-align: center;
    position: relative;
}

/* Romantic glow effect */
.mystery-box::before, .final-box::before, .slider-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
        rgba(139, 69, 139, 0.3),
        rgba(106, 13, 173, 0.3),
        rgba(147, 51, 234, 0.3));
    border-radius: 25px;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.6;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Romantic Title */
.glitch {
    font-family: 'Playfair Display', serif;
    font-size: 2.8em;
    font-weight: 700;
    font-style: italic;
    position: relative;
    background: linear-gradient(135deg, #e8b4f0, #d896ff, #e8b4f0);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    margin-bottom: 25px;
    animation: shimmer 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(139, 69, 139, 0.5);
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hint {
    font-size: 1.15em;
    color: #c8a0d8;
    margin-bottom: 35px;
    font-weight: 300;
    letter-spacing: 1px;
}

.sub-hint {
    font-size: 0.9em;
    color: #9d7aac;
    margin-top: 12px;
    font-style: italic;
    opacity: 0.8;
}

.swipe-hint {
    font-size: 1em;
    color: #d896ff;
    margin-bottom: 20px;
    animation: romanticPulse 2s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(139, 69, 139, 0.6);
}

@keyframes romanticPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Highlight Name */
.highlight-name {
    color: #ff9ed8;
    font-weight: 600;
    text-transform: capitalize;
    text-shadow: 0 0 20px rgba(255, 158, 216, 0.5);
}

/* Code Container */
.code-container {
    margin-top: 35px;
}

.code-box {
    background: rgba(30, 20, 45, 0.8);
    color: #d896ff;
    padding: 25px;
    border-radius: 15px;
    font-family: 'Courier New', monospace;
    margin: 25px 0;
    font-size: 1.05em;
    box-shadow:
        0 0 30px rgba(139, 69, 139, 0.3),
        inset 0 0 20px rgba(106, 13, 173, 0.2);
    border: 1px solid rgba(139, 69, 139, 0.3);
}

input[type="number"],
input[type="text"] {
    width: 100%;
    padding: 16px;
    font-size: 1.05em;
    background: rgba(30, 20, 45, 0.6);
    border: 2px solid rgba(139, 69, 139, 0.4);
    border-radius: 12px;
    margin: 25px 0;
    text-align: center;
    transition: all 0.4s ease;
    color: #e8d5e8;
    font-family: 'Raleway', sans-serif;
}

input[type="number"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #d896ff;
    background: rgba(30, 20, 45, 0.8);
    box-shadow:
        0 0 25px rgba(139, 69, 139, 0.4),
        inset 0 0 15px rgba(106, 13, 173, 0.2);
}

input::placeholder {
    color: #9d7aac;
    opacity: 0.7;
}

.mystery-btn {
    background: linear-gradient(135deg, #8b458b 0%, #6a0dad 50%, #8b458b 100%);
    background-size: 200% 200%;
    color: #fff;
    border: none;
    padding: 16px 50px;
    font-size: 1.05em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow:
        0 5px 25px rgba(139, 69, 139, 0.4),
        0 0 40px rgba(106, 13, 173, 0.2);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Raleway', sans-serif;
    position: relative;
    overflow: hidden;
}

.mystery-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.mystery-btn:hover::before {
    width: 300px;
    height: 300px;
}

.mystery-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 35px rgba(139, 69, 139, 0.6),
        0 0 60px rgba(106, 13, 173, 0.4);
    background-position: 100% 50%;
}

.mystery-btn:active {
    transform: translateY(-1px);
}

.error-text {
    color: #ff6b9d;
    margin-top: 15px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

/* Hearts Puzzle - Romantic Dark */
.hearts-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.heart {
    cursor: pointer;
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 10px rgba(139, 69, 139, 0.3));
}

.heart svg {
    width: 65px;
    height: 65px;
    fill: rgba(139, 69, 139, 0.3);
    transition: all 0.4s ease;
}

.heart:hover svg {
    fill: #ff6b9d;
    filter: drop-shadow(0 0 15px rgba(255, 107, 157, 0.8));
    transform: scale(1.15);
}

.heart.selected svg {
    fill: #ff6b9d;
    animation: romanticHeartbeat 0.8s ease-in-out;
    filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.9));
}

.heart-1 svg { width: 45px; height: 45px; }
.heart-2 svg { width: 58px; height: 58px; }
.heart-3 svg { width: 72px; height: 72px; }
.heart-4 svg { width: 88px; height: 88px; }

@keyframes romanticHeartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3) rotate(-5deg); }
    75% { transform: scale(1.3) rotate(5deg); }
}

/* Question Container */
.question-container {
    margin-top: 35px;
}

.question {
    font-family: 'Playfair Display', serif;
    font-size: 1.4em;
    color: #e8b4f0;
    font-weight: 600;
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(139, 69, 139, 0.5);
}

/* ============================================ */
/* IMAGE SLIDER - ROMANTIC DARK */
/* ============================================ */

.slider-box {
    max-width: 750px;
    padding: 40px 35px;
}

.slider-container {
    position: relative;
    width: 100%;
    max-width: 650px;
    margin: 35px auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(139, 69, 139, 0.3);
    border: 2px solid rgba(139, 69, 139, 0.3);
}

.slider-wrapper {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    touch-action: pan-y;
}

.slide {
    min-width: 100%;
    position: relative;
}

.image-placeholder {
    position: relative;
    width: 100%;
    height: 450px;
    background: linear-gradient(135deg, rgba(139, 69, 139, 0.3) 0%, rgba(106, 13, 173, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Photo frame effect */
.image-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.3) 0%,
        transparent 20%,
        transparent 80%,
        rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    transition: transform 0.3s ease;
}

.slide:hover .slide-image {
    transform: scale(1.05);
}

.slide-image[src]:not([src="#PlaceHolder1"]):not([src="#PlaceHolder2"]):not([src="#PlaceHolder3"]):not([src="#PlaceHolder4"]):not([src="#PlaceHolder5"]) {
    display: block;
}

.slide-image[src="#PlaceHolder1"] + .placeholder-text,
.slide-image[src="#PlaceHolder2"] + .placeholder-text,
.slide-image[src="#PlaceHolder3"] + .placeholder-text,
.slide-image[src="#PlaceHolder4"] + .placeholder-text,
.slide-image[src="#PlaceHolder5"] + .placeholder-text {
    display: block;
}

.placeholder-text {
    display: none;
    color: #e8d5e8;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
    padding: 25px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    line-height: 1.9;
    z-index: 1;
}

.slide-caption {
    padding: 25px;
    font-size: 1.05em;
    color: #c8a0d8;
    font-style: italic;
    background: rgba(20, 15, 30, 0.95);
    margin: 0;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.6;
    border-top: 1px solid rgba(139, 69, 139, 0.2);
}

/* Slider Navigation Buttons - Romantic */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(139, 69, 139, 0.4);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(139, 69, 139, 0.5);
    color: #e8d5e8;
    font-size: 2em;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s ease;
    z-index: 10;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.slider-btn:hover {
    background: rgba(139, 69, 139, 0.7);
    border-color: #d896ff;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 30px rgba(139, 69, 139, 0.6);
}

.slider-btn-prev {
    left: 15px;
}

.slider-btn-next {
    right: 15px;
}

.slider-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* Slider Dots - Romantic */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 18px 0;
    background: rgba(20, 15, 30, 0.95);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(139, 69, 139, 0.4);
    border: 1px solid rgba(139, 69, 139, 0.5);
    cursor: pointer;
    transition: all 0.4s ease;
}

.dot.active {
    background: #d896ff;
    box-shadow: 0 0 15px rgba(139, 69, 139, 0.8);
    transform: scale(1.4);
}

.dot:hover {
    background: #b57edb;
    box-shadow: 0 0 10px rgba(139, 69, 139, 0.6);
}

/* Slider Counter */
.slider-counter {
    margin-top: 25px;
    font-size: 1.05em;
    color: #d896ff;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(139, 69, 139, 0.5);
}

/* ============================================ */
/* FINAL BIRTHDAY MESSAGE - ROMANTIC DARK */
/* ============================================ */

.final-box {
    background: rgba(20, 15, 30, 0.9);
    position: relative;
    overflow: hidden;
}

.birthday-text {
    font-family: 'Playfair Display', serif;
    font-size: 3.2em;
    font-weight: 700;
    font-style: italic;
    background: linear-gradient(135deg, #ff9ed8, #d896ff, #ff9ed8);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 40px;
    animation: shimmer 3s ease-in-out infinite, floatGentle 2s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(255, 158, 216, 0.5);
}

@keyframes floatGentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.message-container {
    margin: 40px 0;
    padding: 25px;
}

.love-message {
    font-size: 1.15em;
    color: #c8a0d8;
    line-height: 1.9;
    margin-bottom: 25px;
    animation: fadeIn 2.5s ease-in;
    font-weight: 300;
    letter-spacing: 0.3px;
}

.signature {
    font-family: 'Playfair Display', serif;
    font-size: 1.4em;
    color: #e8b4f0;
    font-style: italic;
    margin-top: 50px;
    text-shadow: 0 0 20px rgba(139, 69, 139, 0.5);
}

.your-name {
    font-size: 1.3em;
    font-weight: 700;
    color: #ff9ed8;
    text-shadow: 0 0 25px rgba(255, 158, 216, 0.6);
}

/* Romantic Floating Hearts */
.hearts-float {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-heart {
    position: absolute;
    font-size: 2.5em;
    animation: floatRomanticHeart 10s ease-in-out infinite;
    opacity: 0;
    filter: drop-shadow(0 0 10px rgba(255, 107, 157, 0.8));
}

.floating-heart:nth-child(1) { left: 10%; animation-delay: 0s; }
.floating-heart:nth-child(2) { left: 30%; animation-delay: 2s; }
.floating-heart:nth-child(3) { left: 50%; animation-delay: 4s; }
.floating-heart:nth-child(4) { left: 70%; animation-delay: 6s; }
.floating-heart:nth-child(5) { left: 90%; animation-delay: 8s; }

@keyframes floatRomanticHeart {
    0% {
        bottom: -60px;
        opacity: 0;
        transform: translateX(0) rotate(0deg) scale(0.5);
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        bottom: 110%;
        opacity: 0;
        transform: translateX(40px) rotate(360deg) scale(1.2);
    }
}

/* Romantic Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(216, 150, 255, 0.8), transparent);
    border-radius: 50%;
    animation: particle-float 20s linear infinite;
    box-shadow: 0 0 10px rgba(139, 69, 139, 0.6);
}

@keyframes particle-float {
    0% {
        transform: translateY(0) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(150px) scale(0);
        opacity: 0;
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-12px); }
    75% { transform: translateX(12px); }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 2s ease-in;
}

/* ============================================ */
/* ROMANTIC STARS BACKGROUND */
/* ============================================ */

.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -3;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* ============================================ */
/* ROMANTIC ROSE PETALS */
/* ============================================ */

.petals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.petal {
    position: absolute;
    width: 15px;
    height: 15px;
    background: radial-gradient(ellipse at center, rgba(255, 158, 216, 0.6) 0%, rgba(216, 150, 255, 0.3) 50%, transparent 100%);
    border-radius: 50% 0 50% 0;
    opacity: 0;
    animation: fallPetal 12s linear infinite;
}

@keyframes fallPetal {
    0% {
        top: -50px;
        opacity: 0;
        transform: translateX(0) rotate(0deg);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        top: 100vh;
        opacity: 0;
        transform: translateX(100px) rotate(720deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mystery-box, .final-box, .slider-box {
        padding: 35px 25px;
    }

    .glitch {
        font-size: 2em;
    }

    .birthday-text {
        font-size: 2.2em;
    }

    .love-message {
        font-size: 1em;
    }

    .heart svg {
        width: 55px;
        height: 55px;
    }

    .heart-1 svg { width: 38px; height: 38px; }
    .heart-2 svg { width: 48px; height: 48px; }
    .heart-3 svg { width: 65px; height: 65px; }
    .heart-4 svg { width: 80px; height: 80px; }

    .image-placeholder {
        height: 320px;
    }

    .slider-btn {
        width: 45px;
        height: 45px;
        font-size: 1.6em;
    }

    .slider-btn-prev {
        left: 8px;
    }

    .slider-btn-next {
        right: 8px;
    }

    .slide-caption {
        font-size: 0.95em;
        padding: 20px;
    }
}