/* =====================================================================
   KALENDER HIJRIAH - Islamic Design System
   Hijriah.com — Modern Islamic Calendar
   ===================================================================== */

/* --- CSS Custom Properties (Theme) --- */
:root {
    /* Islamic Green Palette */
    --primary-950: #041f1a;
    --primary-900: #0a2f2a;
    --primary-800: #0d4b40;
    --primary-700: #116b5a;
    --primary-600: #158d74;
    --primary-500: #1aad8e;
    --primary-400: #33c4a6;
    --primary-300: #66d4bc;
    --primary-200: #99e3d2;
    --primary-100: #ccf1e8;
    --primary-50:  #e8f9f4;

    /* Gold Accent */
    --gold-700: #7a5c0f;
    --gold-600: #9a7513;
    --gold-500: #b8860b;
    --gold-400: #c9a84c;
    --gold-300: #d4bf7a;
    --gold-200: #e5d9a8;
    --gold-100: #f5efd6;
    --gold-50:  #faf7ec;

    /* Neutrals */
    --cream-50:  #fdfcf8;
    --cream-100: #faf7f0;
    --cream-200: #f0eadb;
    --cream-300: #e0d5c0;
    --text-900:  #1a1a2e;
    --text-700:  #374151;
    --text-500:  #6b7280;
    --text-300:  #9ca3af;
    --text-100:  #f3f4f6;

    /* Semantic Colors */
    --friday-bg:    rgba(22, 125, 106, 0.07);
    --sunday-bg:    rgba(220, 53, 69, 0.05);
    --today-bg:     rgba(26, 173, 142, 0.12);
    --today-glow:   0 0 24px rgba(26, 173, 142, 0.35);
    --holiday-bg:   rgba(184, 134, 11, 0.10);
    --ramadan-bg:   rgba(26, 173, 142, 0.04);

    /* Typography */
    --font-arabic:  'Amiri', 'Traditional Arabic', serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md:  0 4px 14px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg:  0 10px 40px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
    --shadow-xl:  0 20px 60px rgba(0,0,0,0.15), 0 8px 24px rgba(0,0,0,0.08);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-900);
    min-height: 100vh;
    line-height: 1.6;
    background: var(--primary-950);
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(22, 125, 106, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(184, 134, 11, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(10, 47, 42, 0.6) 0%, transparent 100%);
    background-attachment: fixed;
}

/* Subtle Islamic star pattern overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M40 0L45 32L80 40L45 48L40 80L35 48L0 40L35 32Z' fill='%23ffffff'/%3E%3Cpath d='M40 20L42 35L57 40L42 45L40 60L38 45L23 40L38 35Z' fill='%23ffffff' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    z-index: 0;
}

a {
    color: var(--gold-500);
    text-decoration: none;
    transition: color 0.3s var(--ease);
}

a:hover {
    color: var(--gold-400);
}

/* --- App Container --- */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s var(--ease);
}

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

/* --- Islamic Header --- */
.site-header {
    text-align: center;
    padding: 32px 20px 24px;
    margin-bottom: 24px;
}

.header-ornament {
    color: var(--gold-500);
    font-size: 10px;
    letter-spacing: 12px;
    opacity: 0.7;
    margin: 8px 0;
}

.bismillah {
    font-family: var(--font-arabic);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--gold-400);
    margin-bottom: 16px;
    line-height: 2;
    text-shadow: 0 2px 8px rgba(184, 134, 11, 0.2);
}

.site-title {
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--cream-50);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.title-icon {
    color: var(--gold-500);
    font-size: 1.1em;
}

.site-subtitle {
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: var(--primary-300);
    font-weight: 300;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

/* --- Main Content Layout --- */
.main-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    flex: 1;
    align-items: start;
}

/* --- Calendar Card --- */
.calendar-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* --- Calendar Navigation --- */
.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 100%);
    border-bottom: 3px solid var(--gold-500);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    color: var(--cream-100);
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--gold-300);
    transform: translateY(-1px);
}

.nav-icon {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
}

.nav-title {
    flex: 1;
    text-align: center;
}

.nav-title h2 {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

/* --- Hijri Range Display --- */
.hijri-range {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    background: var(--gold-50);
    border-bottom: 1px solid var(--gold-100);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--gold-700);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.hijri-divider {
    color: var(--gold-300);
}

/* --- Weekday Headers --- */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--primary-50);
    border-bottom: 1px solid var(--primary-100);
}

