/* ==============================================
   BASE STYLES
   ============================================== */

:root {
    --primary-color: #b8a3e8;
    --primary-hover: #9d7dd8;
    --secondary-color: #ff9ec1;
    --secondary-hover: #ff7aa8;
    --bg-gradient-start: #f5f0ff;
    --bg-gradient-end: #ede6ff;
    --text-dark: #4a4a4a;
    --text-light: #666666;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    scroll-snap-type: none;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==============================================
   FLOATING HEARTS ANIMATION
   ============================================== */

.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.heart {
    position: absolute;
    font-size: 20px;
    opacity: 0;
    animation: floatHeart 15s infinite ease-in-out;
}

.heart:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.heart:nth-child(2) {
    left: 25%;
    animation-delay: 3s;
    animation-duration: 14s;
}

.heart:nth-child(3) {
    left: 45%;
    animation-delay: 1s;
    animation-duration: 16s;
}

.heart:nth-child(4) {
    left: 65%;
    animation-delay: 5s;
    animation-duration: 13s;
}

.heart:nth-child(5) {
    left: 80%;
    animation-delay: 2s;
    animation-duration: 15s;
}

.heart:nth-child(6) {
    left: 90%;
    animation-delay: 4s;
    animation-duration: 17s;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-20vh) rotate(360deg);
        opacity: 0;
    }
}

/* ==============================================
   SCROLL PROGRESS INDICATOR
   ============================================== */

.scroll-indicator {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.scroll-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.scroll-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 158, 193, 0.5);
}

.scroll-dot:hover {
    transform: scale(1.2);
}

/* Mobile: horizontal progress bar at bottom */
@media (max-width: 991px) {
    .scroll-indicator {
        display: none;
    }
}

/* ==============================================
   HERO SECTION
   ============================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 2;
    scroll-snap-align: start;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero.active-chapter {
    opacity: 1;
    transform: translateY(0);
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 500;
    animation: fadeInUp 1s ease 0.3s both;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.5s both;
}

.scroll-down-btn {
    background: none;
    border: 2px solid var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: bounce 2s infinite, fadeInUp 1s ease 0.7s both;
}

.scroll-down-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ==============================================
   CHAPTER SECTIONS
   ============================================== */

.chapter {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem;
    position: relative;
    z-index: 2;
    scroll-snap-align: start;
    background-color: var(--white);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.chapter.active-chapter {
    opacity: 1;
    transform: translateY(0);
}

.chapter.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.chapter.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.chapter-alt {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
}

.chapter-photos {
    background: linear-gradient(135deg, rgba(255, 245, 248, 0.9) 0%, rgba(240, 230, 255, 0.9) 100%);
}

.chapter-content {
    text-align: center;
}

.chapter-label {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: 30px;
}

.chapter-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.chapter-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-style: italic;
}

.chapter-text {
    max-width: 700px;
    margin: 0 auto;
}

.chapter-text p {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.chapter-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: var(--primary-color);
    opacity: 0.2;
}

/* ==============================================
   PHOTOS IN CHAPTER
   ============================================== */

.photo-grid {
    margin-top: 3rem;
}

.photo-card {
    background-color: var(--white);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.photo-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 30px var(--shadow-hover);
}

.photo-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 0.8rem;
}

