:root {
    --bg-light: #e6e6fa; /* Lavender */
    --bg-pink: #d8bfd8; /* Thistle */
    --bg-lavender: #dda0dd; /* Plum */
    --bg-blue: #ba55d3; /* Medium Orchid */
    --title-color: #4b0082; /* Indigo */
    --btn-border: #9370db; /* Medium Purple */
    --text-dark: #2d2d2d;
    --text-light: #ffffff;
    --accent: #ff1493; /* Deep Pink */
    --glass-bg: rgba(216, 191, 216, 0.4); /* Tinted Thistle */
    --glass-border: rgba(221, 160, 221, 0.6);
    --shadow-soft: 0 10px 30px rgba(75, 0, 130, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background: linear-gradient(-45deg, var(--bg-light), var(--bg-pink), var(--bg-lavender), var(--bg-blue));
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
    color: var(--text-dark);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--accent), var(--gold-light));
    border-radius: 5px;
}

/* Entry Screen */
#entry-screen {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    cursor: pointer;
    transition: opacity 1.5s ease-out;
}

.entry-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    color: var(--title-color);
    opacity: 0;
    animation: fadeInText 3s ease forwards 0.5s;
    text-align: center;
}

.click-hint {
    margin-top: 30px;
    font-size: 1rem;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0;
    animation: pulseHint 2s infinite, fadeInText 2s ease forwards 2s;
}

@keyframes fadeInText {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseHint {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Background Effects */
#sparkle-container, #hearts-container, #balloons-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
}

#confetti-canvas {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 10001; /* Above everything */
}

.sparkle {
    position: absolute;
    width: 6px; height: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--gold);
    animation: sparkleFade 1s forwards;
}

@keyframes sparkleFade {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

.heart, .balloon {
    position: absolute;
    font-size: 24px;
    animation: floatUp 8s linear infinite;
    opacity: 0.7;
    filter: drop-shadow(0 0 5px rgba(255, 182, 193, 0.5));
}

@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0.8) rotate(-10deg); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100px) scale(1.2) rotate(10deg); opacity: 0; }
}

/* Luxury Button */
.luxury-btn {
    background: rgba(255,255,255,0.3);
    color: var(--title-color);
    border: 2px solid var(--title-color);
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 20px rgba(59, 9, 68, 0.15);
    margin: 10px;
}

.luxury-btn:hover {
    background: var(--title-color);
    color: #fff;
    box-shadow: 0 15px 30px rgba(59, 9, 68, 0.3);
    transform: translateY(-3px);
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 20px;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: -5%; left: -5%; width: 110%; height: 110%;
    background: linear-gradient(-45deg, var(--bg-light), var(--bg-pink), var(--bg-lavender), var(--bg-blue));
    background-size: cover;
    background-position: center;
    animation: slowZoom 30s infinite alternate;
    z-index: 1;
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.hero-blur-lights {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(230,230,250,0.3) 0%, rgba(216,191,216,0.7) 100%);
    backdrop-filter: blur(6px);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 50px;
    background: rgba(230, 230, 250, 0.6); /* Soft Lavender */
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(221, 160, 221, 0.8);
    box-shadow: 0 30px 60px rgba(75, 0, 130, 0.2);
}

h1.animate-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    color: var(--title-color);
    margin-bottom: 10px;
}

h1.animate-title span {
    color: var(--accent);
}

p.animate-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 30px;
}

/* Scroll Animations */
.hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.elegant-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 3rem;
    text-align: center;
    color: var(--title-color);
    margin-bottom: 60px;
}

/* Collage Grid */
.collage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: 20px;
}

.collage-item {
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transition: transform 0.5s ease;
    border: 5px solid #fff;
}

.collage-item:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.3);
}

.item-1 { grid-column: 1 / 3; grid-row: 1 / 2; }
.item-2 { grid-column: 3 / 4; grid-row: 1 / 3; }
.item-3 { grid-column: 1 / 2; grid-row: 2 / 3; }
.item-4 { grid-column: 2 / 3; grid-row: 2 / 3; }
.item-5 { display: none; } /* Backup item depending on grid */