.weekday {
    padding: 12px 4px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weekday.friday {
    color: var(--primary-600);
    background: var(--friday-bg);
}

.weekday.sunday {
    color: #c0392b;
    background: var(--sunday-bg);
}

.weekday-short {
    display: none;
}

/* --- Calendar Grid --- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--cream-200);
    padding: 1px;
}

.day-cell {
    background: white;
    min-height: 72px;
    padding: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.25s var(--ease);
    cursor: default;
}

.day-cell:not(.empty):hover {
    background: var(--primary-50);
    transform: scale(1.02);
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.day-cell.empty {
    background: var(--cream-50);
}

.day-cell.sunday {
    background: var(--sunday-bg);
}

.day-cell.friday {
    background: var(--friday-bg);
}

.day-cell.ramadan {
    background: var(--ramadan-bg);
}

.day-cell.holiday {
    background: var(--holiday-bg);
}

/* Today */
.day-cell.today {
    background: var(--today-bg);
    box-shadow: var(--today-glow);
    border-radius: var(--radius-sm);
}

.day-cell.today .greg-date {
    background: var(--primary-600);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    animation: todayPulse 2.5s ease-in-out infinite;
}

@keyframes todayPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(26, 173, 142, 0.3); }
    50%      { box-shadow: 0 0 0 8px rgba(26, 173, 142, 0); }
}

/* Gregorian Date */
.greg-date {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-900);
    line-height: 1;
}

.day-cell.sunday .greg-date {
    color: #c0392b;
}

.day-cell.friday .greg-date {
    color: var(--primary-700);
}

/* Hijri Date */
.hijri-date {
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1;
}

.hijri-date.prev {
    color: #c0392b;
}

.hijri-date.next {
    color: var(--primary-600);
}

/* Holiday Indicator */
.holiday-dot {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-500);
    box-shadow: 0 0 6px rgba(184, 134, 11, 0.4);
}

.day-cell.holiday:hover .holiday-dot::after {
    content: attr(title);
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-900);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

/* --- Month/Year Selector --- */
.calendar-selector {
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 100%);
    border-top: 3px solid var(--gold-500);
}

.selector-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.select-input,
.year-input {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all 0.3s var(--ease);
}

.select-input:focus,
.year-input:focus {
    outline: none;
    border-color: var(--gold-400);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}

.select-input option {
    background: var(--primary-900);
    color: white;
}

.year-input {
    width: 90px;
    text-align: center;
}

/* Remove number input arrows */
.year-input::-webkit-outer-spin-button,
.year-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.year-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.btn-show {
    padding: 10px 28px;
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    letter-spacing: 0.5px;
}

.btn-show:hover {
    background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.3);
}

.btn-show:active {
    transform: translateY(0);
}

/* ===== INFO SIDEBAR ===== */
.info-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: fadeInUp 0.6s var(--ease);
    animation-fill-mode: both;
}

.info-card:nth-child(2) { animation-delay: 0.1s; }
.info-card:nth-child(3) { animation-delay: 0.2s; }

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 100%);
    border-bottom: 2px solid var(--gold-500);
}

.card-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.3px;
    flex: 1;
}

.prayer-city {
    font-size: 0.75rem;
    color: var(--gold-300);
    font-weight: 500;
    padding: 3px 10px;
    background: rgba(255,255,255, 0.08);
    border-radius: 20px;
}

.card-body {
    padding: 20px;
}

/* --- Today Card --- */
.today-card .card-body {
    text-align: center;
}

.today-day-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 8px;
}

.today-greg {
    font-size: 1rem;
    color: var(--text-700);
    margin-bottom: 4px;
}

.today-hijri {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold-600);
    padding: 6px 16px;
    background: var(--gold-50);
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-top: 4px;
}

.today-holiday {
    margin-top: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-50), var(--gold-50));
    border-radius: var(--radius-sm);
    color: var(--primary-800);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--primary-100);
}

/* --- Events Card --- */
.events-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.events-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    padding: 10px 14px;
    background: var(--cream-50);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--gold-500);
    transition: all 0.25s var(--ease);
}

.events-list li:hover {
    background: var(--gold-50);
    transform: translateX(4px);
}

.event-date {
    grid-row: 1;
    grid-column: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-700);
}

.event-name {
    grid-row: 1;
    grid-column: 2;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-900);
}

.event-greg {
    grid-row: 2;
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: var(--text-500);
}

.no-events {
    color: var(--text-500);
    font-size: 0.85rem;
    text-align: center;
    font-style: italic;
    padding: 8px;
}

/* --- Support/Donation Card --- */
.donation-card {
    background: linear-gradient(135deg, var(--gold-50) 0%, var(--cream-50) 100%);
    border: 1px solid var(--gold-200);
}

