/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lora', serif;
    background: linear-gradient(to bottom right, #fff0f5, #ffe4e1);
    color: #333;
    overflow-x: hidden;
    position: relative;
}

/* --- Typography --- */
h1, .splash-title, .timeline-heading {
    font-family: 'Tangerine', cursive;
    font-weight: 700;
}

h1 {
    font-size: 4rem;
}

.splash-title {
    font-size: 3rem;
}

.timeline-heading {
    font-size: 4.5rem;
}

h2 {
    font-family: 'Tangerine', cursive;
    font-size: 3rem;
}


/* SPLASH SCREEN */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, #ffe4e1, #ffccd5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 1s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    animation: fadeIn 2s ease-in-out;
}

.splash-envelope {
    font-size: 5rem;
    color: #e91e63;
    margin-bottom: 20px;
}

.splash-title {
    margin-bottom: 20px;
    color: #e91e63;
}

.start-button {
    padding: 12px 24px;
    font-size: 1rem;
    background-color: #e91e63;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
}

.start-button:hover {
    background-color: #c2185b;
}

/* MAIN CONTENT */
.main-content {
    padding: 40px 20px;
    text-align: center;
    z-index: 1;
    position: relative;
}

.container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 1;
}

.anniversary-photo {
    width: 100%;
    max-width: 400px;
    margin-top: 20px;
    border-radius: 15px;
}

/* ENVELOPE ICON */
.envelope-container {
    margin-top: 30px;
    cursor: pointer;
}

.envelope-icon {
    font-size: 3.5rem;
    color: #e91e63;
    animation: bounce 2s infinite;
}

.envelope-prompt {
    margin-top: 10px;
    font-style: italic;
}

/* MESSAGES */
.envelope-message {
    margin-top: 30px;
    font-size: 1.3rem;
    color: #e91e63;
    animation: typewriter 3s steps(40) 1;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid #e91e63;
}

/* MUSIC PLAYER */
.music-player {
    margin-top: 30px;
}

.hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* --- Timeline Section --- */
.timeline-container {
    max-width: 800px;
    margin: 40px auto;
    position: relative;
    padding: 20px 0;
    text-align: center;
}

.timeline-item {
    position: relative;
    padding: 10px 0;
    margin-bottom: 20px;
}

.timeline-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #e91e63;
}

.timeline-item img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Flexbox for larger screens */
@media (min-width: 768px) {
    .timeline-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .timeline-item {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .timeline-item.timeline-right {
        flex-direction: row-reverse;
    }

    .timeline-item .timeline-content {
        width: 50%;
        padding: 0 20px;
        text-align: center;
    }
}

/* Responsive Styles for Mobile */
@media screen and (max-width: 767px) {
    .timeline-container {
        padding: 0 15px;
    }

    .timeline-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .timeline-item .timeline-content {
        width: 100%;
        padding: 0;
        margin-top: 15px;
    }

    .timeline-item img {
        width: 90%;
        max-width: 300px;
    }
    
    /* --- Mobile Font and Padding Adjustments --- */
    h1 {
        font-size: 3rem;
    }

    .timeline-heading {
        font-size: 3.5rem;
    }

    .splash-title {
        font-size: 2.2rem;
    }

    .container {
        padding: 20px;
    }
}

#videoPlayer {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin-bottom: 20px;
}

#centrar_ {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timeline-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.timeline-item.animate {
    opacity: 1;
    transform: translateY(0);
}
/* --- Slideshow Container --- */
.slideshow-container {
    max-width: 800px;
    position: relative;
    margin: 40px auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.slideshow-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.mySlides {
    display: none;
}

/* Next & previous buttons (NEW STYLE) */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-weight: bold;
    font-size: 22px;
    border-radius: 50%;
    user-select: none;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev {
    left: 15px;
}

.next {
    right: 15px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Fade animation */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* --- Fullscreen Falling Hearts Effect --- */
.fullscreen-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.heart-particle {
    position: absolute;
    background: rgba(255, 192, 203, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: animateHearts linear infinite;
    filter: blur(3px);
}

@keyframes animateHearts {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(105vh) rotate(720deg);
        opacity: 0;
    }
}

/* --- PANG-AYOS PARA SA MOBILE TEXT --- */
@media screen and (max-width: 767px) {
    .envelope-message {
        font-size: 4.2vw;
        border-right: none;
    }
}

/* --- Footer Styles (UPDATED) --- */
.anniversary-footer {
    text-align: center;
    padding: 20px;
    background-color: transparent;
    color: #ff0000; /* Matingkad na red */
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 40px;
    width: 100%;
}

/* Tinitiyak na nakasentro at may tamang kulay sa mobile */
@media screen and (max-width: 767px) {
    .anniversary-footer {
        font-size: 1.2rem;
        padding: 15px;
        text-align: center;
        color: #ff0000;
    }
}