/* ==========================================================================
   Islamic Calendar & Salah Times CSS Design System
   Theme: Deep Emerald & Royal Gold with Elegant Glassmorphism
   ========================================================================== */

/* Custom Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Color System */
    --bg-primary: #030a07; /* Dark Emerald Black */
    --bg-secondary: rgba(8, 25, 18, 0.7); /* Translucent Emerald Card */
    --bg-secondary-solid: #092015; /* Solid dark emerald */
    --accent-emerald: #10b981; /* Vibrant Emerald */
    --accent-gold: #d4af37; /* Metallic Gold */
    --accent-gold-glow: rgba(212, 175, 55, 0.35);
    --accent-gold-hover: #e5c158;
    --text-primary: #e6f4ed; /* Soft minty white */
    --text-muted: #8cbba4; /* Muted mint green */
    --border-color: rgba(212, 175, 55, 0.15); /* Delicate gold border */
    --border-hover: rgba(212, 175, 55, 0.35);

    /* Layout & Styling Tokens */
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
    --shadow-premium: 0 10px 30px -5px rgba(0, 0, 0, 0.5),
                      0 0 15px 0 rgba(16, 185, 129, 0.05);
    --shadow-glow: 0 0 20px 2px rgba(212, 175, 55, 0.2);

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.15s ease;
}

body {
    font-family: 'Outfit', 'Cairo', 'Amiri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Dynamic Background & Ambient Lighting
   -------------------------------------------------------------------------- */
.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    background-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle 4s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

.ambient-glow {
    position: fixed;
    top: -10%;
    left: 20%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(212, 175, 55, 0.02) 50%, rgba(3, 10, 7, 0) 100%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
    animation: float-glow 20s infinite ease-in-out alternate;
}

@keyframes float-glow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* --------------------------------------------------------------------------
   App Container & Navigation Header
   -------------------------------------------------------------------------- */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px 120px 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    margin-bottom: 32px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.arabic-logo {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
    user-select: none;
}

.title-sub h1 {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-sub p {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 16px;
}

.location-widget, .clock-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(10, 32, 22, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 0.9rem;
    color: var(--text-primary);
    backdrop-filter: blur(8px);
}

.status-icon {
    width: 16px;
    height: 16px;
    color: var(--accent-gold);
}

.settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--accent-gold);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.settings-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--accent-gold);
    transform: rotate(45deg);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* --------------------------------------------------------------------------
   Grid Layout & Glassmorphism Cards
   -------------------------------------------------------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    flex-grow: 1;
}

.grid-column {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.glass-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.6),
                0 0 20px 0 rgba(212, 175, 55, 0.08);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% -20%, rgba(212, 175, 55, 0.15) 0%, rgba(0, 0, 0, 0) 60%);
    pointer-events: none;
    z-index: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

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

.header-icon {
    width: 20px;
    height: 20px;
}

.text-gold {
    color: var(--accent-gold);
}

.card-header h3 {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Hero Hijri Date Card
   -------------------------------------------------------------------------- */
.hero-card {
    padding: 32px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(8, 30, 20, 0.8) 0%, rgba(3, 12, 8, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    min-height: 200px;
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    opacity: 0.04;
    background-image: radial-gradient(circle, var(--accent-gold) 1px, transparent 1px);
    background-size: 16px 16px;
    pointer-events: none;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 32px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Interactive Moon Phase Sphere */
.moon-phase-wrapper {
    flex-shrink: 0;
    position: relative;
    width: 90px;
    height: 90px;
    cursor: help;
}

.moon-sphere {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #151e1a;
    position: relative;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.8),
                0 0 20px rgba(212, 175, 55, 0.1);
    overflow: hidden;
}

/* Shadow and Light layers which we animate dynamically using CSS custom variables */
.moon-light {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, #ffeaa7 0%, var(--accent-gold) 80%);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    transition: var(--transition-smooth);
}

.moon-shadow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #060e0a;
    transition: var(--transition-smooth);
}

.date-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.arabic-date-callout {
    font-family: 'Cairo', 'Amiri', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 0.5px;
}

.hijri-date-title {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    margin: 4px 0;
}

.gregorian-date-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.day-greeting {
    display: inline-block;
    align-self: flex-start;
    margin-top: 8px;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-emerald);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Prayer Times Card
   -------------------------------------------------------------------------- */
.next-prayer-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    color: var(--accent-gold);
}