.donation-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    5% { transform: scale(1.1); }
    10% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
}

.donation-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-700);
    margin-bottom: 8px;
}

.donation-text {
    font-size: 0.85rem;
    color: var(--text-700);
    margin-bottom: 16px;
    line-height: 1.5;
}

.btn-donate {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
    color: white;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.25);
}

.btn-donate:hover {
    background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(184, 134, 11, 0.35);
}

/* --- Prayer Times Card --- */
.prayer-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prayer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--cream-50);
    border-radius: var(--radius-sm);
    transition: all 0.25s var(--ease);
}

.prayer-item:hover {
    background: var(--primary-50);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.prayer-item.sunnah-item {
    background: linear-gradient(135deg, var(--gold-50) 0%, var(--cream-50) 100%);
    border-left: 3px solid var(--gold-400);
}

.prayer-item.sunnah-item:hover {
    background: linear-gradient(135deg, var(--gold-100) 0%, var(--primary-50) 100%);
}

.prayer-item.night-item {
    background: linear-gradient(135deg, rgba(10, 47, 42, 0.06) 0%, var(--cream-50) 100%);
    border-left: 3px solid var(--primary-500);
}

.prayer-item.night-item:hover {
    background: linear-gradient(135deg, rgba(10, 47, 42, 0.10) 0%, var(--primary-50) 100%);
}

.prayer-icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.prayer-name {
    font-size: 0.8rem;
    color: var(--text-700);
    font-weight: 500;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prayer-time {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-700);
    font-variant-numeric: tabular-nums;
}

/* Sunnah Badge */
.sunnah-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-500) 100%);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.5;
    box-shadow: 0 1px 4px rgba(26, 173, 142, 0.3);
}

/* Prayer Divider */
.prayer-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    margin: 4px 0;
}

.prayer-divider::before,
.prayer-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-200), transparent);
}

.prayer-divider span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Prayer Loading & Error */
.prayer-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 16px;
    color: var(--text-500);
    font-size: 0.85rem;
}

.prayer-loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}

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

.prayer-error {
    padding: 16px;
    text-align: center;
    color: #c0392b;
    font-size: 0.85rem;
    background: rgba(220, 53, 69, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(220, 53, 69, 0.15);
}

.prayer-source {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-300);
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--cream-200);
    letter-spacing: 0.3px;
}

/* Custom Checkmark */
.check-passed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a2b29f; /* Muted green like reference */
    margin-left: 6px;
    vertical-align: middle;
}

/* Next Prayer Highlight */
.prayer-item.prayer-next {
    background: #eaf1e8;
    border: 1px solid #c8d8c3;
    animation: pulseBg 3s infinite ease-in-out;
}

@keyframes pulseBg {
    0% { background-color: #eaf1e8; border-color: #c8d8c3; }
    50% { background-color: #f2f7f1; border-color: #d8ebd3; }
    100% { background-color: #eaf1e8; border-color: #c8d8c3; }
}

.prayer-item.prayer-next .prayer-name,
.prayer-item.prayer-next .prayer-time {
    color: #1b4b36;
    font-weight: 700;
}

/* --- City Selector --- */
.city-selector {
    margin-bottom: 14px;
}

.city-search-wrapper {
    position: relative;
}

.city-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    z-index: 2;
    pointer-events: none;
    line-height: 1;
}

.city-search-input {
    width: 100%;
    padding: 10px 12px 10px 34px;
    border: 1.5px solid var(--cream-300);
    border-radius: var(--radius-sm);
    background: var(--cream-50);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-900);
    transition: all 0.3s var(--ease);
    outline: none;
}

.city-search-input::placeholder {
    color: var(--text-500);
    font-weight: 500;
}

.city-search-input:focus {
    border-color: var(--primary-400);
    background: white;
    box-shadow: 0 0 0 3px rgba(26, 173, 142, 0.12);
}

.city-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 0;
    overflow-y: auto;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    opacity: 0;
    transition: all 0.25s var(--ease);
    border: 1px solid transparent;
}

.city-dropdown.open {
    max-height: 220px;
    opacity: 1;
    border-color: var(--cream-300);
}

.city-option {
    padding: 9px 14px;
    font-size: 0.8rem;
    color: var(--text-700);
    cursor: pointer;
    transition: all 0.15s var(--ease);
    border-bottom: 1px solid var(--cream-100);
}

.city-option:last-child {
    border-bottom: none;
}

.city-option:hover {
    background: var(--primary-50);
    color: var(--primary-700);
    padding-left: 18px;
}

.city-option.active {
    background: var(--primary-50);
    color: var(--primary-600);
    font-weight: 600;
}

