/* =============================================
   JADWAL SALAT PCINU TAIWAN
   Theme: Nahdlatul Ulama — Minimalist & Elegant
   ============================================= */

/* --- PALET WARNA NU --- */
:root {
    /* Hijau NU — lebih hangat & elegan */
    --nu-green: #1A6B3C;
    --nu-green-dark: #0E4427;
    --nu-green-deep: #092E1A;
    --nu-green-light: #E8F5EE;
    --nu-green-muted: #2D8B55;

    /* Emas NU — lebih refined */
    --nu-gold: #C9982E;
    --nu-gold-light: #F5EDD4;
    --nu-gold-muted: rgba(201, 152, 46, 0.15);

    /* Netral hangat */
    --bg-primary: #FAFAF7;
    --bg-card: #FFFFFF;
    --bg-hover: #F5F5F0;

    /* Teks */
    --text-primary: #1C2B22;
    --text-secondary: #5A6B60;
    --text-muted: #8A9B90;
    --text-on-green: #FFFFFF;
    --text-on-green-muted: rgba(255, 255, 255, 0.7);

    /* Bayangan & Border */
    --shadow-sm: 0 1px 3px rgba(26, 107, 60, 0.06);
    --shadow-md: 0 4px 12px rgba(26, 107, 60, 0.08);
    --shadow-lg: 0 8px 30px rgba(26, 107, 60, 0.10);
    --shadow-xl: 0 16px 50px rgba(26, 107, 60, 0.12);
    --border-subtle: 1px solid rgba(26, 107, 60, 0.08);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 50px;

    /* Transisi */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* --- DEKORASI LATAR BELAKANG --- */
.bg-ornament {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(26, 107, 60, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(201, 152, 46, 0.03) 0%, transparent 50%);
}

/* --- KONTAINER UTAMA --- */
.main-container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* --- LANGUAGE SELECTOR --- */
.lang-selector-hero {
    position: absolute;
    top: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.lang-selector-hero .lang-btn {
    background: none;
    border: none;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.lang-selector-hero .lang-btn:hover {
    color: #FFFFFF;
}

.lang-selector-hero .lang-btn.active {
    color: var(--nu-gold);
    text-shadow: 0 0 8px rgba(201, 152, 46, 0.4);
}

.lang-selector-hero .lang-divider {
    color: rgba(255, 255, 255, 0.2);
    font-size: 12px;
}

/* =============================================
   HERO HEADER
   ============================================= */
.hero-header {
    background: linear-gradient(160deg, var(--nu-green-deep) 0%, var(--nu-green-dark) 35%, var(--nu-green) 100%);
    background-size: 200% 200%;
    animation: gradientShift 12s ease-in-out infinite;
    border-radius: var(--radius-xl);
    padding: 48px 28px 58px;
    color: var(--text-on-green);
    text-align: center;
    box-shadow:
        var(--shadow-xl),
        0 0 60px rgba(26, 107, 60, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

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

/* --- Silhouette Background --- */
.hero-bg-image {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: url('../images/kabah_bg.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.6;
    mix-blend-mode: soft-light;
}

.hero-bg-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(26, 107, 60, 0.2) 0%, var(--nu-green-dark) 90%);
}

/* --- Ornamen lingkaran halus --- */
.hero-ornament-left,
.hero-ornament-right {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-ornament-left {
    top: -80px;
    left: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 65%);
    animation: floatOrb 8s ease-in-out infinite;
}

.hero-ornament-right {
    bottom: -60px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(201, 152, 46, 0.1) 0%, transparent 65%);
    animation: floatOrb 10s ease-in-out infinite reverse;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(8px, -8px) scale(1.05); }
}

/* --- Bintang NU (9 bintang) --- */
.hero-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--nu-gold);
    border-radius: 50%;
    box-shadow:
        0 0 6px 1px rgba(201, 152, 46, 0.5),
        0 0 12px 2px rgba(201, 152, 46, 0.2);
    animation: twinkle 3s ease-in-out infinite;
}

