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

:root {
    --saffron: #FF9933;
    --gold: #FFD700;
    --deep-red: #8B0000;
    --temple-gold: #D4AF37;
    --holy-white: #FFF8DC;
    --dark-gold: #B8860B;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Noto Sans Devanagari', 'Playfair Display', serif, sans-serif;
    background: linear-gradient(135deg, #FF9933 0%, #FFD700 50%, #8B0000 100%);
    overflow: hidden;
    position: relative;
}

/* Temple Background Pattern */
.temple-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 153, 51, 0.1) 0%, transparent 50%);
    background-size: 200% 200%;
    animation: templeGlow 20s ease infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes templeGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Sound Controls */
.sound-controls {
    position: fixed;
    top: 80px;
    right: 15px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sound-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--temple-gold);
    border: 2px solid var(--gold);
    color: var(--deep-red);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s;
}

.sound-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

.sound-btn.active {
    background: var(--deep-red);
    color: var(--gold);
    animation: bellRing 0.5s ease;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Daily Sloka Panel */
.sloka-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--holy-white) 0%, #FFFACD 100%);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(139, 0, 0, 0.3);
    max-width: 90%;
    width: 450px;
    z-index: 250;
    border: 3px solid var(--temple-gold);
    display: none;
}

.sloka-panel.active {
    display: block;
    animation: slokaAppear 0.5s ease;
}

@keyframes slokaAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.sloka-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--temple-gold);
}

.sloka-header h3 {
    color: var(--deep-red);
    font-size: 22px;
    margin: 0;
    flex: 1;
    text-align: center;
}

.om-symbol {
    font-size: 35px;
    color: var(--temple-gold);
    margin-right: 10px;
}

.close-sloka {
    background: none;
    border: none;
    font-size: 30px;
    color: var(--deep-red);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.sloka-content {
    text-align: center;
}

.sloka-sanskrit {
    font-size: 24px;
    color: var(--deep-red);
    font-weight: bold;
    margin: 15px 0;
    line-height: 1.6;
    font-family: 'Noto Sans Devanagari', serif;
}

.sloka-translation {
    font-size: 16px;
    color: #666;
    font-style: italic;
    margin: 10px 0;
}

.sloka-meaning {
    font-size: 14px;
    color: #555;
    margin-top: 15px;
    line-height: 1.5;
}

/* Modal Styles */
.modal {
    display: block;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.8) 0%, rgba(255, 153, 51, 0.8) 100%);
}

.modal-content {
    background: linear-gradient(135deg, var(--holy-white) 0%, #FFFACD 100%);
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 3px solid var(--temple-gold);
    box-shadow: 0 8px 32px rgba(139, 0, 0, 0.4);
    left: 0;
    right: 0;
}

.close {
    color: var(--deep-red);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--saffron);
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content input {
    padding: 12px;
    border: 2px solid var(--temple-gold);
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.modal-content button {
    padding: 12px;
    background: linear-gradient(135deg, var(--saffron) 0%, var(--deep-red) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.modal-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

/* Header - Puranic Golden Theme */
.puranic-header {
    background: linear-gradient(135deg, var(--deep-red) 0%, var(--saffron) 50%, var(--temple-gold) 100%);
    color: white;
    padding: 0;
    box-shadow: 0 4px 30px rgba(139, 0, 0, 0.5), inset 0 2px 10px rgba(255, 215, 0, 0.2);
    z-index: 100;
    position: relative;
    border-bottom: 4px solid var(--temple-gold);
    overflow: hidden;
}

.header-decoration-top {
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--temple-gold) 0px,
        var(--temple-gold) 20px,
        var(--deep-red) 20px,
        var(--deep-red) 40px
    );
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-content {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 300px;
}

.header-om-wrapper {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.om-symbol-header {
    font-size: 36px;
    color: var(--gold);
    animation: omGlow 3s ease infinite;
    z-index: 2;
    position: relative;
}

.om-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.5) 0%, transparent 70%);
    animation: omPulse 2s ease-in-out infinite;
}

@keyframes omPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 0.8; }
}

