:root {
    --platinum-950: #0A0F1C;
    --platinum-900: #101826;
    --platinum-800: #131C2E;
    --platinum-gold: #D4AF37;
    --glow-gold: #F6D365;
    --glow-blue: #3A86FF;
    --text-primary: #F5F7FA;
    --text-secondary: #9BA6B2;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --font-main: 'Inter', sans-serif;
    --font-accent: 'Playfair Display', serif;
}

body {
    background-color: var(--platinum-950);
    color: var(--platinum-50);
    font-family: var(--font-sans);
    overflow-x: hidden;
    margin: 0;
}

/* Premium Background - Only Flows and Glows */
#global-animation-container {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.bg-glow-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(31, 111, 255, 0.05) 0%, transparent 70%),
        linear-gradient(to bottom, rgba(5, 10, 15, 0.4) 0%, rgba(5, 10, 15, 0.9) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Main Layout */
.wallpaper-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 10;
}

/* Header Adjustments - More Minimal */
.gallery-header {
    padding: 0 10%;
    margin-bottom: 2rem;
    pointer-events: none;
    text-align: center;
}

.gallery-header h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.03em;
    opacity: 0.8;
}

.gallery-header p {
    font-size: 1rem;
    color: var(--platinum-300);
    font-weight: 300;
    max-width: 450px;
    margin: 0.5rem auto 0;
    opacity: 0.6;
    line-height: 1.6;
}

/* Horizontal Gallery Container */
.gallery-viewport {
    width: 100%;
    overflow: hidden;
    padding: 2vh 0;
    cursor: grab;
    scroll-behavior: auto;
    /* Dynamic control via JS */
}

.gallery-viewport.active {
    cursor: grabbing;
}

.gallery-container {
    display: flex;
    gap: 8rem;
    /* Wide gap for premium spacing */
    padding: 0 15%;
    /* Large side padding */
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.gallery-viewport:active {
    cursor: grabbing;
}

/* Premium Image Card - Smaller and More Stylish */
.wallpaper-card {
    flex: 0 0 40vw;
    /* Even smaller for a multi-card gallery feel */
    max-width: 800px;
    aspect-ratio: 16 / 10;
    position: relative;
    border-radius: 18px;
    /* Strict 18px radius */
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: var(--platinum-800);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0.7;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1280px) {
    .wallpaper-card {
        flex: 0 0 55vw;
    }

    .gallery-container {
        padding: 0 10%;
    }
}

@media (max-width: 768px) {
    .wallpaper-card {
        flex: 0 0 85vw;
        border-radius: 2.5rem;
    }

    .gallery-container {
        gap: 3rem;
        padding: 0 5%;
    }
}

.wallpaper-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 2.5s cubic-bezier(0.16, 1, 0.3, 1);
    filter: saturate(0.8) brightness(0.8);
    /* Slightly muted for premium feel */
}

.wallpaper-card:hover {
    border-color: var(--platinum-gold);
    opacity: 1;
}

.wallpaper-card:hover img {
    filter: saturate(1.1) brightness(1);
}

/* Elegant Overlay */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 4rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.wallpaper-card:hover .card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.card-info h3 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    color: #fff;
    letter-spacing: -0.02em;
}

.card-info p {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.6em;
    color: var(--electric-400);
    margin-bottom: 2.5rem;
    font-weight: 800;
    opacity: 0.7;
}

.card-actions {
    display: flex;
    gap: 1.5rem;
}

.btn-preview,
.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    /* Full capsules */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.btn-preview {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-preview:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-download {
    background: var(--platinum-gold);
    color: #fff;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.btn-download:hover {
    background: var(--glow-gold);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    backdrop-filter: blur(40px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    max-width: 100%;
    max-height: 100%;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-content img {
    max-width: 90vw;
    max-height: 70vh;
    border-radius: 2rem;
    box-shadow: 0 60px 120px rgba(0, 0, 0, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-close {
    position: absolute;
    top: -5rem;
    right: 0;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* Utilities */
.text-electric {
    color: var(--electric-400);
}

/* Animation Utils */
.fade-in {
    opacity: 0;
    animation: fadeIn 2s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}