:root {
    --primary-color: #d8b4e2; /* Soft purple */
    --secondary-color: #ffb6c1; /* Light pink */
    --peach: #ffdac1;
    --cream: #fff5e6;
    --lavender: #e2d1f9;
    --text-color: #5d4a66;
    --bg-gradient: linear-gradient(135deg, var(--cream) 0%, var(--lavender) 50%, var(--peach) 100%);
    --font-main: 'Outfit', sans-serif;
    --font-heading: 'Dancing Script', cursive;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow-x: hidden;
    position: relative;
}

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

/* Glassmorphism Navigation */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    padding: 10px 30px;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.glass-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.glass-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.glass-nav a:hover {
    color: #926b9e;
}

/* Music Button */
.music-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 100;
    transition: transform 0.3s, background 0.3s;
    outline: none;
}

.music-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.9);
}

.music-btn.playing i {
    animation: bounceMusic 1.5s ease-in-out infinite;
}

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

/* Base Sections */
section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    position: relative;
    z-index: 10;
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 50px;
    text-align: center;
    max-width: 800px;
}

/* Hero */
.main-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: #8c5b96;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.05);
}

.highlight {
    color: #d175b7;
    font-size: 4.5rem;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 40px;
}

.scroll-down {
    margin-top: 30px;
    font-size: 0.9rem;
    color: #888;
}

.blink {
    display: block;
    margin-top: 10px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(10px); }
}

/* Gallery Section */
.section-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: #8c5b96;
    margin-bottom: 50px;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1100px;
    width: 100%;
}

.polaroid {
    background: #fff;
    padding: 15px 15px 30px 15px;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transform: rotate(calc(-3deg + 6deg * var(--rand, 0)));
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    position: relative;
}

.polaroid:nth-child(even) { --rand: 1; }
.polaroid:nth-child(odd) { --rand: 0; }
.polaroid:nth-child(3n) { --rand: 0.5; }

.polaroid:hover {
    transform: scale(1.05) rotate(0deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    z-index: 2;
}

.img-container {
    width: 100%;
    height: 300px;
    background: #eee;
    overflow: hidden;
    border-radius: 5px;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.polaroid:hover .img-container img {
    transform: scale(1.08);
}

.caption {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-align: center;
    margin-top: 15px;
    color: #666;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: zoomIn 0.4s ease;
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #5d4a66;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.close-lightbox:hover {
    color: #8c5b96;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Letter Section */
.letter-card {
    max-width: 700px;
    text-align: left;
    position: relative;
    padding: 60px;
}

.letter-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #d175b7;
    margin-bottom: 30px;
    text-align: center;
}

.letter-body p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Final Section */
.closing-card {
    background: rgba(255, 255, 255, 0.7);
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.closing-card h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #8c5b96;
    margin-bottom: 20px;
}

.closing-card p {
    font-size: 1.5rem;
    color: #666;
}

.sparkle-icon {
    font-size: 2rem;
    margin-top: 20px;
    animation: float 3s ease-in-out infinite;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    font-size: 1rem;
    color: #888;
    background: rgba(255, 255, 255, 0.3);
}

/* Floating Elements Generator */
.background-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -50px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    animation: floatUp linear infinite;
}

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

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

/* Fade in animation classes for scroll */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s ease;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-title { font-size: 3rem; }
    .highlight { font-size: 3.5rem; }
    .glass-card { padding: 30px; margin: 0 15px; }
    .letter-card { padding: 40px 20px; }
    .section-title { font-size: 2.5rem; }
    .closing-card { margin: 0 20px; padding: 40px 20px; }
    .closing-card h2 { font-size: 2.2rem; }
    .polaroid { margin: 0 15px; }
}
