/* ==========================================
   DESIGN SYSTEM & CUSTOM VARIABLES
   ========================================== */
:root {
    --bg-light: #FFFBF6;
    --bg-card: rgba(255, 255, 255, 0.96);
    --bg-card-gradient: linear-gradient(135deg, #FFFFFF 0%, #FFFDFB 100%);
    
    --saffron-primary: #FF7B00;
    --saffron-light: #FF9F43;
    --saffron-dark: #C44500;
    --saffron-glow: rgba(255, 123, 0, 0.25);
    
    --gold-color: #E2B13C;
    --gold-light: #F7D070;
    --gold-dark: #A57D1D;
    --gold-muted: rgba(226, 177, 60, 0.15);
    
    --maroon-dark: #420A10;
    --maroon-light: #6E1A24;
    --text-dark: #2F1E16;
    --text-muted: #6B5B53;
    
    --border-radius-lg: 28px;
    --border-radius-md: 20px;
    --border-radius-sm: 10px;
    
    --font-heading: 'Marcellus', Georgia, serif;
    --font-body: 'Poppins', system-ui, -apple-system, sans-serif;
    
    --shadow-premium: 0 25px 60px rgba(196, 69, 0, 0.15), 0 0 30px rgba(226, 177, 60, 0.1);
    --shadow-hover: 0 35px 70px rgba(196, 69, 0, 0.22), 0 0 40px rgba(226, 177, 60, 0.18);
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
    padding: clamp(6px, 1.5vh, 16px) 20px 30px 20px;
}

/* Background Moving Radial Glows */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -2;
    opacity: 0.35;
    pointer-events: none;
    animation: pulseGlow 18s ease-in-out infinite alternate;
}

.bg-glow-1 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(255, 123, 0, 0.28) 0%, transparent 70%);
    top: -10%;
    left: 15%;
}

.bg-glow-2 {
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(226, 177, 60, 0.22) 0%, transparent 70%);
    bottom: -15%;
    right: 10%;
    animation-delay: -6s;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(-4%, 6%); }
}

/* Mandala Watermark Backgrounds */
.mandala-bg {
    position: fixed;
    width: clamp(350px, 50vw, 750px);
    height: clamp(350px, 50vw, 750px);
    opacity: 0.055;
    z-index: -1;
    pointer-events: none;
    animation: rotateMandala 140s linear infinite;
}

.mandala-left {
    top: -180px;
    left: -180px;
}

.mandala-right {
    bottom: -180px;
    right: -180px;
    animation-direction: reverse;
}

@keyframes rotateMandala {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Floating Diyas Animation */
.floating-diya {
    position: fixed;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.12));
}

.diya-1 {
    top: 20%;
    left: 4%;
    animation: floatDiya 8s ease-in-out infinite;
}

.diya-2 {
    bottom: 20%;
    right: 4%;
    animation: floatDiya 10s ease-in-out infinite 1.5s;
}

@keyframes floatDiya {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(4deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.diya-flame {
    transform-origin: 50% 90%;
    animation: flameFlicker 0.15s ease-in-out infinite alternate;
}

@keyframes flameFlicker {
    0% { transform: scale(0.93) skewX(-1.5deg); filter: brightness(0.9); }
    100% { transform: scale(1.07) skewX(2.5deg); filter: brightness(1.2); }
}

/* ==========================================
   MAIN WRAPPER (CENTERED LAYOUT)
   ========================================== */
.main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    z-index: 1;
    animation: wrapperFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes wrapperFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------
   HEADER SECTION
   ------------------------------------------ */
.site-header {
    text-align: center;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sacred-symbol {
    margin-bottom: 6px;
    filter: drop-shadow(0 8px 18px rgba(226, 177, 60, 0.4));
    animation: gentlePulse 4s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.temple-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    color: var(--maroon-dark);
    letter-spacing: 2px;
    line-height: 1.15;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.85);
}

.temple-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-color), transparent);
    margin: 8px auto 0 auto;
}