@keyframes omGlow {
    0%, 100% { text-shadow: 0 0 10px var(--gold), 0 0 20px var(--gold); }
    50% { text-shadow: 0 0 20px var(--gold), 0 0 30px var(--gold), 0 0 40px var(--gold); }
}

.header-title-section {
    flex: 1;
    min-width: 200px;
}

.header-main-title {
    font-size: 22px;
    font-weight: bold;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
    margin: 0;
    color: var(--gold);
    font-family: 'Noto Sans Devanagari', sans-serif;
}

.header-subtitle {
    font-size: 18px;
    font-weight: 600;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
    margin: 2px 0;
    color: white;
}

.header-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    margin: 2px 0 0 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    font-weight: 500;
}

.header-temple-icon {
    position: relative;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.temple-icon-main {
    font-size: 32px;
    z-index: 2;
    position: relative;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.temple-icon-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, transparent 70%);
    animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name-display {
    color: var(--gold);
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.puranic-btn {
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(212, 175, 55, 0.3) 100%);
    border: 2px solid var(--gold);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.puranic-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.5) 0%, rgba(212, 175, 55, 0.5) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.header-decoration-bottom {
    height: 6px;
    background: linear-gradient(90deg, transparent 0%, var(--temple-gold) 50%, transparent 100%);
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
}

/* Footer - Puranic Golden Theme */
.puranic-footer {
    background: linear-gradient(135deg, var(--temple-gold) 0%, var(--saffron) 50%, var(--deep-red) 100%);
    color: white;
    padding: 0;
    box-shadow: 0 -4px 30px rgba(139, 0, 0, 0.5), inset 0 -2px 10px rgba(255, 215, 0, 0.2);
    z-index: 100;
    position: relative;
    border-top: 4px solid var(--temple-gold);
    overflow: hidden;
    margin-top: auto;
}

.footer-decoration-top {
    height: 6px;
    background: linear-gradient(90deg, transparent 0%, var(--temple-gold) 50%, transparent 100%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.footer-content {
    padding: 30px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    text-align: center;
}

.footer-om {
    font-size: 48px;
    color: var(--gold);
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: footerOmGlow 3s ease-in-out infinite;
}

@keyframes footerOmGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
    50% { text-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 40px rgba(255, 215, 0, 0.6); }
}

.footer-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--gold);
    margin: 10px 0 5px 0;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
    font-family: 'Noto Sans Devanagari', sans-serif;
}

