:root {
    --primary-color: #0c1f15;
    /* Very deep Islamic Green */
    --secondary-color: #163d27;
    /* Rich dark green */
    --accent-color: #fce09b;
    /* Elegant Gold */
    --accent-glow: rgba(252, 224, 155, 0.4);
    --text-primary: #f8f9fa;
    --text-secondary: #c2d1c9;
    --danger-color: #ef476f;
    --success-color: #06d6a0;
    --glass-bg: rgba(16, 43, 28, 0.6);
    --glass-border: rgba(252, 224, 155, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Islamic Geometric/Mosque Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 50% 10%, #1f5737 0%, var(--primary-color) 70%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><path d="M30 5 L35 20 L50 20 L38 30 L42 45 L30 35 L18 45 L22 30 L10 20 L25 20 Z" fill="rgba(252, 224, 155, 0.03)"/></svg>') repeat;
    z-index: -1;
    animation: gentlePulse 15s ease-in-out infinite alternate;
}

/* Subtle mosque dome silhouette at the bottom */
.background-animation::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%2308150d" fill-opacity="1" d="M0,256L80,240C160,224,320,192,480,186.7C640,181,800,203,960,192C1120,181,1280,139,1360,117.3L1440,96L1440,320L1360,320C1280,320,1120,320,960,320C800,320,640,320,480,320C320,320,160,320,80,320L0,320Z"></path></svg>') no-repeat bottom center;
    background-size: cover;
    opacity: 0.8;
}

@keyframes gentlePulse {
    0% {
        filter: brightness(1);
    }

    100% {
        filter: brightness(1.2);
    }
}

.app-container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 1;
}

/* Glassmorphism Classes */
.glass-header,
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    padding: 2rem;
}

/* Autoplay Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 31, 21, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.overlay-content {
    text-align: center;
    max-width: 500px;
    padding: 3rem;
}

.overlay-content h2 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.overlay-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.start-btn {
    background: linear-gradient(135deg, var(--accent-color), #eed07d);
    color: var(--primary-color);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

/* Header Styles */
.glass-header {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.glass-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fce09b, #eed07d);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.subtitle {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.current-datetime {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.date-badge {
    background: rgba(252, 224, 155, 0.15);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.countdown-clock-main {
    font-family: 'Roboto Mono', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 25px var(--accent-glow);
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.5rem;
}

.next-event-text {
    font-size: 1.3rem;
    color: var(--accent-color);
}

.fiqa-selector {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.fiqa-selector label {
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.fiqa-selector label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.fiqa-selector input[type="radio"] {
    accent-color: var(--accent-color);
    width: 1.2rem;
    height: 1.2rem;
}

/* Ticker Countdown */
.ticker-container {
    background: linear-gradient(135deg, rgba(239, 71, 111, 0.15), rgba(22, 61, 39, 0.9));
    border: 1px solid rgba(239, 71, 111, 0.4);
    border-radius: 24px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 0 35px rgba(239, 71, 111, 0.25);
    transition: all 0.5s ease;
    overflow: hidden;
    position: relative;
}

.ticker-container.hidden {
    display: none;
}

.ticker-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.pulse-ring {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--danger-color);
    box-shadow: 0 0 0 0 rgba(239, 71, 111, 0.7);
    animation: pulse 1.5s infinite;
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 71, 111, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(239, 71, 111, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 71, 111, 0);
    }
}

.ticker-text h2 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.countdown-clock {
    font-family: 'Roboto Mono', monospace;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    font-variant-numeric: tabular-nums;
}

/* Permanent Duas Section */
.duas-section {
    margin-top: 1rem;
    text-align: center;
}

.duas-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.duas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dua-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.dua-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
}

.dua-card h3 {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(252, 224, 155, 0.2);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.dua-card .arabic {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 1rem;
    font-family: 'Amiri', 'Traditional Arabic', serif;
    color: var(--text-primary);
    line-height: 1.6;
}

.dua-card .transliteration {
    font-size: 0.95rem;
    font-style: italic;
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

.dua-card .translation {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Today's Times */
.today-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.detail-box {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.8rem 1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.detail-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.detail-box.active-highlight {
    animation: activeBlink 2s infinite alternate;
    border-color: var(--success-color);
}

@keyframes activeBlink {
    0% {
        box-shadow: 0 0 5px rgba(6, 214, 160, 0.2);
        background: rgba(6, 214, 160, 0.05);
    }

    100% {
        box-shadow: 0 0 25px rgba(6, 214, 160, 0.8);
        background: rgba(6, 214, 160, 0.2);
    }
}

.detail-box h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.detail-box p {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
}

.highlight-time {
    color: var(--accent-color) !important;
    text-shadow: 0 0 10px var(--accent-glow);
}

.digital-clock-holder {
    background: linear-gradient(135deg, rgba(12, 31, 21, 0.9) 0%, rgba(6, 214, 160, 0.05) 100%);
    border: 1px solid rgba(6, 214, 160, 0.2);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.digital-clock-text {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--success-color);
    text-shadow: 0 0 10px rgba(6, 214, 160, 0.6);
    font-variant-numeric: tabular-nums;
    margin-top: 0.2rem;
    letter-spacing: 1px;
    white-space: nowrap;
}

.am-pm {
    font-size: 0.9rem;
    margin-left: 0.3rem;
    opacity: 0.8;
}

/* Calendar Table */
.calendar-section {
    margin-top: 1rem;
}

.calendar-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

th {
    padding: 1.2rem 1rem;
    text-align: center;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.2);
}

th:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

th:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

td {
    padding: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    transition: background 0.3s ease;
}

td:first-child {
    border-left: 1px solid var(--glass-border);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    font-weight: 600;

}

td:last-child {
    border-right: 1px solid var(--glass-border);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

tr:hover td {
    background: rgba(252, 224, 155, 0.08);
}

.today-row td {
    background: rgba(19, 214, 77, 0.2);
    border-color: var(--accent-color);
    font-weight: 600;
    color: var(--text-primary);
}

.today-row:hover td {
    background: rgba(252, 224, 155, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
    .details-grid {
        grid-template-columns: 1fr;
    }

    #current-time {
        font-size: 1.4rem;
        text-align: center;
        line-height: 1.2;
    }

    .countdown-clock {
        font-size: 2.8rem;
    }

    h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 576px) {
    .details-grid {
        grid-template-columns: 1fr;
    }

    #current-time {
        font-size: 1.6rem;
        font-weight: 600;
        text-align: center;
        line-height: 1.1;
    }

    .am-pm {
        display: block;
        font-size: 1.2rem;
        font-weight: 600;
        margin-top: 0.2rem;
    }

    .countdown-clock {
        font-size: 2.8rem;
    }

    h1 {
        font-size: 2.2rem;
    }
}

/* Desktop layout now fully handled by Bootstrap CSS framework */