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

html,
body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    font-size: clamp(14px, 1.5vw, 16px);
}

html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #121212;
    color: #f0e9e0;
    cursor: default;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-heading {
    font-family: 'Cormorant Garamond', serif;
}

.font-script {
    font-family: 'Great Vibes', cursive;
    line-height: 1.3 !important;
}

.text-gold-gradient {
    background: linear-gradient(145deg, #F0E6D2, #C8B6A6, #B8956C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

/* Music Player Styles */
#music-player {
    transition: all 0.3s ease;
}

#music-player.playing {
    animation: pulse 2s infinite;
}

#play-pause-btn {
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: manipulation;
}

#play-pause-btn:active {
    transform: scale(0.95);
}

#play-pause-btn.processing {
    pointer-events: none;
    opacity: 0.8;
}

#play-pause-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
    border-color: rgba(197, 164, 126, 0.5);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(197, 164, 126, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(197, 164, 126, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(197, 164, 126, 0);
    }
}

.glass-card {
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.3);
}

#video-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -3;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.85);
    z-index: -2;
}

.pattern-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://w7.pngwing.com/pngs/373/43/png-transparent-brown-floral-baroque-ornament-gold-decorative-arts-gold-chemical-element-text-decor.png');
    opacity: 0.03;
    z-index: -1;
}

#couple,
#gift,
#hero-header,
#details {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

#couple {
    background-image: linear-gradient(rgba(18, 18, 18, 0.92), rgba(18, 18, 18, 0.92)), url('https://images.unsplash.com/photo-1519741497674-611481863552?q=80&w=2070&auto=format&fit=crop');
}

#gift {
    background-image: linear-gradient(rgba(18, 18, 18, 0.35), rgba(18, 18, 18, 0.90));
}

@media (max-width: 768px) {
    #couple,
    #gift,
    #hero-header,
    #details {
        background-attachment: scroll;
    }
}

.preloader-hidden {
    animation: fadeOut 1s forwards;
}

.playing #play-pause-btn {
    animation: spin 8s linear infinite;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.scrolling-column-up {
    animation: scroll-up 60s linear infinite;
}

.scrolling-column-down {
    animation: scroll-down 60s linear infinite;
}

.scrolling-row-left {
    animation: scroll-left 60s linear infinite;
}

.scrolling-row-right {
    animation: scroll-right 60s linear infinite;
}

#bottom-nav {
    transform: translateY(200%);
    transition: transform 0.5s ease-in-out;
}

#bottom-nav.show {
    transform: translateY(0);
}

.nav-link.active i, .nav-link.active span {
   color: #c5a47e;
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes scroll-up {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes scroll-down {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(0); }
}

@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes scroll-right {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

/* Lazy Loading Styles */
img[loading="lazy"] {
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"]:not([src]) {
    opacity: 0;
}

img[loading="lazy"][src] {
    opacity: 1;
}

/* Loading placeholder effect */
.gallery-item {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    min-height: 200px;
}

.gallery-item[src] {
    background: none;
    animation: none;
    min-height: auto;
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Mobile gallery items */
@media (max-width: 768px) {
    .gallery-item {
        min-height: 120px;
    }
}
