/* Color Palette & Variables - Premium Blue & Green Mix */
:root {
    --bg-color: #02090a; /* Very deep dark cyan/black */
    --text-primary: #f0fdfa; /* Mint ice */
    --text-secondary: #99f6e4; /* Vibrant cyan/mint */
    
    /* The Mix of Green and Blue */
    --accent-green: #10b981; /* Emerald */
    --accent-blue: #0ea5e9; /* Light Blue */
    --accent-gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    --accent-glow: rgba(16, 185, 129, 0.4);
    --accent-blue-glow: rgba(14, 165, 233, 0.4);
    
    /* Premium Glassmorphism */
    --card-bg: rgba(15, 35, 40, 0.35);
    --card-border: rgba(16, 185, 129, 0.25);
    --card-blur: blur(20px);
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
}

/* Interactive Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

/* Ambient Deep Glows */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -20%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, var(--accent-blue-glow) 0%, transparent 60%);
    z-index: -1;
    filter: blur(80px);
    animation: pulseGlow 15s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -20%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    z-index: -1;
    filter: blur(80px);
    animation: pulseGlow 20s ease-in-out infinite alternate-reverse;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.5; }
    50% { transform: scale(1.2) translate(5vw, 5vh); opacity: 0.8; }
    100% { transform: scale(0.9) translate(-5vw, -5vh); opacity: 0.5; }
}


/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.emoji {
    -webkit-text-fill-color: initial;
    -webkit-background-clip: initial;
    background: none;
    display: inline-block;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(3rem, 7vw, 6rem);
    letter-spacing: -1px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px var(--accent-glow));
    margin-bottom: 20px;
}

/* Initial Load Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    animation: fadeInUp 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s;
}

.fade-in-delayed {
    opacity: 0;
    animation: fadeIn 2s ease-out forwards 1.5s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.chevron {
    width: 24px;
    height: 8px;
    opacity: 0;
    transform: scale(0.3);
    animation: move-chevron 3s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.chevron:first-child { animation-delay: 1s; }
.chevron:nth-child(2) { animation-delay: 2s; }

.chevron:before, .chevron:after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 51%;
    background: var(--accent-gradient);
    border-radius: 4px;
}

.chevron:before { left: 0; transform: skewY(30deg); }
.chevron:after { right: 0; width: 50%; transform: skewY(-30deg); }

@keyframes move-chevron {
    25% { opacity: 1; transform: translateY(5px) scale(0.9); }
    33% { opacity: 1; transform: translateY(10px) scale(1); filter: drop-shadow(0 0 8px var(--accent-green)); }
    67% { opacity: 1; transform: translateY(15px) scale(1); }
    100% { opacity: 0; transform: translateY(25px) scale(0.5); }
}

/* ==========================================================================
   The Journey Section (Timeline)
   ========================================================================== */
.journey-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px;
    display: flex;
    flex-direction: column;
    gap: 180px;
    position: relative;
}

/* Glowing Timeline */
.journey-section::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent-blue), var(--accent-green), var(--accent-blue), transparent);
    transform: translateX(-50%);
    opacity: 0.5;
    z-index: -1;
    box-shadow: 0 0 15px var(--accent-blue);
}

@media (max-width: 768px) {
    .journey-section::before { display: none; }
}

.memory-card {
    display: flex;
    align-items: center;
    gap: 80px;
    opacity: 0;
    transform: translateY(100px) scale(0.9);
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.memory-card.reverse { flex-direction: row-reverse; }

.memory-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stunning Photo Display */
.memory-photo {
    flex: 1;
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 1px 1px rgba(255,255,255,0.1);
    transform: perspective(1000px) rotateY(0deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
}

.memory-photo::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--accent-gradient);
    z-index: -1;
    border-radius: 32px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.memory-card:hover .memory-photo {
    box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 40px var(--accent-glow);
}

.memory-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 2s cubic-bezier(0.16, 1, 0.3, 1);
}

.memory-card:hover .memory-photo img {
    transform: scale(1.1);
}

.placeholder-img {
    color: var(--text-secondary);
    font-style: italic;
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 9, 10, 0.8), transparent 50%);
    pointer-events: none;
}

/* Premium 3D Text Card */
.memory-text {
    flex: 1;
    padding: 50px 40px;
    background: var(--card-bg);
    backdrop-filter: var(--card-blur);
    -webkit-backdrop-filter: var(--card-blur);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.1);
    transform-style: preserve-3d;
}

.memory-text h2 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-style: italic;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: translateZ(30px); /* 3D pop */
}

.memory-date {
    display: inline-block;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 5px;
    transform: translateZ(20px);
}

.memory-text p {
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.9;
    transform: translateZ(25px);
}

/* ==========================================================================
   Final Note Section
   ========================================================================== */
.final-section {
    padding: 200px 20px;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.final-section.visible { opacity: 1; transform: translateY(0); }

.final-content h2 {
    font-size: 4.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 15px var(--accent-glow));
}

.final-content p {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.magic-btn {
    background: rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid var(--accent-green);
    padding: 18px 60px;
    font-size: 1.2rem;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.magic-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--accent-gradient);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.magic-btn:hover {
    box-shadow: 0 0 40px var(--accent-glow);
    transform: translateY(-5px) scale(1.05);
    border-color: transparent;
}

.magic-btn:hover::before { opacity: 1; }

/* ==========================================================================
   Floating Magic Animation with Drift
   ========================================================================== */
#heartsContainer {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 9999;
}

.heart {
    position: absolute;
    bottom: -10vh;
    animation: floatDrift linear forwards;
    opacity: 0;
    filter: drop-shadow(0 0 15px currentColor);
}

@keyframes floatDrift {
    0% { transform: translate(0, 0) scale(0.5) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translate(var(--drift), -120vh) scale(1.8) rotate(720deg);
        opacity: 0;
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 900px) {
    .journey-section { gap: 80px; padding: 80px 20px; }
    .memory-card, .memory-card.reverse { flex-direction: column; gap: 30px; }
    .memory-text { padding: 40px 30px; }
    .memory-text h2 { font-size: 2.2rem; }
    .final-content h2 { font-size: 3rem; }
}

/* Auth / Admin Pages Glassmorphism Alignment */
.login-card, .form-card, .memory-item {
    background-color: var(--card-bg);
    backdrop-filter: var(--card-blur);
    -webkit-backdrop-filter: var(--card-blur);
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.1);
}