.footer-subtitle {
    font-size: 16px;
    color: white;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.footer-section h4 {
    font-size: 18px;
    color: var(--gold);
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.footer-section p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.footer-decoration-bottom {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.footer-pattern {
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        var(--temple-gold) 0px,
        var(--temple-gold) 10px,
        transparent 10px,
        transparent 20px
    );
    margin-bottom: 10px;
}

.footer-copyright {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Hide old controls panel */
.controls-panel {
    display: none !important;
}

/* Map Container */
#mapContainer {
    width: 100%;
    height: calc(100vh - 140px);
    position: relative;
    z-index: 1;
}

/* App container with footer support */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#map {
    width: 100%;
    height: 100%;
}

/* Controls Panel - Restored */
.controls-panel {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 200;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 95%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Modern Glassmorphism Button Design */
.control-btn {
    position: relative;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--deep-red);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    width: 140px;
    height: 140px;
    min-width: 140px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.control-btn:hover::before {
    left: 100%;
}

.control-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: rgba(212, 175, 55, 0.6);
    background: rgba(255, 255, 255, 1);
}

.control-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* Special Button Variants with Temple Colors */
.control-btn.darshan-btn-main {
    background: linear-gradient(135deg, rgba(255, 153, 51, 0.95) 0%, rgba(139, 0, 0, 0.95) 100%);
    color: white;
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 
        0 4px 15px rgba(255, 153, 51, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.control-btn.darshan-btn-main:hover {
    background: linear-gradient(135deg, rgba(255, 153, 51, 1) 0%, rgba(139, 0, 0, 1) 100%);
    box-shadow: 
        0 8px 25px rgba(255, 153, 51, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.control-btn.sloka-btn-main {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.95) 0%, rgba(255, 215, 0, 0.95) 100%);
    color: var(--deep-red);
    border-color: rgba(139, 0, 0, 0.3);
    box-shadow: 
        0 4px 15px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.control-btn.sloka-btn-main:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 1) 0%, rgba(255, 215, 0, 1) 100%);
    box-shadow: 
        0 8px 25px rgba(212, 175, 55, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.control-btn.emergency {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.95) 0%, rgba(198, 40, 40, 0.95) 100%);
    color: white;
    border-color: rgba(255, 82, 82, 0.5);
    box-shadow: 
        0 4px 15px rgba(244, 67, 54, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: pulse-emergency 2s infinite;
}

.control-btn.emergency:hover {
    background: linear-gradient(135deg, rgba(244, 67, 54, 1) 0%, rgba(198, 40, 40, 1) 100%);
    box-shadow: 
        0 8px 25px rgba(244, 67, 54, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: none;
}

@keyframes pulse-emergency {
    0%, 100% {
        box-shadow: 
            0 4px 15px rgba(244, 67, 54, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 4px 20px rgba(244, 67, 54, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

/* Panels */
.panel {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--holy-white) 0%, #FFFACD 100%);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(139, 0, 0, 0.3);
    max-width: 90%;
    width: 400px;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 150;
    border: 3px solid var(--temple-gold);
    margin: 0;
}

.panel h3 {
    margin-bottom: 15px;
    color: var(--deep-red);
    font-size: 20px;
    text-align: center;
}

.panel button {
    width: 100%;
    padding: 12px;
    margin: 5px 0;
    border: 2px solid var(--temple-gold);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--saffron) 0%, var(--deep-red) 100%);
    color: white;
}

.panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

/* Live Darshan Panel */
.darshan-panel {
    width: 95%;
    max-width: 500px;
    max-height: 80vh;
}

.darshan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--temple-gold);
}

.darshan-header button {
    width: auto;
    padding: 5px 15px;
    margin: 0;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--deep-red);
    cursor: pointer;
}

.darshan-video-container {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 3px solid var(--temple-gold);
}

#darshanVideo {
    width: 100%;
    display: block;
}

.darshan-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(139, 0, 0, 0.8) 0%, transparent 100%);
    color: white;
    padding: 15px;
    text-align: center;
}

