/* style.css */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f8;
    min-height: 100vh;
    position: relative;
}

body {
    background-image: url('https://webspace.science.uu.nl/~gent0113/islam/images/surat_al_ikhlas.gif');
    background-attachment: fixed;
    padding-bottom: 60px;
}

.main-container {
    max-width: 1200px;
    margin: 10px auto;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-container {
    padding: 10px;
    background-color: #f8f9fa;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
}

.form-container form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.elegant-button {
    padding: 8px 15px;
    font-size: 0.9em;
    border: 1px solid #006b36;
    background-color: white;
    color: #006b36;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.elegant-button:hover {
    background-color: #006b36;
    color: white;
    filter: brightness(110%);
}

#contentArea { padding: 10px; }

/* Kalender Desktop Styles */
.month-display-container {
    width: 100%;
    height: auto;
    min-height: 700px;
    display: flex;
    flex-direction: column;
}

.month-navigation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    flex-shrink: 0;
}

.month-navigation-header h2 {
    font-size: 2em;
    color: #0056b3;
    font-family: 'Bodoni MT Black', serif;
    cursor: pointer;
}

.nav-arrow {
    color: #0056b3;
    font-size: 1.5em;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.nav-arrow:not(.disabled):hover { background-color: #e9ecef; }
.nav-arrow.disabled { color: #adb5bd; cursor: not-allowed; }

.calendar.table-container { flex-grow: 1; display: flex; }
.calendar table {
    width: 100%; height: 100%; border-spacing: 5px;
    table-layout: fixed; border-collapse: separate;
}

.calendar th {
    padding: 10px; font-size: 1em; font-weight: 600; text-align: center;
    border-radius: 8px; background-image: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.calendar td {
    vertical-align: top; border-radius: 8px; transition: all 0.2s ease;
    background-color: #f8f9fa; border: 1px solid #dee2e6; position: relative;
}

.calendar td:not(:empty):hover {
    transform: translateY(-3px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); z-index: 1;
}

.calendar td:empty { background-color: transparent; border: none; }
.calendar-cell { padding: 8px; }

.arabic-number {
    font-family: 'Amiri', serif; font-weight: bold; color: #0056b3;
    font-size: 2.2em; line-height: 1.1; text-align: right;
}

.gregorian-date { font-size: 0.8em; text-align: left; color: #000000; font-weight: bold; }
.pasaran { font-size: 0.9em; font-weight: 600; color: #b22222; text-align: right; margin-top: 5px; }

.sunday-cell { background-color: #fff0f3 !important; }
.friday-cell { background-color: #efffef !important; }
.has-tooltip { background-color: #fffbe6 !important; border-color: #ffeeba; }
.has-tooltip .arabic-number { color: #856404; }

.current-day {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
    color: white !important; border: 1px solid #1e7e34 !important;
}
.current-day .arabic-number, .current-day .gregorian-date, .current-day .pasaran { color: white !important; }

/* Prayer Times Styles */
.prayer-times-container {
    padding: 20px; background-color: #006b36; opacity: 1.0; color: white;
    margin-top: 20px; margin-bottom: 50px; border-radius: 0 0 15px 15px;
}

.prayer-times-card {
    max-width: 800px; margin: 0 auto; background-color: rgba(255, 255, 255, 0.1);
    padding: 20px; border-radius: 10px; text-align: center;
}

.prayer-times-header {
    display: flex; justify-content: center; align-items: center;
    position: relative; margin-bottom: 15px; font-size: 1.3em;
    font-weight: bold; color: lightblue;
}

.header-title-wrapper { text-align: center; }

.mode-selection {
    position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%); display: flex; align-items: center;
    flex-shrink: 0;
}

.mode-selection select {
    padding: 5px 10px; border-radius: 5px; border: 1px solid #ccc;
    background-color: #f0f0f0; cursor: pointer;
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px;
    padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

.current-date-info {
    font-size: 0.9em; font-weight: bold; margin-bottom: 15px; color: #ffffff;
}
.current-date-info span { font-weight: bold; color: #ffd700; font-size: 0.9em; }

.prayer-times-table {
    width: 100%; border-collapse: separate; border-spacing: 0 8px;
}

.prayer-times-table td {
    padding: 12px 15px; background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px; font-weight: bold; color: white; text-align: left;
}

.prayer-time-item { display: flex; justify-content: space-between; align-items: center; }
.prayer-name-column { font-size: 1.2em; color: #ffffff; flex-grow: 1; text-align: left; }
.prayer-time-column {
    font-size: 1.8em; color: #ffd700; font-family: 'monospace';
    text-align: right; min-width: 90px;
}

.prayer-time-column.next-prayer { color: white !important; }
.prayer-time-value.next-prayer { color: lightblue !important; } /* Fallback */

.loading-spinner { padding: 20px; }
.loading-spinner .spinner {
    width: 40px; height: 40px; border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%; border-top-color: #fff;
    animation: spin 1s ease-in-out infinite; margin: 0 auto 15px;
}

.location-permission-btn {
    background-color: #ffd700; color: #006b36; border: none;
    padding: 10px 20px; border-radius: 5px; font-weight: bold; cursor: pointer;
    margin-top: 10px; transition: all 0.3s ease;
}
.location-permission-btn:hover { background-color: #ffc107; }

.error-message { color: #ffc107; margin-top: 10px; font-size: 0.9em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* City Selection & Color Pickers */
.city-selection-container, .background-color-picker-container, .calendar-color-picker-container {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 10px; padding: 10px 15px; background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px; margin: 15px auto 20px auto; max-width: 800px;
}

.city-selection-container label, .background-color-picker-container label, .calendar-color-picker-container label {
    font-weight: 600; color: #ffffff; margin-right: 5px; flex-shrink: 0;
}

.city-selection-container select, .background-color-picker-container select, .calendar-color-picker-container select {
    padding: 8px 12px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(0, 0, 0, 0.1); color: white; font-size: 1em; cursor: pointer;
}

.background-color-picker-container select, .calendar-color-picker-container select { width: 160px; }
option { background-color: #004d27; color: white; }

.reset-button, .reset-calendar-color-button {
    background-color: #dc3545 !important; color: white !important;
    border-color: #dc3545 !important; font-weight: bold; padding: 8px 15px; flex-shrink: 0;
}
.reset-button:hover, .reset-calendar-color-button:hover { background-color: #c82333 !important; }

/* Footer */
footer {
    position: absolute; bottom: 0; width: 100%; height: 60px;
    display: flex; justify-content: center; align-items: center;
    background-color: transparent; color: #333;
    font-weight: bold; font-size: 0.9em; text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}