/* Messages */
.glass-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 3px solid #c0c0c0; /* Silver base */
    padding: 50px 30px;
    border-radius: 25px; /* Softer, more beautiful curves */
    font-size: 1.3rem;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    line-height: 1.8;
    text-align: center;
    color: var(--text-dark);
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.4), inset 0 0 10px rgba(192, 192, 192, 0.2);
    transition: transform 0.5s ease;
    animation: silverShine 3s infinite alternate;
}

@keyframes silverShine {
    0% {
        border-color: #c0c0c0;
        box-shadow: 0 0 10px rgba(192,192,192,0.4), inset 0 0 10px rgba(192,192,192,0.2);
    }
    100% {
        border-color: #ffffff;
        box-shadow: 0 0 25px rgba(255,255,255,0.9), inset 0 0 20px rgba(255,255,255,0.7);
    }
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(75, 0, 130, 0.3), 0 0 30px rgba(255,255,255,0.8);
    background: rgba(221, 160, 221, 0.6); /* Thistle hover */
}

/* Scratch Card */
#scratch-card-section {
    background: linear-gradient(135deg, rgba(216, 191, 216, 0.8), rgba(230, 230, 250, 0.8));
    padding: 100px 0;
}

.luxury-scratch-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 300px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(75, 0, 130, 0.3);
    background: #e6e6fa; /* Lavender */
    border: 8px solid #dda0dd; /* Plum */
}

.scratch-content {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #e6e6fa; /* Lavender */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
}

.scratch-content h2 {
    font-family: 'Cormorant Garamond', serif;
    color: var(--title-color);
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.scratch-content p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 10px;
}

.scratch-content .love-text {
    font-weight: 600;
    color: var(--accent);
    font-size: 1.3rem;
}

canvas#scratch-canvas {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2;
    cursor: grab;
    border-radius: 8px;
}
canvas#scratch-canvas:active { cursor: grabbing; }

.scratch-hint {
    text-align: center;
    margin-top: 25px;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--title-color);
    animation: pulseHint 2s infinite;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--gold-light);
    top: 0; bottom: 0; left: 50%;
    margin-left: -2px;
    border-radius: 4px;
}

.timeline-item {
    padding: 20px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    right: -10px;
    background-color: var(--gold);
    border: 4px solid #fff;
    top: 40px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--gold-glow);
}

.left { left: 0; }
.right { left: 50%; }

.left::after { right: -10px; }
.right::after { left: -10px; }

.timeline-content {
    padding: 20px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--glass-border);
}

.timeline-content h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: var(--gold-dark);
    margin-bottom: 15px;
}

.timeline-img {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Friendship Carousel */
.friendship-carousel {
    width: 100%;
    max-width: 900px;
    height: 500px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(75, 0, 130, 0.15);
    background: rgba(221, 160, 221, 0.4); /* Plum */
    padding: 10px;
    border: 2px solid #ba55d3;
}

.friendship-carousel .swiper-slide {
    background: #e6e6fa; /* Lavender */
    border-radius: 15px;
    overflow: hidden;
}

.friendship-carousel .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.swiper-pagination-bullet { background: var(--gold) !important; }

/* Final Wish */
.text-center { text-align: center; }

.dreamy-glow-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    color: var(--title-color);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

.mt-5 { margin-top: 50px; }

/* Responsive */
@media (max-width: 768px) {
    h1.animate-title { font-size: 2.5rem; }
    p.animate-subtitle { font-size: 0.9rem; }
    .elegant-title { font-size: 2rem; }
    .dreamy-glow-text { font-size: 2rem; }
    .friendship-carousel { height: 350px; }
    .scratch-content h2 { font-size: 1.6rem; }
    .collage-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .collage-item { height: 250px; }
    .item-1, .item-2, .item-3, .item-4 { grid-column: 1; grid-row: auto; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item::after { left: 21px; }
    .right { left: 0%; }
}