/* Stagger twinkling per bintang */
.star:nth-child(1) { animation-delay: 0s; width: 3px; height: 3px; }
.star:nth-child(2) { animation-delay: 0.4s; width: 4px; height: 4px; }
.star:nth-child(3) { animation-delay: 0.8s; width: 3px; height: 3px; }
.star:nth-child(4) { animation-delay: 1.2s; width: 5px; height: 5px; }
.star:nth-child(5) { animation-delay: 1.6s; width: 3px; height: 3px; }
.star:nth-child(6) { animation-delay: 2.0s; width: 4px; height: 4px; }
.star:nth-child(7) { animation-delay: 2.4s; width: 3px; height: 3px; }
.star:nth-child(8) { animation-delay: 0.6s; width: 4px; height: 4px; }
.star:nth-child(9) { animation-delay: 1.8s; width: 5px; height: 5px; }

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.4); }
}

/* --- Bulan sabit dekoratif --- */
.hero-crescent {
    position: absolute;
    top: 14%;
    right: 6%;
    font-size: 38px;
    color: rgba(201, 152, 46, 0.18);
    z-index: 1;
    pointer-events: none;
    animation: crescentGlow 6s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(201, 152, 46, 0.15));
}

@keyframes crescentGlow {
    0%, 100% { opacity: 0.15; transform: rotate(-5deg) scale(1); }
    50% { opacity: 0.35; transform: rotate(0deg) scale(1.08); }
}

/* --- Badge judul --- */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--nu-gold-muted);
    color: var(--nu-gold);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 7px 20px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(201, 152, 46, 0.25);
    margin-bottom: 18px;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hero-badge-icon {
    display: inline-block;
    animation: starPulse 2s ease-in-out infinite;
    font-size: 10px;
}

@keyframes starPulse {
    0%, 100% { opacity: 0.6; transform: scale(1) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.3) rotate(72deg); }
}

/* --- Judul organisasi --- */
.hero-org {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 0 0;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
    color: var(--text-on-green);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* --- Garis emas pemisah --- */
.hero-gold-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 14px auto;
    width: 180px;
    position: relative;
    z-index: 2;
}

.hero-gold-line::before,
.hero-gold-line::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--nu-gold), transparent);
    opacity: 0.5;
}

.gold-diamond {
    color: var(--nu-gold);
    font-size: 8px;
    padding: 0 10px;
    opacity: 0.6;
}

/* --- Teks supervisi --- */
.hero-supervised {
    font-size: 13px;
    color: var(--text-on-green-muted);
    margin-bottom: 28px;
    font-weight: 500;
    font-style: italic;
    position: relative;
    z-index: 2;
}

/* --- Wrapper jam & tanggal --- */
.hero-clock-wrapper {
    position: relative;
    z-index: 2;
    margin-bottom: 8px;
}

.hero-dates {
    margin-bottom: 6px;
}

.hero-date {
    font-size: 15px;
    color: var(--text-on-green-muted);
    margin-bottom: 2px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hero-hijri {
    font-size: 12px;
    color: var(--nu-gold);
    font-weight: 600;
    letter-spacing: 0.8px;
    opacity: 0.85;
    min-height: 16px;
}

.hero-clock {
    font-size: 68px;
    font-weight: 800;
    color: var(--text-on-green);
    letter-spacing: 2px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* --- Countdown pill --- */
.hero-countdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 247, 246, 0.85) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    box-shadow:
        0 12px 32px rgba(9, 46, 26, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 2;
    transform: translateY(24px);
}

.hero-countdown .badge-current {
    background: var(--nu-gold);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-countdown strong {
    color: var(--nu-green-dark);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}

/* =============================================
   KARTU WAKTU SALAT
   ============================================= */
.today-prayers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
    width: 100%;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

.prayer-card {
    background: var(--bg-card);
    padding: 16px 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    flex: 1;
    min-width: 95px;
    border: var(--border-subtle);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.prayer-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--nu-green-light);
    transition: all var(--transition-smooth);
}

.prayer-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.prayer-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 1.5px;
}

