@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 0 0 12px rgba(255, 105, 180, 0.6), 0 0 24px rgba(255, 105, 180, 0.6); }
    50% { text-shadow: 0 0 20px rgba(255, 105, 180, 1), 0 0 40px rgba(255, 105, 180, 1); }
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(30px) scale(0.98); } 
    to { opacity: 1; transform: translateY(0) scale(1); } 
}

@keyframes shooting-star-anim { 
    from { transform: translateX(-200px) rotate(-45deg); } 
    to { transform: translateX(120vw) rotate(-45deg); } 
}

@keyframes twinkle { 
    from { opacity: 0.1; } 
    to { opacity: 0.9; transform: scale(1.1); }
}

@keyframes nebula {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes timelinePulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 105, 180, 0.7); 
    }
    70% { 
        transform: scale(1.4);
        box-shadow: 0 0 0 10px rgba(255, 105, 180, 0); 
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 105, 180, 0); 
    }
}

@keyframes buttonGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes subtleGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

html { 
    scroll-behavior: smooth; 
}

body { 
    font-family: 'Montserrat', sans-serif; 
    background-color: #1a0a1a; 
    color: #f7e6f0; 
    overflow-x: hidden; 
    margin: 0; 
    padding: 0; 
}

.starry-sky { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: -1; 
    background: linear-gradient(270deg, #3d1c32, #1a0a1a, #522746); 
    background-size: 200% 200%;
    animation: nebula 60s ease infinite; 
    overflow: hidden;
}

.star { 
    position: absolute; 
    background-color: #ffe6f0; 
    border-radius: 50%; 
    animation: twinkle 4s infinite alternate; 
}

.shooting-star { 
    position: absolute; 
    height: 2px; 
    background: linear-gradient(-45deg, rgba(255, 200, 220, 0.7), rgba(255, 255, 255, 0)); 
    border-radius: 999px; 
    filter: drop-shadow(0 0 6px rgba(255, 200, 220, 0.5)); 
    animation: shooting-star-anim 25s linear infinite; 
}

.title-font { 
    font-family: 'Dancing Script', cursive; 
    text-shadow: 0 0 12px rgba(255, 105, 180, 0.6), 0 0 24px rgba(255, 105, 180, 0.6); 
}

header .title-font {
    animation: float 6s infinite ease-in-out, titleGlow 4s infinite ease-in-out;
}

.content-section { 
    padding: 4rem 1.5rem; 
    max-width: 800px; 
    margin: 0 auto; 
    position: relative; 
    z-index: 1; 
    background-color: rgba(40, 15, 35, 0.85); 
    backdrop-filter: blur(10px); 
    border-radius: 1.5rem; 
    margin-bottom: 4rem; 
    border: 1px solid rgba(255, 105, 180, 0.1); 
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.15); 
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 1s ease-out, transform 1s ease-out, border-color 0.4s ease, box-shadow 0.4s ease; 
}

.content-section:hover {
    border-color: rgba(255, 105, 180, 0.3);
    box-shadow: 0 8px 30px 0 rgba(255, 105, 180, 0.1);
}

.visible { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
}

.highlight-event {
    opacity: 1 !important; 
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.highlight-event .left-\[-6px\] {
    animation: timelinePulse 2s infinite;
}

.language-word {
    opacity: 0.7; 
    font-weight: 500;
    animation: subtleGlow 2.5s infinite ease-in-out;
}

#enter-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: #1a0a1a; 
    z-index: 100; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: opacity 1.5s ease; 
}
#enter-overlay .title-font {
    animation: titleGlow 3s infinite ease-in-out;
}

.fade-out { 
    opacity: 0; 
    pointer-events: none; 
}

#hourly-message-overlay {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 320px;
    padding: 1.5rem;
    background-color: rgba(40, 15, 35, 0.95); 
    backdrop-filter: blur(12px); 
    border-radius: 1rem; 
    border: 1px solid rgba(255, 105, 180, 0.1); 
    box-shadow: 0 8px 30px 0 rgba(255, 105, 180, 0.1);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    color: #f7e6f0; 
}

#hourly-message-overlay.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#close-hourly-message {
    user-select: none;
    -webkit-user-select: none;
    line-height: 1;
    transition: all 0.2s ease;
    color: #ffb6c1; 
}
#close-hourly-message:active {
    transform: scale(0.9);
    color: #fff;
}

#hourly-wish-textarea {
    resize: none;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1); 
    color: #f7e6f0; 
    border: 1px solid rgba(255, 105, 180, 0.3);
}
#hourly-wish-textarea:focus {
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.5);
    border-color: rgba(255, 105, 180, 0.5);
    background-color: rgba(255, 255, 255, 0.2); 
}

#hourly-wish-button {
    background: linear-gradient(90deg, #ff69b4, #ffb6c1, #ff69b4); 
    background-size: 200% 100%;
    transition: all 0.4s ease;
    animation: buttonGradient 5s ease infinite;
    color: #ffffff; 
    font-weight: bold;
}
#hourly-wish-button:active {
    transform: scale(0.95);
}

#hourly-wish-button:disabled {
    opacity: 0.5;
    background: #ff69b4;
    animation: none;
}

.stardust-ripple {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    border: 2px solid rgba(255, 105, 180, 0.8); 
    width: 0;
    height: 0;
    transform: translate(-50%, -50%);
    animation: ripple-effect 0.7s ease-out;
}

@keyframes ripple-effect {
    from {
        width: 0;
        height: 0;
        opacity: 1;
    }
    to {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .content-section {
        padding: 2.5rem 1rem;
        margin-bottom: 2rem;
        border-radius: 1.5rem;
    }

    #hourly-message-overlay {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .content-section {
        padding: 2rem 1rem;
        margin-bottom: 1.5rem;
    }

    #hourly-message-overlay {
        padding: 1rem;
    }
}