/* ========================================
   PREMIUM WALLPAPER GALLERY - REDESIGN
   ======================================== */

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff2e63, #ff6b9d);
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff6b9d, #ff2e63);
}

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

html,
body {
    height: auto;
    width: 100%;
}

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a14 50%, #0a0a0a 100%);
    background-attachment: fixed;
    color: #ffffff;
    overflow-x: hidden;
    cursor: default;
    position: relative;
}

/* Animated gradient overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 46, 99, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 191, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* === CANVAS BACKGROUND === */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.7;
    pointer-events: none;
    filter: blur(0.5px);
}

/* === LOADER === */
#loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #000000 0%, #1a0a14 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

.loader-text {
    overflow: hidden;
    color: #fff;
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: 0.3em;
    text-shadow: 0 0 30px rgba(255, 46, 99, 0.5);
    animation: loaderPulse 2s ease-in-out infinite;
}

@keyframes loaderPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.loader-line {
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #ff2e63, #ff6b9d, #ff2e63);
    background-size: 200% 100%;
    position: absolute;
    bottom: 45%;
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(255, 46, 99, 0.8);
    animation: shimmer 2s linear infinite;
}

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

    100% {
        background-position: 200% 0;
    }
}

/* === NAVIGATION === */
.nav-glass {
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 46, 99, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.nav-glass:hover {
    background: rgba(5, 5, 5, 0.85);
    border-bottom-color: rgba(255, 46, 99, 0.3);
}

/* === MENU OVERLAY === */
#menuOverlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.98) 0%, rgba(26, 10, 20, 0.98) 100%);
    backdrop-filter: blur(30px);
}

/* === 3D CARDS === */
.card-3d-wrapper {
    perspective: 1500px;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.card-3d-wrapper:hover {
    transform: translateY(-8px);
}

.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    will-change: transform;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.card-3d::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 46, 99, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.card-3d:hover::before {
    opacity: 1;
}

.card-3d:hover {
    box-shadow:
        0 20px 60px rgba(255, 46, 99, 0.3),
        0 0 0 1px rgba(255, 46, 99, 0.3),
        inset 0 0 60px rgba(255, 46, 99, 0.05);
}

.card-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 20;
}

/* === HERO SECTION === */
.perspective-text {
    transform-style: preserve-3d;
}

.text-stroke {
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.2);
    text-shadow:
        0 0 40px rgba(255, 46, 99, 0.5),
        0 0 80px rgba(255, 46, 99, 0.3);
}

/* === LIGHTBOX === */
#lightbox {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(40px) saturate(150%);
}

#lightboxImg {
    border-radius: 8px;
    box-shadow:
        0 0 100px rgba(255, 46, 99, 0.4),
        0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* === BUTTONS & INTERACTIONS === */
button,
a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover,
a:hover {
    transform: translateY(-2px);
}

button:active,
a:active {
    transform: translateY(0);
}

/* === MENU GRID ITEMS === */
#menuGrid button {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuGrid button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 46, 99, 0.1), rgba(138, 43, 226, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

#menuGrid button:hover::before {
    opacity: 1;
}

#menuGrid button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 10px 30px rgba(255, 46, 99, 0.3),
        0 0 0 1px rgba(255, 46, 99, 0.5);
}

/* === DOWNLOAD BUTTON === */
#downloadBtn {
    position: relative;
    overflow: hidden;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff2e63, #ff6b9d);
    box-shadow: 0 10px 30px rgba(255, 46, 99, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#downloadBtn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ff6b9d, #ff2e63);
    opacity: 0;
    transition: opacity 0.4s ease;
}

#downloadBtn:hover::before {
    opacity: 1;
}

#downloadBtn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 46, 99, 0.6);
}

/* === FOOTER === */
footer {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    backdrop-filter: blur(20px);
}

footer a {
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff2e63, #ff6b9d);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

footer a:hover::after {
    width: 100%;
}

/* === MENU SCROLL === */
.menu-scroll-area {
    -webkit-overflow-scrolling: touch;
}

.menu-scroll-area::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 46, 99, 0.5), rgba(255, 107, 157, 0.5));
}

/* === RESPONSIVE ENHANCEMENTS === */
@media (max-width: 768px) {
    .loader-text {
        font-size: 1.5rem;
    }

    .card-3d-wrapper:hover {
        transform: none;
    }
}

/* === ANIMATIONS === */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

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

/* === GLOW EFFECTS === */
.glow-brand {
    box-shadow: 0 0 20px rgba(255, 46, 99, 0.5);
}

.glow-brand-strong {
    box-shadow:
        0 0 30px rgba(255, 46, 99, 0.6),
        0 0 60px rgba(255, 46, 99, 0.4);
}