:root {
    --primary-color: #1b4d3e;   
    --secondary-color: #c49a45; 
    --dark-color: #111111;
    --light-color: #f9f9f9;
    --text-color: #333333;
    --alert-color: #ff3333;
}

/* Mengelakkan limpahan kotak pada skrin telefon bimbit */
* {
    box-sizing: border-box;
}

body {
    font-family: '-apple-system', BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--light-color);
    color: var(--text-color);
    -webkit-text-size-adjust: 100%;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: auto;
    padding: 15px;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), #0f2d24);
    color: #ffffff;
    padding: 30px 15px;
    text-align: center;
    border-bottom: -4px solid var(--secondary-color);
}

.main-header h1 { margin: 0; font-size: 0.6rem; letter-spacing: 1px; }
.main-header h3 { margin: 0; font-size: 1.20rem; letter-spacing: 1px; }
.main-header p { margin: 8px 0 0; color: var(--secondary-color); font-style: italic; font-size: 0.85rem; }

/* Kotak Kunci Utama */
.prinsip-kunci-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: left;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.prinsip-kunci-box h3 {
    color: var(--secondary-color); margin-top: 0; margin-bottom: 12px; font-size: 1.1rem;
    letter-spacing: 0.5px; border-bottom: 2px solid rgba(196, 154, 69, 0.3); padding-bottom: 5px; text-align: center;
}
.prinsip-kunci-box ul { list-style-type: none; padding: 0; margin: 0; }
.prinsip-kunci-box li { margin-bottom: 8px; font-size: 0.9rem; color: #e0e0e0; line-height: 1.4; position: relative; padding-left: 18px; }
.prinsip-kunci-box li::before { content: "✦"; position: absolute; left: 0; color: var(--secondary-color); }
.prinsip-kunci-box li strong { color: #ffffff; }

/* Seksyen */
section {
    background: #ffffff;
    margin: 15px auto;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}

h2 { color: var(--primary-color); border-left: 5px solid var(--secondary-color); padding-left: 10px; margin-top: 0; font-size: 1.4rem; }

/* Kotak Kitab */
.scripture-box { padding: 15px; margin: 12px 0; border-radius: 6px; }
.quran-box { background-color: #f0f7f4; border-left: 4px solid #2e7d32; }
.hadith-box { background-color: #fdfaf2; border-left: 4px solid var(--secondary-color); }
.arabic-text { font-size: 1.3rem; font-family: 'Traditional Arabic', Georgia, serif; color: #111; margin-bottom: 6px; text-align: right; word-wrap: break-word; }
.translation-text { font-size: 0.95rem; color: #444; }

/* Pilihan Dropdown & Pemilih */
.selector-box { margin-bottom: 15px; background: #eee; padding: 12px; border-radius: 5px; }
.selector-box label { display: block; margin-bottom: 5px; font-size: 0.9rem; }
#citySelector { padding: 10px; font-size: 1rem; width: 100%; border-radius: 4px; border: 1px solid #ccc; background-color: #fff; }

/* Grid Kad */
.comparison-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.time-card { padding: 15px; border-radius: 6px; color: white; text-align: center; }
.miqat-card { background: linear-gradient(135deg, #1b4d3e, #276b57); border-bottom: 4px solid var(--secondary-color); }
.gmt-card { background: linear-gradient(135deg, #2c3e50, #34495e); border-bottom: 4px solid #7f8c8d; }
.clock-display { font-family: 'Courier New', Courier, monospace; font-size: 1.8rem; font-weight: bold; margin: 8px 0; }
.day-display { font-size: 1.1rem; background: rgba(0,0,0,0.2); padding: 4px 8px; border-radius: 4px; display: inline-block; }

/* Pengurusan Grafik Peta Responsif */
.map-responsive-scroll {
    width: 100%;
    overflow-x: auto; /* Membenarkan fungsi swipe jari kiri-kanan pada skrin kecil */
    -webkit-overflow-scrolling: touch;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.map-wrapper { min-width: 750px; padding: 5px; background-color: #fff; }
.world-map { width: 100%; height: 580px; background-image: url('../img/world-map.png'); background-size: 100% 100%; background-position: center; position: relative; background-color: #e0f2fe; }

.longitude-line { position: absolute; top: 0; bottom: 0; width: 2px; pointer-events: none; }
.gmt-line { border-left: 2px dashed #7f8c8d; }
.makkah-line { border-left: 2px dashed var(--secondary-color); }
.line-label { position: 8px; transform: translateX(-50%); background: rgba(255,255,255,0.9); padding: 1px 4px; font-size: 9px; font-weight: bold; border-radius: 3px; white-space: nowrap; }
.gmt-line .line-label { 
    color: #2c3e50;
    position: absolute; top: 10px;  
    background: rgba(255,255,255,0.9);
    transform: translateX(-50%); 
}
.makkah-line .line-label {
    color: var(--primary-color); 
    border-color: var(--secondary-color); 
    position: absolute; bottom: 10px;  
    background: rgba(255,255,255,0.9);
    transform: translateX(-50%); 
}

/* Tooltip & Pin Peta */
.map-pin { position: absolute; transform: translate(-280%, 350%); z-index: 10; }
.pin-dot { display: block; width: 12px; height: 12px; background-color: #2e7d32; border-radius: 50%; box-shadow: 0 0 8px rgba(0,255,0,0.5); margin: 0 auto; }
.pin-tooltip { position: absolute; background: rgba(0,0,0,0.9); color: #ffffff; padding: 6px 10px; font-size: 10px; border-radius: 4px; top: 18px; left: 50%; transform: translateX(-50%); white-space: nowrap; border: 1px solid var(--secondary-color); }

.conflict-active .pin-dot { background-color: var(--alert-color) !important; animation: conflict-flash 0.6s infinite alternate !important; }
.alert-badge { font-weight: bold; color: #00ffcc; }
.conflict-active .alert-badge { color: #ff3333 !important; }

@keyframes conflict-flash { 0% { transform: scale(1); } 100% { transform: scale(1.3); box-shadow: 0 0 15px var(--alert-color); } }
.row-conflict { background-color: #ffe6e6 !important; }
.badge { padding: 3px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; }
.badge-ok { background-color: #c8e6c9; color: #256029; }
.badge-alert { background-color: #ffcdd2; color: #c62828; }

/* Jadual Responsif */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { padding: 10px 8px; font-size: 0.85rem; text-align: left; border-bottom: 1px solid #dddddd; }
th { background-color: var(--primary-color); color: white; }
.th-setting-label { font-size: 0.7rem; color: #e0e0e0; font-weight: normal; display: block; }
.setting-tag-mini { font-size: 0.65rem; color: #c49a45; background: rgba(255, 255, 255, 0.1); padding: 0 2px; margin-left: 3px; }

/* Modal Pop-Up */
.clickable-principle { cursor: pointer; }
.click-badge { font-size: 0.7rem; background-color: var(--secondary-color); color: #111; padding: 1px 5px; border-radius: 10px; margin-left: 5px; }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.75); z-index: 9999; justify-content: center; align-items: center; padding: 15px; }
.modal-content { background-color: #ffffff; width: 100%; max-width: 550px; border-radius: 8px; border-top: 6px solid var(--secondary-color); padding: 20px; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-overlay.modal-show { display: flex; }
.modal-close-btn { position: absolute; top: 10px; right: 15px; font-size: 1.6rem; color: #888; cursor: pointer; }
.modal-quran-quote { background-color: #f0f7f4; padding: 10px; border-radius: 4px; text-align: center; font-size: 1.1rem; margin: 10px 0; border-left: 4px solid var(--primary-color); }

.main-footer { background: var(--dark-color); color: #bbbbbb; text-align: center; padding: 20px 15px; margin-top: 30px; font-size: 0.85rem; }

/* ----------------------------------------------------------------------
   MEDIA QUERIES KHAS - MENGURUSKAN PAPARAN LEBIH BESAR (TABLET & DESKTOP)
   ---------------------------------------------------------------------- */
@media (min-width: 600px) {
    .main-header { padding: 40px 0; }
    .main-header h1 { font-size: 0.6rem; }
    section { padding: 25px; margin: 20px auto; }
    h2 { font-size: 1.6rem; }
    .comparison-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .clock-display { font-size: 2rem; }
    .arabic-text { font-size: 1.6rem; }
}

/* ----------------------------------------------------------------------
    Tambahan pada `css/style.css` (Jika Perlu)
    Bagi memastikan susunan suis radio kemas pada skrin peranti mudah alih, 
    anda boleh menambah kod reka bentuk pembantu ini ke bahagian bawah fail `css/style.css`:
---------------------------------------------------------------------- */
.day-setting-control {
    background-color: #fcfcfc !important;
    border-left: 4px solid var(--secondary-color) !important;
}
.radio-group label {
    font-size: 0.9rem;
    color: var(--text-color);
}
@media (max-width: 600px) {
    .mobile-break {
        display: block;
        content: "";
        margin-top: 8px;
    }
}