.prayer-times-list {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prayer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(10, 32, 22, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.05);
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
}

.prayer-item:hover {
    background: rgba(10, 32, 22, 0.6);
    border-color: rgba(212, 175, 55, 0.1);
    transform: translateX(4px);
}

.prayer-name-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prayer-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: transparent;
    transition: var(--transition-smooth);
}

.prayer-name {
    font-weight: 500;
    font-size: 1.05rem;
}

.prayer-arabic {
    font-family: 'Cairo', 'Amiri', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 6px;
}

.prayer-time {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* Active / Current Prayer State styling */
.prayer-item.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.05);
}

.prayer-item.active .prayer-indicator {
    background-color: var(--accent-gold);
    box-shadow: 0 0 8px var(--accent-gold);
    animation: pulse-glow 1.5s infinite;
}

.prayer-item.active .prayer-name {
    color: var(--accent-gold);
    font-weight: 600;
}

.prayer-item.active .prayer-time {
    color: var(--accent-gold);
    font-size: 1.2rem;
}

@keyframes pulse-glow {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(1); opacity: 0.5; }
}

.sunrise-item {
    opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Islamic Events Card
   -------------------------------------------------------------------------- */
.events-year {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.events-list {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    background: rgba(10, 32, 22, 0.3);
    border-left: 3px solid rgba(16, 185, 129, 0.3);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    transition: var(--transition-smooth);
}

.event-item:hover {
    background: rgba(10, 32, 22, 0.5);
    border-left-color: var(--accent-gold);
}

.event-item.upcoming {
    border-left-color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.05);
}

.event-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}

.event-item.upcoming .event-date-box {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
}

.event-day {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
}

.event-month {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.event-details {
    flex-grow: 1;
}

.event-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.event-gregorian {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.event-countdown {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    text-align: center;
    white-space: nowrap;
}

.event-item.upcoming .event-countdown {
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
}

/* --------------------------------------------------------------------------
   Monthly Calendar Card
   -------------------------------------------------------------------------- */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.cal-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(10, 32, 22, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.cal-nav-btn:hover {
    background: var(--accent-gold);
    color: var(--bg-primary);
    border-color: var(--accent-gold);
}

.calendar-title-wrapper {
    text-align: center;
}

.hijri-month-name {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.gregorian-month-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.weekdays-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(16, 185, 129, 0.05);
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 12px 16px;
}

.cal-day {
    position: relative;
    aspect-ratio: 1.1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 6px;
    background: rgba(10, 32, 22, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.03);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    cursor: pointer;
    user-select: none;
    text-align: center;
}

.cal-day:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(212, 175, 55, 0.2);
}

.cal-day.empty {
    background: transparent;
    border: none;
    cursor: default;
    pointer-events: none;
}

.cal-hijri-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.cal-greg-num {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1;
    opacity: 0.75;
}

.cal-day.today {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--accent-gold);
    box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.2);
}

.cal-day.today .cal-hijri-num {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.cal-day.event-day-cell {
    border-bottom: 2px solid var(--accent-emerald);
}

.cal-day.event-day-cell::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--accent-emerald);
}

/* --------------------------------------------------------------------------
   Date Converter Card
   -------------------------------------------------------------------------- */
.tab-headers {
    display: flex;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(16, 185, 129, 0.02);
}

.tab-btn.active {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
    font-weight: 600;
    background: rgba(212, 175, 55, 0.04);
}

.tab-contents {
    padding: 24px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(10, 32, 22, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: var(--transition-smooth);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent-gold);
    background: rgba(10, 32, 22, 0.7);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

.form-input option {
    background-color: var(--bg-secondary-solid);
    color: var(--text-primary);
}

.triple-fields {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 12px;
}

.conversion-result-box {
    margin-top: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 1px dashed rgba(212, 175, 55, 0.3);
    border-radius: var(--border-radius-md);
    text-align: center;
    animation: fade-in-up 0.4s ease;
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.result-value {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1.2;
}

.result-arabic {
    font-family: 'Cairo', 'Amiri', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 6px;
}

.result-weekday {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Settings Modal Dialog
   -------------------------------------------------------------------------- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 10, 7, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-secondary-solid);
    border: 1px solid var(--accent-gold);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), var(--shadow-glow);
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition-smooth);
}

