* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --fajr: #4A90E2;
    --dhuhr: #50E3C2;
    --asr: #B8E986;
    --maghrib: #F5A623;
    --isha: #9013FE;
    --current: #FF6B6B;
    --next-prayer: #2ecc71;
    --bg: #f8f9fa;
    --card: #ffffff;
    --text: #333333;
}

.prayer-timings-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
    max-width: 95%;
    margin: 0 auto;
    padding: 15px;
}

.prayer-timings-container .header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 0;
}

.prayer-timings-container .header h1 {
    color: white;
    font-size: 2.2em;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.prayer-timings-container .header p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1em;
}

/* Live Clock and Next Prayer Grid - SAME SIZE AS PRAYER CARDS */
.prayer-timings-container .top-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

/* Live Clock Card - SMALL LIKE PRAYER CARDS */
.prayer-timings-container .live-clock-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    min-height: 95px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.prayer-timings-container .current-time {
    font-size: 1.30em;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.prayer-timings-container .current-date {
    font-size: 1em;
    font-weight: 500;
    margin-bottom: 3px;
    opacity: 0.9;
}

.prayer-timings-container .hijri-date {
    font-size: 1em;
    font-weight: 500;
    opacity: 0.8;
}

/* Next Prayer Card - SMALL LIKE PRAYER CARDS */
.prayer-timings-container .next-prayer-card {
    background: linear-gradient(135deg, var(--next-prayer) 0%, #8a8fe3 0%);
    color: white;
    padding: 12px 8px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(46, 204, 113, 0.4);
    border: 2px solid white;
    min-height: 95px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.prayer-timings-container .next-prayer-card h3 {
    margin-bottom: 5px;
    font-size: 1.10em;
    color: white;
    opacity: 0.9;
    font-weight: 600;
}

.prayer-timings-container .next-prayer-card .prayer-name {
    font-size: 1em;
    margin-bottom: 3px;
    font-weight: 600;
}

.prayer-timings-container .next-prayer-card .time {
    font-size: 1.10em;
    font-weight: 800;
    margin-bottom: 3px;
}

.prayer-timings-container .next-prayer-card .countdown {
    font-size: 1.10em;
    font-weight: 800;
    opacity: 0.9;
}

.prayer-timings-container .main-card {
    background: var(--card);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    margin-bottom: 15px;
}

.prayer-timings-container .location-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.prayer-timings-container .location-input {
    flex: 1;
}

.prayer-timings-container input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
}

.prayer-timings-container input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.prayer-timings-container .btn {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.prayer-timings-container .btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.prayer-timings-container .btn-small {
    padding: 10px 15px;
    font-size: 13px;
}

.prayer-timings-container .btn-large {
    padding: 15px 25px;
    font-size: 16px;
    width: 100%;
    justify-content: center;
}

.prayer-timings-container .location-display {
    text-align: center;
    margin: 15px 0;
    font-size: 1.15em;
    color: var(--primary);
    font-weight: 600;
}

/* Improved Horizontal Prayer Times - BIGGER FONTS */
.prayer-timings-container .prayer-times-horizontal {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 5px 0;
}

.prayer-timings-container .prayer-card-horizontal {
    padding: 12px 6px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--card) 100%);
    text-align: center;
    transition: all 0.3s;
    border-top: 3px solid;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    min-height: 95px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.prayer-timings-container .prayer-card-horizontal.fajr { border-top-color: var(--fajr); }
.prayer-timings-container .prayer-card-horizontal.sunrise { border-top-color: #FFD700; }
.prayer-timings-container .prayer-card-horizontal.dhuhr { border-top-color: var(--dhuhr); }
.prayer-timings-container .prayer-card-horizontal.asr { border-top-color: var(--asr); }
.prayer-timings-container .prayer-card-horizontal.maghrib { border-top-color: var(--maghrib); }
.prayer-timings-container .prayer-card-horizontal.isha { border-top-color: var(--isha); }
.prayer-timings-container .prayer-card-horizontal.next-prayer { 
    background: linear-gradient(135deg, var(--next-prayer) 0%, #27ae60 100%);
    color: white;
    transform: scale(1.05);
    border: 2px solid white;
}

.prayer-timings-container .prayer-icon-horizontal {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    margin: 0 auto 6px;
}

.prayer-timings-container .prayer-icon-horizontal.fajr { background: var(--fajr); }
.prayer-timings-container .prayer-icon-horizontal.sunrise { background: #FFD700; }
.prayer-timings-container .prayer-icon-horizontal.dhuhr { background: var(--dhuhr); }
.prayer-timings-container .prayer-icon-horizontal.asr { background: var(--asr); }
.prayer-timings-container .prayer-icon-horizontal.maghrib { background: var(--maghrib); }
.prayer-timings-container .prayer-icon-horizontal.isha { background: var(--isha); }

/* BIGGER FONTS for Prayer Names and Times */
.prayer-timings-container .prayer-name-horizontal {
    font-weight: 700;
    font-size: 1em;
    margin-bottom: 4px;
}

.prayer-timings-container .prayer-time-horizontal {
    font-size: 1.10em;
    font-weight: 800;
}

/* Features Grid - NOW ONLY TWO BUTTONS */
.prayer-timings-container .features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.prayer-timings-container .feature-btn {
    background: var(--card);
    border: none;
    padding: 15px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-size: 12px;
    color: var(--text);
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.prayer-timings-container .feature-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Settings Panel */
.prayer-timings-container .settings-panel {
    background: var(--card);
    border-radius: 20px;
    padding: 20px;
    margin-top: 15px;
    display: none;
}

.prayer-timings-container .setting-group {
    margin-bottom: 15px;
}

.prayer-timings-container .setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
}

/* COMPLETE FIX FOR SELECT DROPDOWN TEXT TRUNCATION */
.prayer-timings-container select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 14px;
    background-color: white;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    color: #333;
    font-weight: 500;
    min-height: 46px;
}

/* Ensure the selected text is fully visible */
.prayer-timings-container select option {
    padding: 12px 15px;
    font-size: 14px;
    background: white;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.prayer-timings-container select option:checked {
    background: var(--primary);
    color: white;
}

/* Focus state for better accessibility */
.prayer-timings-container select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Make sure the select container has enough space */
.prayer-timings-container .setting-group {
    position: relative;
}

.prayer-timings-container .notification-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prayer-timings-container .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.prayer-timings-container .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.prayer-timings-container .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 26px;
}

.prayer-timings-container .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.prayer-timings-container input:checked + .slider {
    background-color: var(--primary);
}

.prayer-timings-container input:checked + .slider:before {
    transform: translateX(24px);
}

/* Improved Calendar View with Prayer Times */
.prayer-timings-container .calendar-view {
    background: var(--card);
    border-radius: 20px;
    padding: 20px;
    margin-top: 15px;
    display: none;
    max-height: 70vh;
    overflow-y: auto;
}

.prayer-timings-container .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg);
}

.prayer-timings-container .calendar-month-year {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    flex: 1;
}

/* BIGGER FONTS for Monthly Prayer Schedule Table */
.prayer-timings-container .monthly-prayer-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px; /* Increased from 12px */
}

.prayer-timings-container .monthly-prayer-table th {
    background: var(--primary);
    color: white;
    padding: 10px 6px; /* Increased padding */
    text-align: center;
    font-weight: 600;
    font-size: 13px; /* Slightly bigger */
}

.prayer-timings-container .monthly-prayer-table td {
    padding: 8px 5px; /* Increased padding */
    text-align: center;
    border-bottom: 1px solid #eee;
    font-size: 13px; /* Slightly bigger */
}

.prayer-timings-container .monthly-prayer-table tr:nth-child(even) {
    background: var(--bg);
}

.prayer-timings-container .loading {
    text-align: center;
    padding: 30px;
    color: var(--primary);
}

.prayer-timings-container .monthly-schedule-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    color: white;
    margin-top: 15px;
}