.temple-location {
    font-size: clamp(0.9rem, 2.2vw, 1.1rem);
    color: var(--saffron-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-top: 6px;
}

/* ------------------------------------------
   CONTENT CONTAINER & COUNTDOWN CARD
   ------------------------------------------ */
.content-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.countdown-card {
    background: var(--bg-card);
    background-image: var(--bg-card-gradient);
    border-radius: var(--border-radius-lg);
    border: 3px solid var(--gold-color);
    box-shadow: var(--shadow-premium);
    padding: clamp(12px, 2vw, 18px) clamp(16px, 4vw, 48px);
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    transition: var(--transition-smooth);
}

/* Divine sparks particles inside countdown card */
.divine-sparks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.spark {
    position: absolute;
    bottom: -15px;
    width: 5px;
    height: 5px;
    background: radial-gradient(circle, #FFFFFF 0%, var(--gold-light) 60%, transparent 100%);
    border-radius: 50%;
    opacity: 0;
    filter: blur(0.5px);
    box-shadow: 0 0 8px var(--gold-color), 0 0 16px var(--saffron-light);
}

.spark-1 { left: 12%; animation: floatUpSpark 7s linear infinite; }
.spark-2 { left: 32%; animation: floatUpSpark 9s linear infinite 2s; }
.spark-3 { left: 52%; animation: floatUpSpark 8s linear infinite 4s; }
.spark-4 { left: 72%; animation: floatUpSpark 10s linear infinite 1s; }
.spark-5 { left: 88%; animation: floatUpSpark 7.5s linear infinite 3s; }

@keyframes floatUpSpark {
    0% { transform: translateY(0) scale(1) translateX(0); opacity: 0; }
    10% { opacity: 0.8; }
    50% { transform: translateY(-60px) scale(1.2) translateX(12px); opacity: 0.6; }
    80% { opacity: 0.3; }
    100% { transform: translateY(-130px) scale(0.7) translateX(-8px); opacity: 0; }
}

/* Dhanush Baan background watermark inside card */
.card-watermark {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(160px, 25vw, 240px);
    height: clamp(160px, 25vw, 240px);
    opacity: 0.055;
    pointer-events: none;
    z-index: 0;
    animation: watermarkPulse 6s ease-in-out infinite;
}

@keyframes watermarkPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); filter: drop-shadow(0 0 0px transparent); }
    50% { transform: translate(-50%, -50%) scale(1.08); filter: drop-shadow(0 0 8px rgba(226, 177, 60, 0.2)); }
}

.countdown-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--saffron-light), var(--gold-light), var(--saffron-primary));
}

.countdown-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.announcement-header h2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.25;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.announcement-title {
    font-size: clamp(0.75rem, 1.8vw, 0.95rem);
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--saffron-dark);
    letter-spacing: 2.5px;
    margin-bottom: 2px;
}

.announcement-date {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--maroon-dark);
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Timer Grid */
.timer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(10px, 2.5vw, 24px);
    margin-bottom: 16px;
}

.timer-card-wrapper {
    perspective: 800px;
}

.timer-card {
    background: linear-gradient(135deg, #FFF6EE 0%, #FFFDF8 100%);
    border: 2px solid rgba(226, 177, 60, 0.45);
    border-radius: var(--border-radius-md);
    padding: clamp(8px, 1.6vw, 16px) 6px;
    box-shadow: 0 10px 24px rgba(226, 177, 60, 0.08);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.timer-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--saffron-light), var(--gold-light));
    opacity: 0.7;
    transition: var(--transition-smooth);
}

.timer-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-color);
    box-shadow: 0 14px 30px rgba(255, 123, 0, 0.22);
}

.timer-card:hover::after {
    height: 6px;
    opacity: 1;
}

.timer-num {
    font-family: var(--font-body);
    font-size: clamp(2.2rem, 5.2vw, 3.8rem);
    font-weight: 800;
    color: var(--maroon-light);
    line-height: 1.1;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(110, 26, 36, 0.05);
    display: inline-block;
    transition: transform 0.2s ease-in-out;
}

.timer-label {
    font-size: clamp(0.72rem, 1.8vw, 0.88rem);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.announcement-footer {
    border-top: 1px solid rgba(226, 177, 60, 0.2);
    padding-top: 22px;
}

.spiritual-quote {
    font-family: var(--font-heading);
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    color: var(--saffron-dark);
    font-style: italic;
    letter-spacing: 0.5px;
}



/* ------------------------------------------
   FOOTER
   ------------------------------------------ */
.site-footer {
    margin-top: 40px;
    width: 100%;
    text-align: center;
    border-top: 1.5px solid rgba(226, 177, 60, 0.12);
    padding-top: 20px;
}

.site-footer p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

/* Card Registration Action Button */
.card-action-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    width: 100%;
}