.modal-backdrop.open .modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title h3 {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.08);
}

.settings-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-section h4 svg {
    width: 16px;
    height: 16px;
}

.settings-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: -6px;
}

/* Toggle Switch Control */
.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
}

.switch-container {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 32, 22, 0.8);
    border: 1px solid var(--border-color);
    transition: .4s;
    border-radius: 24px;
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-toggle {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-emerald);
}

input:checked + .slider-toggle:before {
    transform: translateX(24px);
    background-color: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
}

.checkbox-label-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(16, 185, 129, 0.1);
    display: flex;
    justify-content: flex-end;
}

.modal-save-btn {
    background: var(--accent-gold);
    color: var(--bg-primary);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-save-btn:hover {
    background: var(--accent-gold-hover);
    box-shadow: 0 0 15px var(--accent-gold-glow);
}

/* --------------------------------------------------------------------------
   App Footer
   -------------------------------------------------------------------------- */
.app-footer {
    text-align: center;
    padding: 32px 0 16px 0;
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(16, 185, 129, 0.05);
}

/* Loading Spinners */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    width: 100%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-gold);
    animation: spin 1s ease-in-out infinite;
}

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

/* --------------------------------------------------------------------------
   Merged Location Search Bar Styles
   -------------------------------------------------------------------------- */
.search-location-container {
    position: relative;
    max-width: 420px;
    width: 100%;
    margin: 0 16px;
    z-index: 100;
}

.search-location-box {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    background: rgba(10, 32, 22, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
    backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
}

.search-location-box:focus-within {
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
    background: rgba(10, 32, 22, 0.6);
}

.search-field-icon {
    width: 16px;
    height: 16px;
    color: var(--accent-gold);
    margin-right: 8px;
    flex-shrink: 0;
}

#location-search-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    width: 100%;
}

#location-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.search-field-btn {
    background: var(--accent-gold);
    color: var(--bg-primary);
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.search-field-btn:hover {
    background: var(--accent-gold-hover);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.reset-location-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: var(--transition-smooth);
    margin-left: 4px;
    flex-shrink: 0;
}

.reset-location-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    transform: scale(1.1);
}

/* Floating multiple location results dropdown */
.search-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--bg-secondary-solid);
    border: 1px solid var(--accent-gold);
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), var(--shadow-glow);
    z-index: 1000;
    max-height: 220px;
    overflow-y: auto;
    display: none;
}

.search-dropdown-list.active {
    display: block;
}

.search-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: var(--transition-fast);
    border-bottom: 1px solid rgba(16, 185, 129, 0.05);
    color: var(--text-primary);
    text-align: left;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover,
.search-dropdown-item.keyboard-focused {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
}

/* Language Switcher Button */
.lang-toggle-btn {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 14px;
    font-family: 'Cairo', 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lang-toggle-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-emerald);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

/* Next upcoming Salah event highlight */
.prayer-item.next-highlight {
    border: 1px solid var(--accent-gold);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.12) 0%, rgba(10, 32, 22, 0.4) 100%);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.05);
    transform: scale(1.02);
}

.prayer-item.next-highlight .prayer-indicator {
    background-color: var(--accent-gold);
    box-shadow: 0 0 8px var(--accent-gold);
    animation: pulse-glow 1.5s infinite;
}

.prayer-item.next-highlight .prayer-name {
    color: var(--accent-gold);
    font-weight: 600;
}

.prayer-item.next-highlight .prayer-time {
    color: var(--accent-gold);
    font-size: 1.15rem;
}

/* --------------------------------------------------------------------------
   Fullscreen Preloader Styles
   -------------------------------------------------------------------------- */
body.preloader-active {
    overflow: hidden !important;
}

.preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.preloader-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.preloader-moon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #111a16;
    position: relative;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.9), 0 0 35px rgba(212, 175, 55, 0.2);
    overflow: hidden;
}

.preloader-light {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, #ffeaa7 0%, var(--accent-gold) 80%);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}

.preloader-shadow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #030a07;
    animation: preloader-moon-cycle 3s infinite linear;
}

@keyframes preloader-moon-cycle {
    0% { transform: translateX(0%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(200%); }
}

.preloader-logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.preloader-logo-arabic {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    line-height: 1.2;
}

.preloader-title {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
    line-height: 1;
}

.preloader-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    animation: pulse-text 2s infinite ease-in-out;
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Arabic RTL Reflow Styles
   -------------------------------------------------------------------------- */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .cal-nav-btn svg {
    transform: rotate(180deg);
}

[dir="rtl"] body {
    font-family: 'Outfit', 'Cairo', 'Amiri', -apple-system, sans-serif;
}

[dir="rtl"] .main-header {
    /* Rely on browser-native RTL flex layout */
}

[dir="rtl"] .logo-area {
    text-align: right;
}

[dir="rtl"] .header-status {
    /* Rely on browser-native RTL flex layout */
}

[dir="rtl"] .search-location-box {
    padding: 4px 16px 4px 4px;
}

[dir="rtl"] .search-field-icon {
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .search-dropdown-item {
    text-align: right;
}

[dir="rtl"] .prayer-name-info {
    flex-direction: row-reverse;
}

[dir="rtl"] .prayer-indicator {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .event-item {
    border-left: none;
    border-right: 3px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    flex-direction: row-reverse;
}

[dir="rtl"] .event-item.upcoming {
    border-right-color: var(--accent-gold);
}



/* --------------------------------------------------------------------------
   Media Queries & Responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .main-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding-bottom: 20px;
    }

    [dir="rtl"] .main-header {
        flex-direction: column;
    }

    .search-location-container {
        margin: 0;
        max-width: 100%;
        order: 3;
    }

    /* Removed header status rules */

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .app-container {
        padding: 16px 12px 120px 12px;
    }

    .logo-area {
        justify-content: center;
    }

    /* Removed mobile header status rules */

    .hero-card {
        padding: 24px 16px;
    }

    .hero-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .hijri-date-title {
        font-size: 1.8rem;
    }

    .day-greeting {
        align-self: center;
    }

    .triple-fields {
        grid-template-columns: 1fr;
    }

    .tab-btn {
        padding: 12px 6px;
        font-size: 0.85rem;
    }

    .cal-day {
        aspect-ratio: 1;
        padding: 4px;
    }

    .cal-hijri-num {
        font-size: 1.1rem;
    }

    .cal-greg-num {
        font-size: 0.7rem;
    }

    .cal-day.event-day-cell::after {
        display: none;
    }

    .bottom-nav .clock-widget .status-icon {
        display: none;
    }
}

/* Accessibility Focus outlines */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

.footer-link {
    color: var(--accent-gold);
    text-decoration: none;
    transition: var(--transition-fast);
    font-weight: 500;
}
.footer-link:hover {
    color: var(--accent-gold-hover);
    text-decoration: underline;
}

/* Modal Active State - Hide Bottom Nav with Slide-out Animation */
body.modal-active .bottom-nav {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 40px);
}

/* Shimmer Animation Keyframes */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Skeleton Loading Card Overlays */
.glass-card.loading-state::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 10, 7, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10;
    transition: var(--transition-smooth);
}

