@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-dark: #080808;
    --bg-warm-dark: #12100d;
    --text-light: #f5f5f0;
    --text-muted: #b5b5ad;
    --gold: #d4af37;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --gold-dim: rgba(212, 175, 55, 0.15);
    --glass-bg: rgba(15, 14, 12, 0.65);
    --glass-border: rgba(212, 175, 55, 0.12);
    --glass-shadow: rgba(0, 0, 0, 0.6);
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
    --transition-slow: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-medium: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-sans);
    font-size: 16px;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.7;
    position: relative;
    background: radial-gradient(circle at 50% 50%, var(--bg-warm-dark) 0%, var(--bg-dark) 100%);
}

/* Background Gradients */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: linear-gradient(135deg, #070707, #13100c, #070707, #191610);
    background-size: 400% 400%;
    animation: gradientMove 20s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particles Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease-out;
}

/* Loading Overlay */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 1px solid transparent;
    border-top: 1px solid var(--gold);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    position: relative;
}

.loader-spinner::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid transparent;
    border-top: 1px solid var(--text-muted);
    border-radius: 50%;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Music Toggle Control */
.music-toggle-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 100;
    display: none; /* Shown after unlock */
}

.music-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gold);
    box-shadow: 0 4px 15px var(--glass-shadow);
    transition: var(--transition-medium);
}

.music-btn:hover {
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-glow);
    transform: scale(1.05);
}

.music-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: var(--transition-medium);
}

/* Visual music bars animation */
.music-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    width: 14px;
    height: 14px;
}

.music-bar {
    width: 2px;
    height: 100%;
    background-color: var(--gold);
    animation: bounceBar 1.2s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.music-bar:nth-child(2) { animation-delay: 0.2s; }
.music-bar:nth-child(3) { animation-delay: 0.4s; }

body.music-playing .music-bar {
    animation-play-state: running;
}

@keyframes bounceBar {
    0% { height: 20%; }
    100% { height: 100%; }
}

/* Password Gate Screen */
#password-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 50% 50%, var(--bg-warm-dark) 0%, var(--bg-dark) 100%);
    padding: 20px;
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1), visibility 1.2s;
}

.gate-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    padding: 50px 40px;
    border-radius: 20px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 0 15px 35px var(--glass-shadow);
    transform: translateY(0);
    animation: cardFloat 6s ease-in-out infinite;
}

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

.gate-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 300;
    margin-bottom: 10px;
    letter-spacing: 2px;
    color: var(--text-light);
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.gate-subtitle {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.password-input-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.password-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 14px 20px;
    border-radius: 30px;
    text-align: center;
    font-size: 1rem;
    letter-spacing: 3px;
    transition: var(--transition-medium);
    outline: none;
}

.password-input:focus {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.gate-btn {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.2));
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 14px 35px;
    border-radius: 30px;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 400;
    transition: var(--transition-medium);
    width: 100%;
}

.gate-btn:hover {
    background: var(--gold);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--gold-glow);
    transform: translateY(-2px);
}

.error-msg {
    color: #e35f5f;
    font-size: 0.8rem;
    margin-top: 15px;
    letter-spacing: 1px;
    opacity: 0;
    height: 0;
    transition: var(--transition-medium);
}

.error-msg.visible {
    opacity: 1;
    height: auto;
}

/* Main Content Layout */
#main-content {
    display: none;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

/* Animations Trigger Classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
#hero {
    height: 100vh;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-wrapper {
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.25;
    margin-bottom: 25px;
    color: var(--text-light);
    letter-spacing: 1px;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 50px auto;
    line-height: 1.8;
}

.cta-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--text-light);
    padding: 16px 40px;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: var(--transition-medium);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: var(--transition-medium);
}

.cta-btn:hover {
    color: var(--bg-dark);
    box-shadow: 0 0 25px var(--gold-glow);
    transform: translateY(-3px);
}

.cta-btn:hover::before {
    width: 300px;
    height: 300px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition-medium);
}

.scroll-indicator:hover {
    opacity: 1;
    color: var(--gold);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, var(--gold), transparent);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: var(--text-light);
    animation: scrollScroll 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

@keyframes scrollScroll {
    0% { transform: translateY(-100%); }
    80% { transform: translateY(330%); }
    100% { transform: translateY(330%); }
}

/* About Her Section */
.section-header {
    text-align: center;
    margin-bottom: 70px;
    max-width: 600px;
}

.section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--gold);
    margin-bottom: 10px;
    display: block;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
}

.about-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--glass-shadow);
    transition: var(--transition-medium);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(212, 175, 55, 0.05);
}