.prayer-icon {
    width: 22px;
    height: 22px;
    margin: 0 auto 8px auto;
    display: block;
    color: var(--nu-green-light);
    opacity: 0.5;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Kartu aktif */
.prayer-card.active {
    background: var(--nu-green);
    border-color: var(--nu-green);
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 12px 30px rgba(26, 107, 60, 0.35);
}

.prayer-card.active::after {
    background: var(--nu-gold);
    height: 4px;
}

.prayer-card.active .prayer-name {
    color: var(--text-on-green-muted);
}

.prayer-card.active .prayer-time {
    color: var(--text-on-green);
}

.prayer-card.active .prayer-icon {
    color: var(--nu-gold);
    opacity: 1;
    transform: scale(1.3) translateY(-2px);
    filter: drop-shadow(0 0 6px rgba(230, 187, 83, 0.5));
}

@keyframes gentlePulse {
    0% { transform: scale(1.3) translateY(-2px); }
    50% { transform: scale(1.4) translateY(-4px); }
    100% { transform: scale(1.3) translateY(-2px); }
}

.prayer-card.active #card-Sunrise .prayer-icon,
.prayer-card.active #card-Dhuhr .prayer-icon,
.prayer-card.active #card-Asr .prayer-icon {
    animation: gentlePulse 4s ease-in-out infinite;
}

/* =============================================
   KONTROL FILTER
   ============================================= */
.controls {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    justify-content: center;
    border: var(--border-subtle);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.control-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

select, input[type="month"] {
    padding: 9px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid rgba(26, 107, 60, 0.15);
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
}

select:focus, input[type="month"]:focus {
    border-color: var(--nu-green);
    box-shadow: 0 0 0 3px rgba(26, 107, 60, 0.1);
}

button {
    font-family: inherit;
    cursor: pointer;
}

.btn-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    background: var(--nu-green-dark);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.btn-location:hover {
    background: var(--nu-green);
    box-shadow: var(--shadow-md);
}

.btn-location svg {
    flex-shrink: 0;
}

/* =============================================
   SECTION HEADER & TITLE
   ============================================= */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
    flex-wrap: wrap;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--nu-gold);
    border-radius: 2px;
}

/* --- Toggle Masehi / Hijriah & Export --- */
.calendar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-toggle {
    display: flex;
    background: var(--bg-primary);
    border-radius: var(--radius-pill);
    padding: 3px;
    border: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.btn-export {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--nu-green);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.btn-export:hover {
    background: var(--bg-secondary);
    border-color: var(--nu-green);
}

.btn-export:active {
    transform: scale(0.96);
}

.btn-poster {
    color: var(--nu-gold);
    border-color: rgba(201, 152, 46, 0.3);
}

.btn-poster:hover {
    background: var(--nu-gold-light);
    border-color: var(--nu-gold);
}

.btn-export:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.toggle-btn {
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.3px;
}

.toggle-btn:hover {
    color: var(--text-primary);
}

.toggle-btn.active {
    background: var(--nu-green);
    color: white;
    box-shadow: 0 2px 8px rgba(26, 107, 60, 0.25);
}

/* =============================================
   TABEL JADWAL
   ============================================= */
.table-section {
    margin-bottom: 28px;
}

/* Label bulan Hijri di dalam sel tabel */
.hijri-month-label {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
    line-height: 1;
}

.current-day-row .hijri-month-label {
    color: var(--text-on-green-muted);
}

.table-container {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: var(--border-subtle);
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    white-space: nowrap;
}

th {
    background: var(--nu-green);
    color: var(--text-on-green);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 12px;
    position: sticky;
    top: 0;
    z-index: 10;
}

th:first-child {
    border-radius: var(--radius-lg) 0 0 0;
}

th:last-child {
    border-radius: 0 var(--radius-lg) 0 0;
}

td {
    padding: 12px;
    border-bottom: 1px solid rgba(26, 107, 60, 0.06);
    font-size: 14px;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

tbody tr {
    transition: background-color var(--transition-fast);
}

tbody tr:hover {
    background-color: var(--nu-green-light);
}

tbody tr:nth-child(even) {
    background-color: var(--bg-primary);
}

tbody tr:nth-child(even):hover {
    background-color: var(--nu-green-light);
}

/* Baris hari ini */
.current-day-row {
    background: linear-gradient(90deg, var(--nu-green-dark), var(--nu-green)) !important;
    position: relative;
}

.current-day-row td {
    font-weight: 600;
    color: var(--text-on-green) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.current-day-row td strong {
    color: var(--text-on-green) !important;
}

.current-day-row td:first-child {
    border-left: 4px solid var(--nu-gold);
}

/* =============================================
   LOADING
   ============================================= */
.loading {
    text-align: center;
    font-size: 14px;
    color: var(--nu-green);
    padding: 20px;
    display: none;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--nu-green-light);
    border-top-color: var(--nu-green);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

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

/* =============================================
   FOOTER
   ============================================= */
.footer-wrapper {
    background: var(--bg-card);
    padding: 32px 28px;
    border-radius: var(--radius-xl);
    border: var(--border-subtle);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.footer-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--nu-green), var(--nu-gold), var(--nu-green));
}

.friendly-greeting {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px;
}

.greeting-icon {
    font-size: 28px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nu-green-light);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    color: var(--nu-green);
}