.photo-caption {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

/* Modal Styles */
.modal-content {
    border-radius: 20px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
    background-color: var(--bg-gradient-start);
    border-radius: 20px 20px 0 0;
}

.modal-title {
    color: var(--primary-color);
    font-weight: 600;
}

.modal-photo {
    border-radius: 15px;
    max-height: 70vh;
}

.modal-caption {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-style: italic;
}

/* ==============================================
   FINAL MESSAGE SECTION
   ============================================== */

.final-message {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem;
    position: relative;
    z-index: 2;
    scroll-snap-align: start;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.final-message.active-chapter {
    opacity: 1;
    transform: translateY(0);
}

.final-message.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.final-message.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.final-card {
    text-align: center;
    padding: 3rem 2rem;
}

.final-icon {
    font-size: 5rem;
    color: var(--white);
    margin-bottom: 2rem;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

.final-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 2rem;
}

.typewriter-text {
    font-size: 1.3rem;
    line-height: 1.9;
    color: var(--white);
    min-height: 150px;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.typewriter-text::after {
    content: '|';
    animation: blink 1s infinite;
}

.typewriter-text.complete::after {
    content: '';
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* ==============================================
   FOOTER
   ============================================== */

.footer {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2rem 0;
    position: relative;
    z-index: 2;
}

.footer p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    html {
        scroll-snap-type: none;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .chapter-title {
        font-size: 2.3rem;
    }

    .chapter-subtitle {
        font-size: 1.3rem;
    }

    .chapter {
        min-height: auto;
        padding: 4rem 1rem;
    }

    .final-message {
        min-height: auto;
        padding: 4rem 1rem;
    }
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
    .hero {
        min-height: 90vh;
        padding: 3rem 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .chapter {
        padding: 3rem 1rem;
    }

    .chapter-title {
        font-size: 2rem;
    }

    .chapter-subtitle {
        font-size: 1.1rem;
    }

    .chapter-text p {
        font-size: 1rem;
    }

    .chapter-decoration {
        font-size: 5rem;
        margin-top: 2rem;
    }

    .photo-img {
        height: 180px;
    }

    .final-message {
        padding: 3rem 1rem;
    }

    .final-title {
        font-size: 2rem;
    }

    .typewriter-text {
        font-size: 1.1rem;
    }

    .final-icon {
        font-size: 4rem;
    }

    .heart {
        font-size: 16px;
    }
}

/* Small Mobile (up to 375px) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .chapter-title {
        font-size: 1.7rem;
    }

    .chapter-subtitle {
        font-size: 1rem;
    }

    .chapter-text p {
        font-size: 0.95rem;
    }

    .photo-img {
        height: 160px;
    }

    .final-title {
        font-size: 1.7rem;
    }

    .typewriter-text {
        font-size: 1rem;
    }
}

/* ==============================================
   FLOATING HEARTS ANIMATION
   ============================================== */

.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.heart {
    position: absolute;
    font-size: 20px;
    opacity: 0;
    animation: floatHeart 15s infinite ease-in-out;
}

.heart:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.heart:nth-child(2) {
    left: 25%;
    animation-delay: 3s;
    animation-duration: 14s;
}

.heart:nth-child(3) {
    left: 45%;
    animation-delay: 1s;
    animation-duration: 16s;
}

.heart:nth-child(4) {
    left: 65%;
    animation-delay: 5s;
    animation-duration: 13s;
}

.heart:nth-child(5) {
    left: 80%;
    animation-delay: 2s;
    animation-duration: 15s;
}

.heart:nth-child(6) {
    left: 90%;
    animation-delay: 4s;
    animation-duration: 17s;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-20vh) rotate(360deg);
        opacity: 0;
    }
}

/* ==============================================
   LOGIN PAGE STYLES
   ============================================== */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.login-card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 40px var(--shadow);
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.8s ease-out;
}

.login-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    animation: heartBeat 2s infinite;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1.05);
    }
}

.login-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.login-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

.login-input {
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 158, 193, 0.1);
    outline: none;
}

.login-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 12px;
    padding: 14px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 158, 193, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 158, 193, 0.4);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--secondary-hover) 100%);
}

.login-btn:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 20px;
}

.login-footer small {
    color: var(--text-light);
}

.alert {
    border-radius: 12px;
    border: none;
    padding: 14px 18px;
}

.alert-danger {
    background-color: #ffe5ec;
    color: #c7254e;
}

/* Responsive adjustments for login */
@media (max-width: 576px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .login-subtitle {
        font-size: 1rem;
    }
    
    .login-icon {
        font-size: 3rem;
    }
}


