:root {
    /* Primary Gold - Current */
    --primary-gold: #D4AF37;
    --secondary-gold: #B7950B;
    --highlight-gold: #FFD700;

    /* Tech-Sacred Palette */
    --tech-purple: #2D0B5A;
    --tech-blue: #0A192F;
    --neon-gold: #FFD700;
    --neon-blue: #00F2FF;
    --glow-gold: 0 0 15px rgba(212, 175, 55, 0.5);
    --glow-cyan: 0 0 15px rgba(0, 242, 255, 0.5);

    /* Parchment Variants */
    --parchment-bg: #F5E9D4;
    --parchment-medium: #E8D9B5;
    --parchment-dark: #D4C19C;

    /* Accents */
    --accent-red: #8B4513;
    --text-dark: #2C2C2C;

    /* Modern Effects */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

body {
    background-color: var(--parchment-bg);
    color: var(--text-dark);
    font-family: 'Cinzel', serif;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Cinzel Decorative', cursive;
    color: var(--accent-red);
}

.text-gold-light {
    color: var(--highlight-gold) !important;
}

.bg-dark-overlay {
    background: rgba(0, 0, 0, 0.7);
}

/* Premium Backgrounds */
.bg-parchment-light {
    background-color: var(--parchment-bg);
}

.bg-parchment-medium {
    background-color: var(--parchment-medium);
}

.bg-gradient-parchment {
    background: linear-gradient(to right, var(--parchment-medium), var(--parchment-bg));
}

/* Navbar */
.navbar {
    background: rgba(245, 241, 232, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-gold);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 700;
    color: var(--accent-red) !important;
    font-size: 1.5rem;
}

/* Hero Section Base */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.hero-video-container {
    z-index: 1;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: brightness(0.6) sepia(0.3);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.video-poster-fallback {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    z-index: 3;
    transition: opacity 0.5s ease;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 3;
    padding: 3rem;
    border: 1px solid var(--primary-gold);
    background: rgba(10, 25, 47, 0.7);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    max-width: 850px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Close Button */
.hero-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--primary-gold);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.hero-close-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--primary-gold);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.hero-close-btn i {
    font-size: 1.2rem;
}

/* Hero Reopen Button */
.hero-reopen-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(10, 25, 47, 0.9);
    border: 2px solid var(--primary-gold);
    color: var(--primary-gold);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: pulse-glow 2s infinite;
}

.hero-reopen-btn:hover {
    background: rgba(212, 175, 55, 0.9);
    color: var(--tech-blue);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
}

.hero-reopen-btn i {
    font-size: 1.5rem;
}

/* Closing Animation */
.hero-content.closing {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
    pointer-events: none;
}

.hero-content.closed {
    display: none;
}

/* Pulse Glow Animation for Reopen Button */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(212, 175, 55, 0.7);
    }

    50% {
        box-shadow: 0 44px 20px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(212, 175, 55, 0);
    }
}

/* Fade In Up Animation for Reopening */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


.text-gold {
    color: var(--primary-gold);
    text-shadow: var(--glow-gold);
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
}

.glass-dark {
    background: rgba(10, 25, 47, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: white;
}

.scroll-indicator {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

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

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* Mobile video fixes */
@media (max-width: 768px) {
    .hero-section {
        min-height: 500px;
    }
}

/* Stats Cards */
.stats-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--primary-gold);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.stats-card:hover {
    transform: translateY(-5px);
    background: #fff;
    box-shadow: var(--card-shadow);
}

/* Interaction Elements */
.search-container {
    background: var(--parchment-dark);
    padding: 2rem;
    border-radius: 15px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-control,
.form-select {
    border: 1px solid var(--primary-gold);
    background-color: #fff;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
    border-color: var(--primary-gold);
}

/* Temple Cards Base */
.temple-card {
    background: #fff;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.5s ease;
    height: 100%;
    position: relative;
    border: 1px solid transparent;
}

.temple-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-gold);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    z-index: 1;
}

.visited-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #28a745;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 50%;
    display: none;
}

.visited-badge.active {
    display: block;
}

/* Detail Page specific */
.temple-hero {
    height: 60vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.temple-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
}

.nav-tabs .nav-link {
    color: var(--text-dark);
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
}

.nav-tabs .nav-link.active {
    background: transparent;
    border-bottom-color: var(--primary-gold);
    color: var(--accent-red);
}

/* Footer */
footer {
    background: #1a1a1a;
    color: var(--primary-gold);
    padding: 3rem 0;
    margin-top: 5rem;
}

/* Progress Map Overlay */
.progress-map-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.progress-map-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.progress-map-content {
    background: #1a1a2e;
    background: rgba(10, 25, 47, 0.9);
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 90%;
    width: 650px;
    text-align: center;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
    position: relative;
    color: #f6f1e4;
}

.progress-map-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    margin: 2rem 0;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.map-dot {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--primary-gold);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: help;
}

.map-dot.visited {
    background: var(--primary-gold);
    color: #000 !important;
    font-weight: bold;
    box-shadow: 0 0 15px var(--primary-gold);
    border-color: #fff;
}

.map-dot:hover {
    transform: scale(1.15);
    border-color: var(--primary-gold);
    background: rgba(212, 175, 55, 0.1);
}