.friendly-greeting h3 {
    margin: 0 0 6px 0;
    color: var(--nu-green-dark);
    font-size: 18px;
    font-weight: 700;
}

.friendly-greeting p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 14px;
}

.footer-divider {
    border: 0;
    border-top: 1px solid rgba(26, 107, 60, 0.08);
    margin: 24px 0;
}

/* Info teknis — grid layout */
.technical-info h4 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 14px;
    font-weight: 700;
    text-align: center;
}

.info-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.info-item {
    background: var(--bg-primary);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border-top: 3px solid var(--nu-gold);
    text-align: center;
    width: calc(33.333% - 8px);
}

.info-item strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--nu-green-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-item span {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-item span strong {
    display: inline;
    font-size: inherit;
    color: var(--nu-green-dark);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
}

.copyright {
    margin-top: 28px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.8;
}

.copyright span {
    color: var(--nu-green);
    font-weight: 700;
}

.copyright a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.copyright a:hover {
    color: var(--nu-green);
}

/* =============================================
   PENYESUAIAN RESPONSIF
   ============================================= */

/* --- Tablet (≤ 768px) --- */
@media (max-width: 768px) {
    .main-container {
        padding: 16px 14px 40px;
    }

    .hero-header {
        padding: 48px 18px 48px;
        border-radius: var(--radius-lg);
    }

    .lang-selector-hero {
        top: 16px;
        right: 16px;
        padding: 5px 12px;
    }

    .hero-crescent {
        font-size: 28px;
        top: 10%;
        right: 4%;
    }

    .hero-gold-line {
        width: 140px;
        margin: 10px auto;
    }

    .hero-badge {
        font-size: 10px;
        letter-spacing: 2px;
        padding: 5px 14px;
    }

    .hero-org {
        font-size: 28px;
    }

    .hero-hijri {
        font-size: 11px;
    }

    .hero-clock {
        font-size: 52px;
    }

    .hero-countdown {
        flex-direction: column;
        text-align: center;
        gap: 6px;
        padding: 10px 20px;
        font-size: 13px;
        border-radius: var(--radius-lg);
    }

    .hero-countdown .countdown-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .today-prayers {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .prayer-card {
        width: calc(25% - 6px);
        min-width: unset;
        flex: unset;
        padding: 12px 6px;
    }

    .prayer-name {
        font-size: 10px;
        letter-spacing: 0.8px;
    }

    .prayer-time {
        font-size: 19px;
    }

    .controls {
        padding: 14px;
        gap: 10px;
    }

    th, td {
        padding: 10px 8px;
        font-size: 13px;
    }

    th {
        font-size: 10px;
    }

    .footer-wrapper {
        padding: 24px 20px;
    }

    .info-grid {
        /* Overridden by info-item width */
    }

    .info-item {
        width: calc(50% - 6px);
    }
}

/* --- Mobile (≤ 480px) --- */
@media (max-width: 480px) {
    .main-container {
        padding: 10px 8px 30px;
    }

    .hero-header {
        padding: 48px 14px 42px;
        border-radius: var(--radius-md);
        margin-bottom: 20px;
    }

    .lang-selector-hero {
        top: 10px;
        right: 10px;
        padding: 4px 10px;
        gap: 6px;
    }

    .lang-selector-hero .lang-btn {
        font-size: 9px;
        padding: 2px;
    }

    .hero-crescent {
        font-size: 22px;
        top: 8%;
        right: 3%;
        opacity: 0.12;
    }

    .hero-gold-line {
        width: 120px;
        margin: 8px auto;
    }

    .star {
        width: 3px !important;
        height: 3px !important;
    }

    .hero-badge {
        font-size: 9px;
        letter-spacing: 1.5px;
        padding: 4px 12px;
        margin-bottom: 12px;
    }

    .hero-org {
        font-size: 22px;
    }

    .hero-supervised {
        font-size: 11px;
        margin-bottom: 18px;
    }

    .hero-date {
        font-size: 13px;
    }

    .hero-hijri {
        font-size: 10px;
    }

    .hero-clock {
        font-size: 42px;
    }

    .hero-countdown {
        padding: 8px 16px;
        font-size: 12px;
        border-radius: var(--radius-lg);
        transform: translateY(20px);
    }

    .hero-countdown .badge-current {
        font-size: 10px;
        padding: 3px 10px;
    }

    .hero-countdown strong {
        font-size: 15px;
    }

    .hero-countdown .countdown-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .today-prayers {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        margin-bottom: 18px;
    }

    .prayer-card {
        width: calc(25% - 4.5px);
        padding: 10px 4px;
        border-radius: var(--radius-sm);
    }

    .prayer-name {
        font-size: 8px;
        letter-spacing: 0.5px;
        margin-bottom: 3px;
    }

    .prayer-time {
        font-size: 16px;
    }

    .prayer-card.active {
        transform: translateY(-3px) scale(1.02);
    }

    /* Kontrol stacking */
    .controls {
        flex-direction: column;
        padding: 12px;
        gap: 8px;
        align-items: stretch;
    }

    .control-group {
        width: 100%;
    }

    .control-group label {
        font-size: 10px;
    }

    select, input[type="month"] {
        width: 100%;
        font-size: 14px;
    }

    .btn-location {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }

    .section-title {
        font-size: 14px;
    }

    /* Tabel compact */
    .table-container {
        border-radius: var(--radius-md);
    }

    th {
        padding: 10px 5px;
        font-size: 9px;
        letter-spacing: 0.3px;
    }

    th:first-child { border-radius: var(--radius-md) 0 0 0; }
    th:last-child { border-radius: 0 var(--radius-md) 0 0; }

    td {
        padding: 8px 5px;
        font-size: 12px;
    }

    /* Footer */
    .footer-wrapper {
        padding: 20px 14px;
        border-radius: var(--radius-md);
    }

    .friendly-greeting {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 12px;
    }

    .greeting-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .friendly-greeting h3 {
        font-size: 16px;
    }

    .friendly-greeting p {
        font-size: 13px;
    }

    .info-item {
        padding: 12px 14px;
        width: 100%;
    }

    .copyright {
        font-size: 11px;
    }
}

/* --- Small Mobile (≤ 360px) --- */
@media (max-width: 360px) {
    .hero-clock {
        font-size: 36px;
    }

    .hero-org {
        font-size: 20px;
    }

    .prayer-name {
        font-size: 7px;
    }

    .prayer-time {
        font-size: 14px;
    }

    th {
        font-size: 8px;
        padding: 8px 3px;
    }

    td {
        padding: 7px 3px;
        font-size: 11px;
    }
}

/* =============================================
   SCREENSAVER MODE
   ============================================= */
/* --- SCREENSAVER BUTTON --- */
.btn-screensaver-hero {
    position: absolute;
    top: 24px;
    left: 24px;
    display: none; /* Hidden on mobile by default */
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-screensaver-hero:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

body.screensaver-active {
    background: var(--nu-green-deep);
    overflow: hidden;
    margin: 0;
    padding: 0;
    height: 100vh;
}

body.screensaver-active .controls,
body.screensaver-active .table-section,
body.screensaver-active .footer-wrapper,
body.screensaver-active .bg-ornament,
body.screensaver-active .lang-selector-hero {
    display: none !important;
}

body.screensaver-active .main-container {
    padding: 20px 0 40px 0;
    max-width: none;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(160deg, var(--nu-green-deep) 0%, var(--nu-green-dark) 35%, var(--nu-green) 100%);
    overflow: hidden;
}

body.screensaver-active .hero-header {
    margin: 0;
    width: 100%;
    flex: 1;
    border-radius: 0;
    box-shadow: none;
    background: none;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative; /* So stars position relative to this large flex area */
    z-index: 1;
}

body.screensaver-active .hero-crescent,
body.screensaver-active .hero-stars,
body.screensaver-active .hero-ornament-left,
body.screensaver-active .hero-ornament-right,
body.screensaver-active .hero-bg-image {
    opacity: 0.15;
}

/* Screen Burn-in Protection Animations */
@keyframes screenSaverDrift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(10px, 8px); }
    50% { transform: translate(-8px, 12px); }
    75% { transform: translate(-12px, -8px); }
    100% { transform: translate(0, 0); }
}

body.screensaver-active .main-container {
    animation: screenSaverDrift 60s linear infinite;
}

/* Let today-prayers sit at the bottom naturally */
body.screensaver-active .today-prayers {
    position: relative;
    transform: none;
    width: 100%;
    max-width: 800px;
    z-index: 10;
    margin: 0;
    padding: 0 20px;
    flex-shrink: 0; /* Keep its natural height */
}

/* Apply Gestalt: Make prayer cards subtle "ground" elements to not compete with the "figure" clock */
body.screensaver-active .prayer-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    color: rgba(255, 255, 255, 0.8);
}
body.screensaver-active .prayer-card::after {
    display: none;
}
body.screensaver-active .prayer-name {
    color: rgba(255, 255, 255, 0.6);
}
body.screensaver-active .prayer-time {
    color: #FFFFFF;
}
body.screensaver-active .prayer-card.active {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
    transform: translateY(-16px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
body.screensaver-active .prayer-card.active .prayer-name {
    color: rgba(255, 255, 255, 0.9);
}

/* Scale up sizes for Screensaver Mode on larger screens (Tablets/Monitors) */
@media (min-width: 768px) {
    body.screensaver-active .hero-clock {
        font-size: 120px;
        text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
    body.screensaver-active .hero-dates {
        gap: 16px;
        margin-bottom: 30px;
    }
    body.screensaver-active .hero-date, 
    body.screensaver-active .hero-hijri {
        font-size: 22px;
    }
    body.screensaver-active .hero-countdown {
        font-size: 20px;
        padding: 16px 40px;
        transform: translateY(40px);
    }
    body.screensaver-active .hero-countdown strong {
        font-size: 24px;
    }
    .btn-screensaver-hero {
        display: inline-flex; /* Show on computer view */
    }
    body.screensaver-active .btn-screensaver-hero {
        padding: 12px;
        top: 32px;
        left: 32px;
    }
    body.screensaver-active .btn-screensaver-hero svg {
        width: 24px;
        height: 24px;
    }
    body.screensaver-active .today-prayers {
        max-width: 900px;
        gap: 12px;
    }
    body.screensaver-active .prayer-card {
        padding: 16px 12px;
    }
    body.screensaver-active .prayer-name {
        font-size: 12px;
    }
    body.screensaver-active .prayer-time {
        font-size: 22px;
    }
    body.screensaver-active .prayer-card svg {
        width: 24px;
        height: 24px;
    }
}
