/* ============ BASE STYLES ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
}

/* ============ STARRY BACKGROUND ============ */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ============ SHOOTING STARS ============ */
.shooting-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.8);
    animation: shoot var(--duration, 1s) linear forwards;
    transform: rotate(var(--angle, 35deg));
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: var(--tail-length, 80px);
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.9));
    right: 100%;
}

@keyframes shoot {
    0% {
        opacity: 1;
        transform: rotate(var(--angle, 35deg)) translateX(0);
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(var(--angle, 35deg)) translateX(var(--distance, 400px));
    }
}

/* ============ MOON ============ */
.moon {
    position: fixed;
    top: 40px;
    right: 40px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
    border-radius: 50%;
    box-shadow:
        0 0 40px rgba(254, 249, 195, 0.5),
        0 0 80px rgba(254, 249, 195, 0.3),
        inset -10px -10px 20px rgba(251, 191, 36, 0.3);
    animation: moonGlow 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes moonGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(254, 249, 195, 0.5), 0 0 80px rgba(254, 249, 195, 0.3), inset -10px -10px 20px rgba(251, 191, 36, 0.3); }
    50% { box-shadow: 0 0 60px rgba(254, 249, 195, 0.7), 0 0 100px rgba(254, 249, 195, 0.4), inset -10px -10px 20px rgba(251, 191, 36, 0.3); }
}

/* ============ SOUND TOGGLE ============ */
.sound-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(30, 30, 50, 0.8);
    border: 2px solid rgba(192, 132, 252, 0.4);
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sound-toggle:hover {
    transform: scale(1.1);
    border-color: rgba(244, 114, 182, 0.6);
    box-shadow: 0 4px 20px rgba(244, 114, 182, 0.3);
}

.sound-toggle.off {
    opacity: 0.6;
}

/* ============ SCENES ============ */
.scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.scene.active {
    opacity: 1;
    pointer-events: all;
}

/* ============ TITLE SCREEN ============ */
#title-screen {
    text-align: center;
    padding: 20px;
}

.title-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 182, 193, 0.6);
    box-shadow: 0 0 30px rgba(255, 182, 193, 0.4);
    margin-bottom: 30px;
    object-fit: cover;
    background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.title-photo span {
    font-size: 40px;
}

.main-title {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    color: #fce7f3;
    text-shadow: 0 0 20px rgba(252, 231, 243, 0.5);
    margin-bottom: 15px;
    font-weight: 700;
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: #c4b5fd;
    margin-bottom: 40px;
    font-weight: 500;
}

/* Floating Z's */
.zzz-container {
    position: absolute;
    top: 20%;
    left: 15%;
}

.zzz {
    font-size: 24px;
    color: #c4b5fd;
    opacity: 0;
    animation: floatZ 3s ease-in-out infinite;
}

.zzz:nth-child(1) { animation-delay: 0s; }
.zzz:nth-child(2) { animation-delay: 1s; font-size: 20px; }
.zzz:nth-child(3) { animation-delay: 2s; font-size: 16px; }

@keyframes floatZ {
    0% { opacity: 0; transform: translate(0, 0) rotate(-10deg); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translate(30px, -60px) rotate(10deg); }
}

.start-btn {
    padding: 18px 50px;
    font-size: 1.3rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    background: linear-gradient(135deg, #f472b6 0%, #c084fc 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(244, 114, 182, 0.4);
    transition: all 0.3s ease;
    animation: btnPulse 2s ease-in-out infinite;
}

.start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(244, 114, 182, 0.6);
}

@keyframes btnPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* ============ FINAL SCREEN ============ */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-heart {
    position: absolute;
    bottom: -50px;
    animation: floatUp 8s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

.sleeping-sheep-pile {
    position: relative;
    width: 250px;
    height: 80px;
    margin-bottom: 30px;
}

.mini-sheep {
    position: absolute;
}

.final-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid rgba(255, 182, 193, 0.6);
    box-shadow: 0 0 40px rgba(255, 182, 193, 0.5);
    margin-bottom: 30px;
    background: linear-gradient(135deg, #f472b6 0%, #c084fc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    animation: photoGlow 3s ease-in-out infinite;
}

@keyframes photoGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(255, 182, 193, 0.5); }
    50% { box-shadow: 0 0 60px rgba(255, 182, 193, 0.7), 0 0 80px rgba(244, 114, 182, 0.3); }
}

.final-message {
    text-align: center;
    max-width: 90%;
    width: 500px;
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.final-title {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    color: #fce7f3;
    margin-bottom: 20px;
    font-weight: 700;
}

.final-text {
    font-size: 1.1rem;
    color: #e9d5ff;
    line-height: 1.8;
    margin-bottom: 25px;
}

.promises {
    background: rgba(30, 30, 50, 0.6);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(192, 132, 252, 0.3);
    margin-bottom: 25px;
}

.promise-item {
    color: #c4b5fd;
    font-size: 1rem;
    margin: 10px 0;
}

.final-signature {
    font-size: 1.3rem;
    color: #f9a8d4;
    font-style: italic;
}

.replay-btn {
    margin-top: 30px;
    padding: 12px 30px;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    background: rgba(30, 30, 50, 0.8);
    color: #c4b5fd;
    border: 2px solid rgba(192, 132, 252, 0.4);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.replay-btn:hover {
    background: rgba(192, 132, 252, 0.2);
    border-color: rgba(244, 114, 182, 0.6);
    color: #f9a8d4;
}