.darshan-text {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.aarti-time {
    font-size: 14px;
    color: var(--gold);
}

.darshan-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.darshan-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    background: linear-gradient(135deg, var(--temple-gold) 0%, var(--gold) 100%);
    border: 2px solid var(--deep-red);
    color: var(--deep-red);
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.darshan-btn:hover {
    background: linear-gradient(135deg, var(--gold) 0%, var(--temple-gold) 100%);
    transform: scale(1.05);
}

.emergency-btn {
    padding: 15px;
    margin: 10px 0;
    border: 2px solid var(--temple-gold);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: white;
}

.emergency-btn.medical {
    background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
}

.emergency-btn.police {
    background: linear-gradient(135deg, #2196F3 0%, #1565C0 100%);
}

.emergency-btn.water {
    background: linear-gradient(135deg, #00BCD4 0%, #00838F 100%);
}

.emergency-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.admin-panel {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
}

.route-item {
    padding: 12px;
    margin: 8px 0;
    border: 2px solid var(--temple-gold);
    border-radius: 8px;
    cursor: pointer;
    background: white;
    transition: all 0.3s;
}

.route-item.blocked {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #f44336;
}

.route-item:hover {
    background: linear-gradient(135deg, var(--holy-white) 0%, #FFFACD 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* Responsive */
@media (max-width: 600px) {
    .controls-panel {
        bottom: 10px;
    }
    
    .control-btn {
        padding: 15px;
        font-size: 14px;
        width: 120px;
        height: 120px;
        min-width: 120px;
        min-height: 120px;
    }
    
    .panel {
        width: 95%;
        bottom: 80px;
    }
    
    .sloka-panel {
        width: 95%;
        padding: 20px;
    }
    
    .sloka-sanskrit {
        font-size: 20px;
    }
}

/* Audio visualizer effect */
@keyframes audioWave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

/* Festival Features Styles */

/* Check-in Locations */
.checkin-location-item {
    padding: 15px;
    margin: 10px 0;
    border: 2px solid var(--temple-gold);
    border-radius: 10px;
    background: white;
}

.checkin-location-item button {
    margin: 5px;
    padding: 8px 15px;
    width: auto;
}

/* Points & Badges */
.points-display {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--temple-gold) 0%, var(--gold) 100%);
    border-radius: 15px;
    margin-bottom: 20px;
}

.points-value {
    font-size: 48px;
    font-weight: bold;
    color: var(--deep-red);
}

.points-label {
    font-size: 18px;
    color: var(--deep-red);
    margin-top: 5px;
}

.level-display {
    font-size: 20px;
    color: var(--deep-red);
    margin-top: 10px;
    font-weight: bold;
}

.badge-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: white;
    border: 2px solid var(--temple-gold);
    border-radius: 8px;
    gap: 10px;
}

.badge-icon {
    font-size: 30px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    margin: 5px 0;
    background: white;
    border: 2px solid var(--temple-gold);
    border-radius: 8px;
}

.rank {
    font-weight: bold;
    color: var(--deep-red);
}

/* Queue Management */
.queue-item {
    padding: 15px;
    margin: 10px 0;
    border: 2px solid var(--temple-gold);
    border-radius: 10px;
    background: white;
}

.queue-item button {
    margin: 5px;
    width: auto;
}

/* Chatbot */
.chatbot-panel {
    width: 95%;
    max-width: 500px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.chatbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--temple-gold);
}

.chatbot-header button {
    width: auto;
    padding: 5px 15px;
    margin: 0;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--deep-red);
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 10px;
    max-height: 300px;
}

.chatbot-message {
    padding: 10px;
    margin: 5px 0;
    border-radius: 10px;
    max-width: 80%;
}

.chatbot-message.user {
    background: linear-gradient(135deg, var(--saffron) 0%, var(--deep-red) 100%);
    color: white;
    margin-left: auto;
    text-align: right;
}

.chatbot-message.bot {
    background: white;
    color: var(--deep-red);
    border: 2px solid var(--temple-gold);
}

.chatbot-input-container {
    display: flex;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--temple-gold);
    border-radius: 8px;
    font-size: 14px;
}

.chatbot-send {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--saffron) 0%, var(--deep-red) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* Social Feed */
.social-post-item {
    padding: 15px;
    margin: 10px 0;
    background: white;
    border: 2px solid var(--temple-gold);
    border-radius: 10px;
}

.post-content {
    margin-bottom: 10px;
    color: var(--deep-red);
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--temple-gold);
}

.post-actions button {
    width: auto;
    padding: 5px 15px;
    margin: 0;
    background: linear-gradient(135deg, var(--saffron) 0%, var(--deep-red) 100%);
}

.post-time {
    font-size: 12px;
    color: #666;
}

.create-post-btn {
    background: linear-gradient(135deg, var(--temple-gold) 0%, var(--gold) 100%);
    color: var(--deep-red);
    margin-bottom: 10px;
}

/* Home Content Styles */
.home-content {
    padding: 20px 0;
    width: 100%;
    margin: 0;
    overflow-y: auto;
    min-height: calc(100vh - 200px);
    padding-bottom: 20px;
    flex: 1;
}

.temple-hero {
    background: linear-gradient(135deg, var(--saffron) 0%, var(--gold) 50%, var(--deep-red) 100%);
    padding: 40px 20px 60px 20px;
    text-align: center;
    border-radius: 0;
    margin: 0 0 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.temple-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
    pointer-events: none;
}