.prayer-timings-container .monthly-schedule-btn:hover {
    background: linear-gradient(135deg, #FF5252 0%, #FF7B7B 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .prayer-timings-container {
        max-width: 97%; /* Slightly smaller on tablets */
    }
    
    .prayer-timings-container .top-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .prayer-timings-container .live-clock-card,
    .prayer-timings-container .next-prayer-card {
        padding: 10px 4px;
        min-height: 90px;
    }
    
    .prayer-timings-container .current-time {
        font-size: 1.1em;
    }
    
    .prayer-timings-container .current-date {
        font-size: 0.8em;
    }
    
    .prayer-timings-container .hijri-date {
        font-size: 0.75em;
    }
    
    .prayer-timings-container .next-prayer-card .prayer-name {
        font-size: 0.9em;
    }
    
    .prayer-timings-container .next-prayer-card .time {
        font-size: 0.95em;
    }
    
    .prayer-timings-container .prayer-times-horizontal {
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
    }
    
    .prayer-timings-container .prayer-card-horizontal {
        padding: 10px 4px;
        min-height: 90px;
    }
    
    .prayer-timings-container .prayer-name-horizontal {
        font-size: 0.85em;
    }
    
    .prayer-timings-container .prayer-time-horizontal {
        font-size: 0.95em;
    }
    
    .prayer-timings-container .prayer-icon-horizontal {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    /* Monthly table font size on tablet */
    .prayer-timings-container .monthly-prayer-table {
        font-size: 13px;
    }
    
    .prayer-timings-container .monthly-prayer-table th,
    .prayer-timings-container .monthly-prayer-table td {
        font-size: 12px;
    }
    
    /* Fix for mobile browsers - select dropdown */
    .prayer-timings-container select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 40px 12px 15px;
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    .prayer-timings-container {
        max-width: 98%; /* Slightly smaller on mobile */
        padding: 10px;
    }
    
    .prayer-timings-container .top-cards-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .prayer-timings-container .live-clock-card,
    .prayer-timings-container .next-prayer-card {
        padding: 12px 6px;
        min-height: 85px;
    }
    
    .prayer-timings-container .current-time {
        font-size: 1.2em;
    }
    
    .prayer-timings-container .current-date {
        font-size: 0.85em;
    }
    
    .prayer-timings-container .hijri-date {
        font-size: 0.8em;
    }
    
    .prayer-timings-container .next-prayer-card .prayer-name {
        font-size: 1em;
    }
    
    .prayer-timings-container .next-prayer-card .time {
        font-size: 1.1em;
    }
    
    .prayer-timings-container .prayer-times-horizontal {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .prayer-timings-container .prayer-card-horizontal {
        padding: 12px 6px;
        min-height: 100px;
    }
    
    .prayer-timings-container .prayer-name-horizontal {
        font-size: 0.9em;
    }
    
    .prayer-timings-container .prayer-time-horizontal {
        font-size: 1em;
    }
    
    .prayer-timings-container .prayer-icon-horizontal {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    /* Monthly table font size on mobile */
    .prayer-timings-container .monthly-prayer-table {
        font-size: 12px;
    }
    
    .prayer-timings-container .monthly-prayer-table th,
    .prayer-timings-container .monthly-prayer-table td {
        font-size: 11px;
        padding: 6px 3px;
    }
}

@media (max-width: 380px) {
    .prayer-timings-container .top-cards-grid {
        gap: 6px;
    }
    
    .prayer-timings-container .live-clock-card,
    .prayer-timings-container .next-prayer-card {
        min-height: 80px;
        padding: 10px 4px;
    }
    
    .prayer-timings-container .current-time {
        font-size: 1.1em;
    }
    
    .prayer-timings-container .current-date {
        font-size: 0.8em;
    }
    
    .prayer-timings-container .hijri-date {
        font-size: 0.75em;
    }
    
    .prayer-timings-container .next-prayer-card .prayer-name {
        font-size: 0.9em;
    }
    
    .prayer-timings-container .next-prayer-card .time {
        font-size: 1em;
    }
    
    .prayer-timings-container .prayer-card-horizontal {
        min-height: 95px;
        padding: 10px 4px;
    }
    
    .prayer-timings-container .prayer-name-horizontal {
        font-size: 0.85em;
    }
    
    .prayer-timings-container .prayer-time-horizontal {
        font-size: 0.95em;
    }
    
    .prayer-timings-container .prayer-icon-horizontal {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}