.city-no-result {
    padding: 14px;
    text-align: center;
    color: var(--text-500);
    font-size: 0.8rem;
    font-style: italic;
}

.city-more {
    padding: 10px 14px;
    text-align: center;
    color: var(--text-300);
    font-size: 0.75rem;
    background: var(--cream-50);
}

/* --- Prayer Countdown --- */
.prayer-countdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--cream-50) 100%);
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 16px;
    border-left: 3px solid var(--primary-500);
}

.countdown-label {
    font-size: 0.8rem;
    color: var(--text-500);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-label strong {
    color: var(--primary-700);
    font-size: 0.9rem;
}

.countdown-timer {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-600);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    font-family: monospace;
    text-shadow: 0 2px 4px rgba(26, 173, 142, 0.15);
}

/* --- Date Converter Card --- */
.converter-card .card-body {
    padding: 0;
}

.converter-tabs {
    display: flex;
    border-bottom: 2px solid var(--cream-200);
}

.converter-tab {
    flex: 1;
    padding: 12px 10px;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-500);
    cursor: pointer;
    transition: all 0.3s var(--ease);
    position: relative;
}

.converter-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.3s var(--ease);
}

.converter-tab:hover {
    color: var(--primary-600);
    background: var(--primary-50);
}

.converter-tab.active {
    color: var(--primary-700);
}

.converter-tab.active::after {
    background: var(--primary-500);
}

.converter-panel {
    display: none;
    padding: 20px;
    animation: fadeInUp 0.3s var(--ease);
}

.converter-panel.active {
    display: block;
}

.converter-fields {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.conv-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1.5px solid var(--cream-300);
    border-radius: var(--radius-sm);
    background: var(--cream-50);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-900);
    transition: all 0.3s var(--ease);
    outline: none;
}

.conv-input:focus {
    border-color: var(--primary-400);
    background: white;
    box-shadow: 0 0 0 3px rgba(26, 173, 142, 0.12);
}

.conv-input.conv-year {
    max-width: 90px;
}

.conv-select {
    flex: 2;
    min-width: 0;
    padding: 10px 12px;
    border: 1.5px solid var(--cream-300);
    border-radius: var(--radius-sm);
    background: var(--cream-50);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-900);
    transition: all 0.3s var(--ease);
    outline: none;
    cursor: pointer;
}

.conv-select:focus {
    border-color: var(--primary-400);
    background: white;
    box-shadow: 0 0 0 3px rgba(26, 173, 142, 0.12);
}

/* Remove number arrows for conv-input */
.conv-input::-webkit-outer-spin-button,
.conv-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.conv-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.btn-convert {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    letter-spacing: 0.3px;
}

.btn-convert:hover {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(26, 173, 142, 0.3);
}

.btn-convert:active {
    transform: translateY(0);
}

.convert-result {
    margin-top: 14px;
}

.convert-success {
    text-align: center;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-50), var(--gold-50));
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary-100);
}

.convert-from {
    font-size: 0.85rem;
    color: var(--text-700);
    font-weight: 500;
}

.convert-arrow {
    font-size: 1.1rem;
    color: var(--primary-400);
    margin: 6px 0;
}

.convert-to {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-700);
}