.card-link-btn {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--saffron-primary);
    color: var(--saffron-dark);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 10px rgba(196, 69, 0, 0.05);
}

.card-link-btn:hover {
    background: var(--saffron-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 123, 0, 0.25);
}

/* Get Updates Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 9, 8, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-content {
    background: rgba(255, 251, 246, 0.97);
    border: 2px solid rgba(226, 177, 60, 0.4);
    border-radius: var(--border-radius-md);
    width: 90%;
    max-width: 480px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 45px rgba(107, 29, 0, 0.15);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

.modal-header {
    margin-bottom: 20px;
}

.modal-header h3 {
    font-family: var(--font-heading);
    color: var(--maroon-dark);
    font-size: 1.35rem;
    margin-bottom: 6px;
}

.modal-header p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid rgba(226, 177, 60, 0.25);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    background: #FFFFFF;
    transition: var(--transition-smooth);
}

.form-group input:focus {
    border-color: var(--saffron-primary);
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.1);
}

.submit-btn {
    background: linear-gradient(90deg, var(--saffron-primary), var(--saffron-light));
    color: #FFFFFF;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(255, 123, 0, 0.2);
    transition: var(--transition-smooth);
    margin-top: 8px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 123, 0, 0.35);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #FFFFFF;
    animation: spin 0.8s linear infinite;
}

.btn-spinner.hidden {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-message {
    font-size: 0.82rem;
    font-weight: 500;
    text-align: center;
    min-height: 18px;
}

.form-message.success {
    color: #2e7d32;
}

.form-message.error {
    color: #c62828;
}

/* ==========================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================== */

/* Tablets / Medium Screens */
@media screen and (max-width: 900px) {
    .floating-diya {
        display: none; /* Hide floating diyas on tablet/mobile for visual clarity */
    }
}

/* Small Smart Phones */
@media screen and (max-width: 600px) {
    body {
        padding: 12px;
    }
    
    .site-header {
        margin-bottom: 20px;
    }
    
    .temple-title {
        font-size: 2.3rem;
    }
    
    .temple-location {
        letter-spacing: 3px;
    }
    
    .countdown-card {
        padding: 24px 12px;
        border-radius: var(--border-radius-md);
    }
    
    .announcement-header h2 {
        font-size: 1.5rem;
    }
    
    .date-badge {
        margin-bottom: 20px;
    }
    
    /* Highly compact mobile timer grid */
    .timer-grid {
        gap: 6px;
        margin-bottom: 20px;
    }
    
    .timer-card {
        padding: 14px 4px;
        border-radius: var(--border-radius-sm);
    }
    
    .timer-num {
        font-size: 1.8rem;
    }
    
    .timer-label {
        font-size: 0.68rem;
        letter-spacing: 1px;
    }
    
    .spiritual-quote {
        font-size: 0.9rem;
    }

    .card-action-row {
        justify-content: center;
    }

    .site-footer {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 12px;
    }

}

/* Success modal view styles */
#modal-success-view {
    text-align: center;
    padding: 10px 5px;
    animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.success-icon-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

/* Beautiful Animated SVG Checkmark */
.success-checkmark {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #2e7d32;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #2e7d32;
    animation: fillActive .4s ease-in-out .4s forwards, scaleActive .3s ease-in-out 0s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: #2e7d32;
    fill: none;
    animation: strokeActive 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #ffffff;
    animation: strokeActive 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes strokeActive {
    to { stroke-dashoffset: 0; }
}

@keyframes scaleActive {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes fillActive {
    to { box-shadow: inset 0px 0px 0px 40px #2e7d32; }
}

.success-title {
    font-family: var(--font-heading);
    color: var(--maroon-dark);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.success-blessing {
    font-size: 0.88rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 8px;
    font-weight: 500;
}

.success-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 25px;
}

.btn-close-success {
    background: linear-gradient(90deg, var(--saffron-primary), var(--saffron-light));
    color: #FFFFFF;
    border: none;
    padding: 10px 26px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(255, 123, 0, 0.25);
    transition: var(--transition-smooth);
}

.btn-close-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(255, 123, 0, 0.35);
}

.hidden {
    display: none !important;
}