/* Hero card loading skeleton details */
.hero-card.loading-state .arabic-date-callout,
.hero-card.loading-state .hijri-date-title,
.hero-card.loading-state .gregorian-date-sub,
.hero-card.loading-state .day-greeting {
    position: relative;
    color: transparent !important;
    background: linear-gradient(90deg, rgba(10, 32, 22, 0.6) 25%, rgba(212, 175, 55, 0.08) 50%, rgba(10, 32, 22, 0.6) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite linear;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
    pointer-events: none;
    text-shadow: none !important;
}

.hero-card.loading-state .arabic-date-callout { width: 140px; height: 20px; }
.hero-card.loading-state .hijri-date-title { width: 220px; height: 36px; margin: 8px 0; }
.hero-card.loading-state .gregorian-date-sub { width: 180px; height: 16px; }
.hero-card.loading-state .day-greeting { width: 100px; height: 24px; border: none !important; }
.hero-card.loading-state .moon-sphere {
    opacity: 0.3;
}

/* Prayer times loading skeleton details */
.prayer-card.loading-state .prayer-time {
    color: transparent !important;
    background: linear-gradient(90deg, rgba(10, 32, 22, 0.6) 25%, rgba(212, 175, 55, 0.08) 50%, rgba(10, 32, 22, 0.6) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite linear;
    border-radius: 4px;
    width: 70px;
    height: 20px;
    display: inline-block;
}
.prayer-card.loading-state .next-prayer-badge {
    opacity: 0.2;
}

/* Calendar loading skeleton details */
.calendar-card.loading-state .cal-day:not(.empty) {
    pointer-events: none;
}
.calendar-card.loading-state .cal-hijri-num,
.calendar-card.loading-state .cal-greg-num {
    color: transparent !important;
    text-shadow: none !important;
    background: linear-gradient(90deg, rgba(10, 32, 22, 0.6) 25%, rgba(212, 175, 55, 0.08) 50%, rgba(10, 32, 22, 0.6) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite linear;
    border-radius: 4px;
}
.calendar-card.loading-state .cal-hijri-num { width: 24px; height: 20px; }
.calendar-card.loading-state .cal-greg-num { width: 14px; height: 12px; }

/* Events list loading skeleton details */
.events-card.loading-state .event-item {
    pointer-events: none;
}
.events-card.loading-state .event-day,
.events-card.loading-state .event-month,
.events-card.loading-state .event-name,
.events-card.loading-state .event-gregorian,
.events-card.loading-state .event-countdown {
    color: transparent !important;
    background: linear-gradient(90deg, rgba(10, 32, 22, 0.6) 25%, rgba(212, 175, 55, 0.08) 50%, rgba(10, 32, 22, 0.6) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite linear;
    border-radius: 4px;
}
.events-card.loading-state .event-day { width: 20px; height: 20px; }
.events-card.loading-state .event-month { width: 30px; height: 12px; margin-top: 4px; }
.events-card.loading-state .event-name { width: 130px; height: 16px; }
.events-card.loading-state .event-gregorian { width: 90px; height: 12px; margin-top: 4px; }
.events-card.loading-state .event-countdown { width: 60px; height: 18px; }

/* Sticky Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 480px;
    background: rgba(8, 25, 18, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), var(--shadow-glow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 9999;
    padding: 8px 16px;
    transition: var(--transition-smooth);
}

.bottom-nav:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(212, 175, 55, 0.25);
}

.bottom-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.bottom-nav .clock-widget {
    background: rgba(10, 32, 22, 0.5);
    flex-grow: 1;
    justify-content: center;
    border-radius: 20px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(16, 185, 129, 0.05);
}

.bottom-nav .lang-toggle-btn {
    border-radius: 20px;
    height: 40px;
    padding: 0 16px;
    white-space: nowrap;
}

.bottom-nav .settings-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}



/* ==========================================================================
   Dynamic Time-of-Day Themes
   ========================================================================== */
body.theme-fajr {
    --theme-glow-color-1: rgba(99, 102, 241, 0.15);
    --theme-glow-color-2: rgba(168, 85, 247, 0.05);
}
body.theme-sunrise {
    --theme-glow-color-1: rgba(251, 146, 60, 0.18);
    --theme-glow-color-2: rgba(212, 175, 55, 0.08);
}
body.theme-dhuhr {
    --theme-glow-color-1: rgba(56, 189, 248, 0.15);
    --theme-glow-color-2: rgba(253, 224, 71, 0.08);
}
body.theme-asr {
    --theme-glow-color-1: rgba(217, 119, 6, 0.15);
    --theme-glow-color-2: rgba(16, 185, 129, 0.04);
}
body.theme-maghrib {
    --theme-glow-color-1: rgba(239, 68, 68, 0.15);
    --theme-glow-color-2: rgba(124, 58, 237, 0.08);
}
body.theme-isha {
    --theme-glow-color-1: rgba(15, 23, 42, 0.25);
    --theme-glow-color-2: rgba(99, 102, 241, 0.04);
}

.ambient-glow {
    background: radial-gradient(circle, var(--theme-glow-color-1, rgba(16, 185, 129, 0.08)) 0%, var(--theme-glow-color-2, rgba(212, 175, 55, 0.02)) 50%, rgba(3, 10, 7, 0) 100%);
    transition: background 2s ease-in-out;
}

/* ==========================================================================
   SVG Preloader Path Drawing
   ========================================================================== */
.preloader-emblem {
    margin-bottom: 24px;
    animation: emblem-float 4s infinite ease-in-out;
}
.star-outline {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: draw-path 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.crescent-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: draw-path 2.5s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}
.inner-star {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-path 2s cubic-bezier(0.4, 0, 0.2, 1) 1s forwards;
    fill: transparent;
    transition: fill 1.5s ease-in-out 2s;
}
body:not(.preloader-active) .inner-star {
    fill: var(--accent-gold);
}
@keyframes draw-path {
    to { stroke-dashoffset: 0; }
}
@keyframes emblem-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ==========================================================================
   Moon Phase Sphere Polish
   ========================================================================== */
.moon-shadow {
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), left 1.2s ease, right 1.2s ease;
}
.moon-sphere::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-gold-glow) 0%, rgba(212, 175, 55, 0) 70%);
    z-index: -1;
    pointer-events: none;
    opacity: var(--moon-illumination, 0.5);
    transition: opacity 1.2s ease;
    animation: pulse-halo 3s infinite alternate;
}
@keyframes pulse-halo {
    0% { filter: blur(2px); }
    100% { filter: blur(5px); }
}