.convert-error {
    display: block;
    text-align: center;
    padding: 10px;
    color: #c0392b;
    font-size: 0.8rem;
    background: rgba(220, 53, 69, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(220, 53, 69, 0.15);
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    margin-top: 32px;
}

.footer-links-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-heading {
    color: var(--gold-400);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.partner-link {
    color: var(--cream-100);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.partner-link:hover {
    color: var(--gold-300);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.partner-separator {
    color: var(--primary-600);
    font-size: 0.8rem;
}

.footer-bottom {
    padding: 24px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
}

.footer-ornament {
    color: var(--gold-500);
    font-size: 8px;
    letter-spacing: 16px;
    opacity: 0.5;
    margin-bottom: 12px;
}

.footer-credit,
.footer-site {
    font-size: 0.8rem;
    color: var(--primary-300);
    margin-bottom: 4px;
}

.footer-link {
    color: var(--gold-400);
    font-weight: 500;
    transition: color 0.3s var(--ease);
}

.footer-link:hover {
    color: var(--gold-300);
    text-decoration: underline;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

/* Desktop Large (> 1024px) — default layout above */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .info-panel {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 16px;
    }
}

/* Tablet Small (600px - 768px) */
@media (max-width: 768px) {
    .app-container {
        padding: 16px 12px;
    }

    .info-panel {
        grid-template-columns: 1fr 1fr;
    }

    .info-panel .prayer-card,
    .info-panel .converter-card {
        grid-column: 1 / -1;
    }

    .calendar-nav {
        padding: 14px 16px;
    }

    .nav-label {
        display: none;
    }

    .nav-btn {
        padding: 8px 10px;
    }

    .nav-icon {
        font-size: 1.5rem;
    }

    .bismillah {
        font-size: 1.1rem;
    }

    .day-cell {
        min-height: 60px;
        padding: 6px 4px;
    }

    .greg-date {
        font-size: 0.95rem;
    }
}

/* Mobile (< 600px) */
@media (max-width: 600px) {
    html {
        font-size: 14px;
    }

    .app-container {
        padding: 10px 8px;
    }

    .site-header {
        padding: 20px 12px 16px;
        margin-bottom: 16px;
    }

    .header-ornament {
        font-size: 8px;
        letter-spacing: 8px;
    }

    .bismillah {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .site-title {
        font-size: 1.3rem;
        gap: 8px;
    }

    .main-content {
        gap: 16px;
    }

    .info-panel {
        grid-template-columns: 1fr;
    }

    .info-panel .prayer-card,
    .info-panel .converter-card {
        grid-column: 1;
    }

    /* Calendar */
    .calendar-card {
        border-radius: var(--radius-lg);
    }

    .calendar-nav {
        padding: 12px;
    }

    .nav-title h2 {
        font-size: 1rem;
    }

    .hijri-range {
        padding: 8px 12px;
        font-size: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Show short weekday names on mobile */
    .weekday-full {
        display: none;
    }

    .weekday-short {
        display: inline;
    }

    .weekday {
        padding: 8px 2px;
        font-size: 0.7rem;
    }

    /* Compact day cells */
    .day-cell {
        min-height: 52px;
        padding: 4px 2px;
    }

    .greg-date {
        font-size: 0.85rem;
    }

    .hijri-date {
        font-size: 0.6rem;
    }

    .day-cell.today .greg-date {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }

    .holiday-dot {
        width: 4px;
        height: 4px;
        bottom: 2px;
    }

    /* Selector */
    .calendar-selector {
        padding: 12px 14px;
    }

    .selector-form {
        gap: 8px;
    }

    .select-input,
    .year-input {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .year-input {
        width: 72px;
    }

    .btn-show {
        padding: 8px 20px;
        font-size: 0.85rem;
    }

    /* Cards */
    .info-card {
        border-radius: var(--radius-md);
    }

    .card-header {
        padding: 12px 16px;
    }

    .card-body {
        padding: 14px;
    }

    .prayer-grid {
        gap: 5px;
    }

    .prayer-item {
        padding: 8px 10px;
    }

    .prayer-name {
        font-size: 0.75rem;
    }

    .prayer-time {
        font-size: 0.85rem;
    }

    .converter-fields {
        flex-wrap: wrap;
    }

    .conv-input.conv-year {
        max-width: 100%;
    }

    /* Footer */
    .site-footer {
        padding: 20px 12px;
        margin-top: 20px;
    }
}

/* Extra Small Mobile (< 380px) */
@media (max-width: 380px) {
    .day-cell {
        min-height: 44px;
        padding: 3px 1px;
    }

    .greg-date {
        font-size: 0.78rem;
    }

    .hijri-date {
        font-size: 0.55rem;
    }

    .day-cell.today .greg-date {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .prayer-grid {
        gap: 4px;
    }

    .calendar-nav {
        padding: 10px 8px;
    }
}

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    body::before {
        display: none;
    }

    .app-container {
        max-width: 100%;
        padding: 0;
    }

    .site-header {
        padding: 12px;
    }

    .bismillah {
        color: #333;
    }

    .site-title {
        color: #000;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

    .calendar-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .calendar-nav,
    .calendar-selector {
        background: #eee !important;
    }

    .nav-btn,
    .nav-title h2 {
        color: #000 !important;
    }

    .card-header {
        background: #eee !important;
    }

    .card-header h3 {
        color: #000 !important;
    }

    .info-panel {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 12px;
    }

    .calendar-selector {
        display: none;
    }

    .footer-credit,
    .footer-site {
        color: #666;
    }
}

/* ================================================================
   ACCESSIBILITY
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators */
.nav-btn:focus-visible,
.select-input:focus-visible,
.year-input:focus-visible,
.btn-show:focus-visible,
.btn-convert:focus-visible,
.converter-tab:focus-visible,
.city-search-input:focus-visible,
.conv-input:focus-visible,
.conv-select:focus-visible {
    outline: 2px solid var(--gold-400);
    outline-offset: 2px;
}
