:root {
    --bg-color: #000000;
    --card-bg: rgba(10, 10, 10, 0.85);
    --primary-gradient: linear-gradient(135deg, #c0c0c0 0%, #ffffff 50%, #71717a 100%);
    --silver-glow: 0 0 20px rgba(255, 255, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #000;
    /* Animated Silver Mesh Background as Default Variable */
    --main-bg: 
        radial-gradient(at 0% 0%, rgba(255, 255, 255, 0.08) 0, transparent 50%), 
        radial-gradient(at 50% 0%, rgba(200, 200, 200, 0.05) 0, transparent 50%), 
        radial-gradient(at 100% 0%, rgba(255, 255, 255, 0.08) 0, transparent 50%),
        radial-gradient(at 50% 100%, rgba(255, 255, 255, 0.05) 0, transparent 50%);
    
    background-image: var(--main-bg);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Moving Silver Highlights */
@keyframes moveGlow {
    0% { transform: translate(-10%, -10%) rotate(0deg); }
    50% { transform: translate(10%, 10%) rotate(5deg); }
    100% { transform: translate(-10%, -10%) rotate(0deg); }
}

body::after {
    content: "";
    position: fixed;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
    animation: moveGlow 20s infinite alternate linear;
    pointer-events: none;
    z-index: -2;
}

/* Sparkle Animation */
@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.2); }
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="2" cy="2" r="1" fill="white" opacity="0.3"/></svg>');
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 60px 20px;
    text-align: center;
}

.hidden { display: none !important; }

/* Main Party Card (Guest-facing only) */
.upload-container, .access-container {
    /* Silver Metallic Sheen Background */
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        linear-gradient(to bottom, rgba(20, 20, 20, 0.95), rgba(0, 0, 0, 0.98)),
        linear-gradient(135deg, #2c2c2e 0%, #000000 100%);
    
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    padding: 40px 30px;
    border-radius: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.1);
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Original Indigo Theme for Admin Pages */
.admin-login-container, .admin-setup-container, 
.admin-verify-container, .dashboard-container, .gallery-container {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    margin-bottom: 20px;
}

/* Restore Indigo Headers for Admin */
.admin-login-container h1, .admin-setup-container h1, 
.admin-verify-container h1, .dashboard-container h1, .gallery-container h1 {
    font-family: 'Inter', sans-serif;
    font-size: 2.2rem;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

/* Subtle Metallic Texture Overlay */
.upload-container::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.02) 0px,
        rgba(255, 255, 255, 0.02) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 0;
}

/* Decorative Silver Glows */
.upload-container::before {
    content: "";
    position: absolute;
    top: -50px; left: -50px; width: 100px; height: 100px;
    background: white; filter: blur(60px); opacity: 0.1;
}

/* Typography */
h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
    color: white;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 400;
}

/* Upload Icon */
.upload-icon {
    font-size: 6rem;
    margin-bottom: 30px;
    display: block;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
}

/* The FABULOUS Button */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.6); }
    100% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
}

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

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 800;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 15px;
    color: black;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
}

.btn-primary.shimmer-effect {
    background: var(--primary-gradient);
    background-size: 200% auto;
    animation: shimmer 4s linear infinite, pulseGlow 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.btn:active { transform: scale(0.95); }

.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }

.btn-sm {
    padding: 12px;
    font-size: 0.9rem;
    border-radius: 12px;
    margin-bottom: 0;
}

/* Image Preview Carousel */
.preview-carousel {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#preview-container img {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: 24px;
    border: 2px solid var(--glass-border);
    background: #000;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(5px);
    transition: all 0.3s;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.nav-btn:hover { background: rgba(255, 255, 255, 0.4); }

.carousel-dots {
    position: absolute;
    bottom: 15px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s;
}

.dot.active {
    background: white;
    box-shadow: 0 0 10px white;
    transform: scale(1.2);
}

#selection-count {
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: 0.1em;
}

/* Form Controls */
.form-group { margin-bottom: 20px; text-align: left; }
.form-control {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    font-size: 1rem;
    color: white;
    outline: none;
}

/* Flash Messages */
.flash-message {
    padding: 15px 25px;
    background: white;
    color: black;
    border-radius: 16px;
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Dashboard & Gallery */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    text-align: center;
}

.card h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.card .value {
    font-size: 2.5rem;
    font-weight: 900;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* Slideshow */
.slideshow-body { 
    background: #000; 
    overflow: hidden; 
    height: 100vh; 
    width: 100vw;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    position: relative;
}

#slides-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-image {
    max-width: 100vw; 
    max-height: 100vh; 
    object-fit: contain;
    position: absolute; 
    opacity: 0; 
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 1.5s ease-in-out, transform 10s linear;
}

.slide-image.active { 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1.08); 
}

/* QR Setup */
.qr-setup img {
    max-width: 240px;
    margin: 40px auto;
    display: block;
    background: white;
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 0 30px rgba(255,255,255,0.2);
}