/* ==========================================================================
   Calendar Transitions
   ========================================================================== */
.days-grid {
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
}
.days-grid.slide-out-left {
    transform: translateX(-30px);
    opacity: 0;
}
.days-grid.slide-out-right {
    transform: translateX(30px);
    opacity: 0;
}
.days-grid.slide-in-left {
    animation: slide-in-left-anim 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}
.days-grid.slide-in-right {
    animation: slide-in-right-anim 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}
@keyframes slide-in-left-anim {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slide-in-right-anim {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Qibla Finder Card
   ========================================================================== */
.qibla-card {
}
.qibla-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.compass-container {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(10, 32, 22, 0.8) 0%, rgba(3, 10, 7, 0.9) 100%);
    border: 2px solid rgba(212, 175, 55, 0.15);
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.2), 0 0 15px rgba(0, 0, 0, 0.4);
}
.compass-dial {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform-style: preserve-3d;
}
.compass-cardinals {
    position: absolute;
    width: 100%;
    height: 100%;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.cardinal {
    position: absolute;
    transform: translateX(-50%);
}
.cardinal.N { top: 8px; left: 50%; color: var(--accent-emerald); }
.cardinal.E { right: 8px; top: 50%; transform: translate(50%, -50%); }
.cardinal.S { bottom: 8px; left: 50%; }
.cardinal.W { left: 8px; top: 50%; transform: translate(-50%, -50%); }

.qibla-needle {
    position: absolute;
    top: 15px;
    left: 50%;
    width: 8px;
    height: 150px;
    transform: translateX(-50%);
    pointer-events: none;
}
.qibla-needle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 75px solid var(--accent-gold);
    filter: drop-shadow(0 0 5px var(--accent-gold-glow));
}
.qibla-needle::after {
    content: '';
    position: absolute;
    top: 75px;
    left: 0;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 75px solid var(--text-muted);
    opacity: 0.5;
}
.compass-dial::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--accent-gold);
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.8);
    z-index: 10;
}
.qibla-info-panel {
    display: flex;
    gap: 32px;
    width: 100%;
    justify-content: center;
    text-align: center;
}
.qibla-bearing, .qibla-status-desc {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-gold);
}
.compass-permission-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-emerald);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.compass-permission-btn:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: scale(1.1);
}
.qibla-help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
    text-align: center;
}
.qibla-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.85rem;
    width: 100%;
}
.qibla-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.qibla-status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.qibla-status-badge.static {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}
.qibla-status-badge.static::before {
    background: #888888;
}
.qibla-status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--accent-emerald);
}
.qibla-status-badge.active::before {
    background: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
    animation: pulse-dot 1.5s infinite;
}
.qibla-status-badge.relative {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #f59e0b;
}
.qibla-status-badge.relative::before {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}
.qibla-status-badge.calibrating {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #3b82f6;
}
.qibla-status-badge.calibrating::before {
    background: #3b82f6;
    animation: pulse-dot 1s infinite;
}
.qibla-current-heading {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.qibla-current-heading strong {
    color: var(--text-primary);
    margin-left: 4px;
}
[dir="rtl"] .qibla-current-heading strong {
    margin-left: 0;
    margin-right: 4px;
}
@keyframes pulse-dot {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* ==========================================================================
   Tasbih Counter Modal
   ========================================================================== */
.tasbih-controls-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tasbih-small-select {
    background: rgba(10, 32, 22, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 6px;
    outline: none;
    cursor: pointer;
}
.dhikr-selector-wrapper {
    width: 100%;
}
.dhikr-select {
    text-align: center;
    font-weight: 600;
    cursor: pointer;
}
.custom-dhikr-input {
    text-align: center;
}
.tasbih-clicker-area {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    user-select: none;
    transition: transform 0.1s ease;
}
.tasbih-clicker-area:active {
    transform: scale(0.96);
}
.tasbih-progress-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.progress-bg {
    fill: rgba(10, 32, 22, 0.4);
    stroke: rgba(16, 185, 129, 0.08);
    stroke-width: 8px;
}
.progress-bar {
    fill: none;
    stroke: var(--accent-gold);
    stroke-width: 8px;
    stroke-linecap: round;
    stroke-dasharray: 502.6;
    stroke-dashoffset: 502.6;
    transition: stroke-dashoffset 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 3px var(--accent-gold-glow));
}
.tasbih-count-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}
.tasbih-count {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}
.tasbih-phrase-display {
    font-size: 0.85rem;
    color: var(--accent-emerald);
    font-weight: 600;
    margin-top: 6px;
    letter-spacing: 0.5px;
    max-width: 140px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Ramadan Mode Banner
   ========================================================================== */
.ramadan-banner-card {
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(8, 30, 20, 0.9) 0%, rgba(212, 175, 55, 0.08) 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    animation: banner-glow 4s infinite alternate;
}
@keyframes banner-glow {
    0% { box-shadow: var(--shadow-premium); }
    100% { box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 20px 2px rgba(212, 175, 55, 0.15); }
}
.ramadan-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.ramadan-banner-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.ramadan-icon {
    width: 28px;
    height: 28px;
    animation: pulse-glow 2s infinite;
}
.ramadan-banner-title-area h3 {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.4rem;
    color: var(--accent-gold);
    font-weight: 700;
}
.ramadan-intent-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.ramadan-banner-right {
    display: flex;
    align-items: center;
}
.ramadan-timer-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: rgba(10, 32, 22, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 8px 16px;
    border-radius: var(--border-radius-md);
}
.timer-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.timer-countdown {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 1px;
}

/* ==========================================================================
   Daily Quote Card
   ========================================================================== */
.quote-card {
}
.quote-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 160px;
    justify-content: center;
}
.quote-arabic {
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--accent-gold);
    direction: rtl;
    text-align: center;
}
.quote-english {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    font-style: italic;
    text-align: center;
}
.quote-source {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
    font-weight: 600;
    margin-top: 4px;
}

/* ==========================================================================
   Interactive Micro-transactions & Polish
   ========================================================================== */
.action-btn-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(10, 32, 22, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.action-btn-circle:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: scale(1.08);
}
.action-btn-circle:active {
    transform: scale(0.95);
}

/* Shimmer Overlay on Card Hover */
.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.03) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    pointer-events: none;
    z-index: 5;
}
.glass-card:hover::after {
    animation: shimmer-hover 1.2s ease-in-out;
}
@keyframes shimmer-hover {
    100% { left: 200%; }
}