/* Toran Dwar (Decorative Entrance) */
.toran-dwar {
    margin-bottom: 30px;
    position: relative;
}

.toran-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.toran-center {
    font-size: 1.8em;
    font-weight: bold;
    color: #D4AF37;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-family: 'Noto Sans Devanagari', serif;
    padding: 10px 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(212, 175, 55, 0.5);
}

.toran-ornament {
    font-size: 2em;
    color: #D4AF37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}

.toran-flowers {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.toran-flowers .flower {
    font-size: 1.2em;
    animation: flower-sway 3s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.2s);
}

.toran-flowers .flower:nth-child(1) { --i: 0; }
.toran-flowers .flower:nth-child(2) { --i: 1; }
.toran-flowers .flower:nth-child(3) { --i: 2; }
.toran-flowers .flower:nth-child(4) { --i: 3; }
.toran-flowers .flower:nth-child(5) { --i: 4; }

@keyframes flower-sway {
    0%, 100% { transform: rotate(-5deg) translateY(0); }
    50% { transform: rotate(5deg) translateY(-5px); }
}

.hero-content h1 {
    font-size: 2.5em;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2em;
    color: rgba(255,255,255,0.95);
    margin-bottom: 30px;
}

/* Khatu Shyam Ji Idol Image Placeholder */
.shyam-baba-idol {
    max-width: 300px;
    margin: 30px auto;
    border-radius: 15px;
    overflow: hidden;
}

.idol-placeholder {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 40px 20px;
    border: 3px solid rgba(212, 175, 55, 0.5);
    border-radius: 15px;
    text-align: center;
}

.idol-icon {
    font-size: 4em;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8));
}

