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

:root {
    --accent-color: #e91e63;
    --accent-glow: rgba(233, 30, 99, 0.5);
    --bg-dark: #0a0a0f;
    --card-bg: rgba(255, 255, 255, 0.01);
    --card-border: rgba(255, 255, 255, 0.1);
    
    /* Responsive Variables */
    --card-width: 380px;
    --card-height: 240px;
    --pillar-width: 200px;
    --shard-width: 40px;
}

@media (max-width: 768px) {
    :root {
        --card-width: 280px;
        --card-height: 180px;
        --pillar-width: 100px;
        --shard-width: 20px;
    }
}

@media (max-width: 480px) {
    :root {
        --card-width: 220px;
        --card-height: 140px;
        --pillar-width: 80px; 
        --shard-width: 15px;
    }
    
    /* Strict Performance Mode for Mobile */
    .card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(30, 30, 35, 0.95) !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5) !important;
        border-radius: 20px !important;
    }
    
    .card video {
        border-radius: 20px !important;
    }

    /* Disable expensive decorative elements */
    #particles, .bg-dots {
        display: none !important;
    }

    .scene {
        background: #000 !important; /* Pure black for performance */
    }
}

/* Helper for JS-detected mobile */
body.is-mobile {
    cursor: auto !important;
}
body.is-mobile #cursor-dot, 
body.is-mobile #cursor-outline {
    display: none !important;
}

body {
    background: var(--bg-dark);
    color: white;
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor for custom cursor */
}

/* Custom Cursor Styles */
#cursor-dot, #cursor-outline {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    transition: transform 0.15s ease-out, opacity 0.3s ease;
}

#cursor-dot {
    width: 6px; height: 6px;
    background-color: var(--accent-color);
}

#cursor-outline {
    width: 30px; height: 30px;
    border: 2px solid var(--accent-color);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

#cursor-outline.hover {
    width: 60px; height: 60px;
    background-color: rgba(233, 30, 99, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 1024px) {
    body { cursor: auto; }
    #cursor-dot, #cursor-outline { display: none; }
}

/* Back Button Styles */
.back-to-home {
    position: fixed;
    top: 30px; left: 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.back-to-home:hover {
    background: rgba(233, 30, 99, 0.15);
    border-color: var(--accent-color);
    color: #fff;
    transform: translateX(-5px);
    box-shadow: 0 0 25px rgba(233, 30, 99, 0.3);
}

.back-to-home i {
    color: var(--accent-color);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .back-to-home {
        top: 20px; left: 20px;
        padding: 10px 20px;
        font-size: 0.8rem;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 100;
    opacity: 0.7;
    animation: fadeInOut 2s ease-in-out infinite;
    pointer-events: none;
}

.scroll-indicator span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
}

.mouse {
    width: 24px; height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 3px; height: 8px;
    background: var(--accent-color);
    border-radius: 2px;
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s ease-in-out infinite;
}

@keyframes scrollWheel {
    0% { top: 6px; opacity: 1; }
    100% { top: 25px; opacity: 0; }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}


/* Premium Preloader Styles */
#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease, visibility 1s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    width: 250px;
}

.loader-heart {
    position: relative;
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    animation: heartPulse 1.5s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    .loader-heart {
        font-size: 3rem;
    }
}

.heart-ring {
    position: absolute;
    width: 60px; height: 60px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: ringExpand 1.5s ease-out infinite;
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px var(--accent-glow)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 20px var(--accent-color)); }
}

@keyframes ringExpand {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

.loader-text {
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

.loader-bar-container {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

#loader-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    transition: width 0.3s ease;
}

.loader-status {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    font-family: monospace;
}


#particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    pointer-events: none;
}

.scroll-space {
    /* Height set dynamically in script.js */
}

.scene {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #0a0a0a 0%, #000 100%);
    will-change: perspective;
}

@media (min-width: 768px) {
    .scene {
        perspective: 1500px;
    }
}



.gallery {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

/* Prismatic Shard Core - Professional 3D Structure */
.pillar-container {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: var(--pillar-width); height: 100vh;
    transform-style: preserve-3d;
    pointer-events: none;
    z-index: -1;
}

.shard-system {
    position: absolute;
    width: 100%; height: 100%;
    transform-style: preserve-3d;
}

.shard {
    position: absolute;
    top: -50vh; left: 50%;
    width: var(--shard-width); height: 200vh;
    background: linear-gradient(to bottom, 
        transparent, 
        rgba(233, 30, 99, 0.1) 20%, 
        rgba(233, 30, 99, 0.2) 50%, 
        rgba(233, 30, 99, 0.1) 80%, 
        transparent
    );
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transform-style: preserve-3d;
}

/* Individual shard offsets */
.shard-1 { transform: rotateY(0deg) translateZ(60px); }
.shard-2 { transform: rotateY(72deg) translateZ(80px) scaleX(0.7); }
.shard-3 { transform: rotateY(144deg) translateZ(50px) scaleX(1.2); }
.shard-4 { transform: rotateY(216deg) translateZ(90px) scaleX(0.5); }
.shard-5 { transform: rotateY(288deg) translateZ(70px) scaleX(0.9); }

.light-beam {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; height: 200vh;
    background: linear-gradient(to bottom, 
        transparent, 
        var(--accent-color), 
        #ff6b9d, 
        var(--accent-color), 
        transparent
    );
    filter: blur(15px);
    opacity: 0.4;
}

.pillar-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 2px; height: 100vh;
    background: #fff;
    box-shadow: 0 0 40px var(--accent-color), 0 0 80px #ff6b9d;
    opacity: 0.3;
}


@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) scaleX(1); }
    50% { opacity: 0.8; transform: translateX(-50%) scaleX(3); }
}


.card {
    position: absolute;
    top: 50%; left: 50%;
    width: var(--card-width); height: var(--card-height);
    margin-left: calc(var(--card-width) / -2);
    margin-top: calc(var(--card-height) / -2);
    
    /* Advanced Glassmorphism */
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    
    /* Rim Light effect */
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 20px 40px rgba(0, 0, 0, 0.6);
    
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    
    transition: 
        box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1), 
        border-color 0.6s ease,
        background 0.6s ease;
    
    transform-style: preserve-3d;
    backface-visibility: hidden;
    overflow: hidden;
    will-change: transform, opacity;
}

.card-content {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    padding: 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 3;
    pointer-events: none;
}

.card.focused .card-content {
    transform: translateY(0);
}

.card-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.card-content p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    font-weight: 300;
}

.card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    opacity: 0.5;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s ease;
    filter: grayscale(40%) brightness(0.7);
}

.card.focused video {
    opacity: 1;
    filter: grayscale(0%) brightness(1);
    transform: scale(1.05);
}

/* Grain/Noise Texture */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
    z-index: 1;
}

/* Enhanced Shine Effect */
.card::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(
        45deg, 
        transparent 45%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 55%
    );
    transform: translate(var(--shine-x, 0%), var(--shine-y, 0%));
    pointer-events: none;
    z-index: 2;
}

.card:hover,
.card.focused {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
    box-shadow: 
        inset 0 0 30px rgba(233, 30, 99, 0.15),
        0 0 60px rgba(233, 30, 99, 0.3),
        0 30px 60px rgba(0, 0, 0, 0.5);
}


/* Background effects */
.bg-dots {
    position: fixed;
    width: 100%; height: 100%;
    background-image: radial-gradient(circle, #222 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.2;
    z-index: -1;
    animation: moveDots 60s linear infinite;
}

@keyframes moveDots {
    from { background-position: 0 0; }
    to { background-position: 80px 80px; }
}