.about-card:hover::before {
    transform: translateX(100%);
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gold);
    margin-bottom: 25px;
    border: 1px solid var(--gold-dim);
}

.card-icon svg {
    width: 20px;
    height: 20px;
}

.card-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 15px;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 300;
}

/* My Feelings Letter Section */
.letter-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    max-width: 750px;
    width: 100%;
    padding: 60px 50px;
    border-radius: 20px;
    box-shadow: 0 20px 45px var(--glass-shadow);
    position: relative;
}

.letter-container::after {
    content: '';
    position: absolute;
    bottom: 25px;
    right: 25px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.letter-greeting {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-style: italic;
    color: var(--gold);
    margin-bottom: 30px;
}

.letter-body {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.95;
    font-weight: 300;
    color: var(--text-light);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.letter-body p {
    margin-bottom: 25px;
    text-indent: 20px;
}

.letter-body p:first-of-type {
    text-indent: 0;
}

.letter-signature {
    margin-top: 40px;
    text-align: right;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--text-muted);
}

.letter-signature span {
    display: block;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 5px;
    color: var(--gold);
}

/* Dua Section */
#dua {
    position: relative;
    overflow: hidden;
}

.moon-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.moon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fffef8 20%, #f4dfa2 60%, #c4a141 100%);
    box-shadow: 0 0 50px 10px rgba(244, 223, 162, 0.35), 0 0 100px 30px rgba(244, 223, 162, 0.1);
    position: relative;
    animation: moonPulse 8s ease-in-out infinite alternate;
}

@keyframes moonPulse {
    0% { transform: scale(1); box-shadow: 0 0 40px 5px rgba(244, 223, 162, 0.3); }
    100% { transform: scale(1.03); box-shadow: 0 0 60px 15px rgba(244, 223, 162, 0.45); }
}

.dua-box {
    text-align: center;
    max-width: 800px;
    background: rgba(15, 14, 12, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.08);
    backdrop-filter: blur(8px);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.03);
}

.dua-title {
    font-size: 0.85rem;
    letter-spacing: 5px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 25px;
    font-weight: 400;
}

.dua-text {
    font-family: var(--font-serif);
    font-size: 2.1rem;
    line-height: 1.6;
    font-style: italic;
    color: var(--text-light);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 10px;
}

.dua-translation {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-top: 15px;
}

/* Future Promise Section */
.timeline-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 40px auto 0 auto;
    padding-left: 30px;
}

.timeline-line {
    position: absolute;
    left: 9px;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--gold-dim), var(--gold) 30%, var(--gold) 70%, var(--gold-dim));
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    opacity: 0;
    transform: translateX(-20px);
    transition: var(--transition-slow);
}

.timeline-item.active {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -30px;
    top: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--gold);
    z-index: 2;
    transition: var(--transition-medium);
}

.timeline-item:hover .timeline-dot {
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
    transform: scale(1.1);
}

.timeline-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--glass-shadow);
    transition: var(--transition-medium);
}

.timeline-content:hover {
    border-color: rgba(212, 175, 55, 0.25);
    box-shadow: 0 12px 30px rgba(0,0,0,0.7);
}

.timeline-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--gold);
    margin-bottom: 10px;
}

.timeline-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
}

/* Final Message Section */
.final-wrapper {
    text-align: center;
    max-width: 700px;
}

.final-quote {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    line-height: 1.4;
    font-weight: 300;
    margin-bottom: 50px;
    color: var(--text-light);
}

/* Ending Scene Overlay */
#ending-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 9999;
    display: none;
    opacity: 0;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    transition: opacity 4s cubic-bezier(0.25, 1, 0.5, 1);
}

#rain-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.ending-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 650px;
}

.ending-text {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 3s ease-out;
}

.ending-text.show {
    opacity: 1;
    transform: translateY(0);
}

/* Audio Fallback Warning (Non-intrusive Console notification) */
/* Custom adjustments for UI Elements */

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .gate-card {
        padding: 40px 25px;
    }
    
    .gate-title {
        font-size: 1.8rem;
    }
    
    .hero-title {
        font-size: 2.4rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .about-card {
        padding: 30px 25px;
    }
    
    .letter-container {
        padding: 40px 25px;
    }
    
    .letter-greeting {
        font-size: 1.5rem;
    }
    
    .letter-body {
        font-size: 1.15rem;
    }
    
    .dua-text {
        font-size: 1.6rem;
    }
    
    .timeline-container {
        padding-left: 25px;
    }
    
    .final-quote {
        font-size: 1.8rem;
    }
    
    .ending-text {
        font-size: 1.6rem;
    }

    .music-toggle-container {
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 60px 15px;
    }
    
    .timeline-content {
        padding: 20px;
    }
}