.idol-placeholder p {
    font-size: 1.3em;
    color: white;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.idol-placeholder small {
    font-size: 0.9em;
    color: rgba(255,255,255,0.8);
    font-style: italic;
}

.temple-section {
    background: white;
    padding: 30px 20px;
    margin: 0 0 30px 0;
    border-radius: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: none;
    border-right: none;
    border-top: 2px solid var(--temple-gold);
    border-bottom: 2px solid var(--temple-gold);
    width: 100%;
}

.section-title {
    font-size: 1.8em;
    color: var(--deep-red);
    margin-bottom: 20px;
    border-bottom: 3px solid var(--temple-gold);
    padding-bottom: 10px;
}

.section-content {
    color: #333;
    line-height: 1.8;
}

.history-content {
    font-size: 1.1em;
    text-align: justify;
}

.facilities-grid, .places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Action Tile / Facility Card Styling */
.facility-card, .place-card, .action-tile {
    background: #faf8f3; /* Light beige background */
    padding: 25px 20px;
    border-radius: 12px;
    border: 1.5px solid #d4a574; /* Light brown border */
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Subtle background pattern */
.facility-card::before, .place-card::before, .action-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 153, 51, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.facility-card > *, .place-card > *, .action-tile > * {
    position: relative;
    z-index: 1;
}

.facility-card:hover, .place-card:hover, .action-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #c8965f;
}

.facility-icon, .place-icon, .action-tile-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: inline-block;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Special icon styling for Aarti & Puja (purple square with Om) */
.facility-card:first-child .facility-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    border-radius: 12px;
    font-size: 2.5em;
    color: white;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.facility-card h3, .place-card h3, .action-tile h3 {
    color: #8B0000; /* Dark red */
    margin-bottom: 10px;
    font-size: 1.25em;
    font-weight: bold;
    line-height: 1.3;
}

.facility-card p, .place-card p, .action-tile p {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0;
}

/* Action Tile Component - Reusable */
.action-tile {
    cursor: pointer;
    user-select: none;
}

.action-tile:active {
    transform: translateY(-2px);
}

.action-tile.clickable {
    cursor: pointer;
}

.action-tile.clickable:hover {
    background: #f5f3ed;
}

/* Icon variations for different action types */
.action-tile-icon.medical {
    color: #f44336;
}

.action-tile-icon.security {
    color: #2196F3;
}

.action-tile-icon.water {
    color: #00BCD4;
}

.action-tile-icon.parking {
    color: #FF9800;
}

/* Action Tiles Grid */
.action-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Admin tiles special styling */
.action-tile.admin-tile {
    border-color: #FF5722;
    background: linear-gradient(135deg, #fff8dc 0%, #ffe8d6 100%);
}

.action-tile.admin-tile:hover {
    border-color: #E64A19;
    background: linear-gradient(135deg, #fff5e6 0%, #ffddd0 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .facilities-grid, .places-grid, .action-tiles-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .facility-card, .place-card, .action-tile {
        padding: 20px 15px;
    }
    
    .facility-icon, .place-icon, .action-tile-icon {
        font-size: 2.5em;
        margin-bottom: 12px;
    }
    
    .facility-card h3, .place-card h3, .action-tile h3 {
        font-size: 1.1em;
    }
    
    .facility-card p, .place-card p, .action-tile p {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .facilities-grid, .places-grid, .action-tiles-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 15px;
    margin: 10px 0;
    background: linear-gradient(135deg, #fff8dc 0%, #fff 100%);
    border-left: 4px solid var(--temple-gold);
    border-radius: 5px;
    font-size: 1.1em;
    color: #333;
}

/* Language Toggle */
.language-toggle {
    margin-right: 15px;
}

.lang-btn {
    padding: 8px 15px;
    background: linear-gradient(135deg, var(--temple-gold) 0%, var(--gold) 100%);
    color: var(--deep-red);
    border: 2px solid var(--deep-red);
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.lang-btn:hover {
    background: linear-gradient(135deg, var(--gold) 0%, var(--temple-gold) 100%);
    transform: scale(1.05);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Map Container */
#mapContainer {
    width: 100%;
    height: calc(100vh - 80px);
    position: relative;
}

/* Control Button Variants - Updated to match new glassmorphism design */
/* These styles are now defined in the main control-btn section above */

/* ============================================
   DIGITAL DARSHAN ANIMATION SYSTEM
   ============================================ */

/* 1. Singha Dwar (Golden Gate) Opening Animation */
.gate-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.gate-panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(180deg, #8B4513 0%, #4B2C20 100%);
    border: 8px solid #D4AF37;
    transition: transform 2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.gate-panel.left {
    left: 0;
    transform-origin: left;
    border-right: 4px solid #D4AF37;
}

.gate-panel.right {
    right: 0;
    transform-origin: right;
    border-left: 4px solid #D4AF37;
}

.door-design {
    width: 80%;
    height: 90%;
    border: 2px dashed rgba(212, 175, 55, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.om-symbol {
    font-size: 5rem;
    color: #D4AF37;
    margin-top: 20px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-family: 'Noto Sans Devanagari', serif;
}

.handle {
    width: 20px;
    height: 80px;
    background: #D4AF37;
    border-radius: 10px;
    box-shadow: 2px 2px 10px black;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.gate-center {
    position: relative;
    z-index: 1001;
    text-align: center;
}

.enter-btn {
    position: relative;
    z-index: 1001;
    padding: 20px 50px;
    background: #C0392B;
    color: #FFF;
    font-size: 1.5rem;
    border: 2px solid #D4AF37;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    font-weight: bold;
    box-shadow: 0 0 30px rgba(255, 153, 51, 0.6);
    transition: all 0.3s;
}

.enter-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(255, 153, 51, 0.8);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: glow-sweep 2s infinite;
}

@keyframes glow-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

.gate-open .left {
    transform: perspective(1000px) rotateY(-80deg);
}

.gate-open .right {
    transform: perspective(1000px) rotateY(80deg);
}

.gate-open .gate-center {
    opacity: 0;
    pointer-events: none;
    transition: 0.5s;
}

.gate-open {
    pointer-events: none;
    animation: fade-out 1s forwards 2s;
}

@keyframes fade-out {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* 2. Pushp Varsha (Flower Rain) Background Animation */
.flower-rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.petal {
    position: absolute;
    width: 15px;
    height: 15px;
    background: #FF9933;
    border-radius: 50% 0 50% 0;
    opacity: 0.8;
    animation: fall linear infinite;
}

.petal:nth-child(even) {
    background: #FFD700;
    width: 12px;
    height: 12px;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(0deg) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(360deg) translateX(50px);
        opacity: 0;
    }
}

/* 3. Sudarshan Chakra Scroll Guardian - Enhanced */
.chakra-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 900;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    padding: 10px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.chakra-container:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(212, 175, 55, 0.6);
    transform: scale(1.1);
}

.sudarshan-chakra {
    animation: spin-slow 10s linear infinite;
    filter: drop-shadow(0 0 8px #D4AF37);
    transition: animation-duration 0.3s;
    display: block;
}

@keyframes spin-slow {
    100% {
        transform: rotate(360deg);
    }
}

/* 4. Teen Baan (Three Arrows) Section Header - Enhanced */
.teen-baan-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 40px 0 20px 0;
    position: relative;
    padding: 20px;
}

.teen-baan-wrapper::before {
    content: '🏹';
    position: absolute;
    top: -10px;
    font-size: 2em;
    opacity: 0.3;
}

.baan {
    width: 250px;
    height: 5px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(212, 175, 55, 0.3) 20%,
        #D4AF37 50%,
        rgba(212, 175, 55, 0.3) 80%,
        transparent 100%);
    position: relative;
    opacity: 0;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.baan::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid #D4AF37;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.baan::after {
    content: '➤';
    position: absolute;
    right: -5px;
    top: -10px;
    color: #D4AF37;
    font-size: 24px;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.8));
}

.animate-baan .baan:nth-child(1) {
    animation: shoot-in 1.2s forwards 0.2s;
}

.animate-baan .baan:nth-child(2) {
    animation: shoot-in 1.2s forwards 0.5s;
}

.animate-baan .baan:nth-child(3) {
    animation: shoot-in 1.2s forwards 0.8s;
}

@keyframes shoot-in {
    0% {
        transform: translateX(-150px) scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* 5. Aarti Glow (Image Effects) */
.shyam-baba-idol,
.temple-image {
    border-radius: 10px;
    border: 3px solid #D4AF37;
    box-shadow: 0 0 20px rgba(255, 153, 51, 0.5);
    animation: divine-breath 4s ease-in-out infinite;
}

@keyframes divine-breath {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 153, 51, 0.5);
    }
    50% {
        box-shadow: 0 0 50px rgba(255, 153, 51, 0.9), 0 0 10px #FFD700;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .gate-open .left {
        transform: translateX(-100%);
    }
    
    .gate-open .right {
        transform: translateX(100%);
    }
    
    .sudarshan-chakra {
        width: 50px !important;
        height: 50px !important;
    }
    
    .om-symbol {
        font-size: 3rem;
    }
    
    .enter-btn {
        padding: 15px 30px;
        font-size: 1.2rem;
    }
    
    .baan {
        width: 150px;
    }
}

/* Mobile Responsive for New UI Elements */
@media (max-width: 768px) {
    .toran-center {
        font-size: 1.3em;
        padding: 8px 20px;
    }
    .toran-ornament {
        font-size: 1.5em;
    }
    .idol-placeholder {
        padding: 30px 15px;
    }
    .idol-icon {
        font-size: 3em;
    }
    
    .controls-panel {
        bottom: 15px;
        gap: 8px;
        padding: 12px 15px;
        border-radius: 25px;
        max-width: 98%;
    }
    
    .control-btn {
        padding: 15px;
        font-size: 13px;
        width: 110px;
        height: 110px;
        min-width: 110px;
        min-height: 110px;
        border-radius: 12px;
    }
}
