/* تنسيقات خاصة بصفحة مواقيت الصلاة */

/* الهيرو */
.prayer-hero {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.prayer-hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="rgba(255,255,255,0.1)" d="M50,10 C67.5,10 82,24.5 82,42 C82,59.5 67.5,74 50,74 C32.5,74 18,59.5 18,42 C18,24.5 32.5,10 50,10 Z"/></svg>');
    background-repeat: no-repeat;
}

.prayer-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.prayer-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 1;
}

.current-time-display {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 25px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hijri-date {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 10px;
}

.gregorian-date {
    font-size: 1.2rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.live-time {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    color: white;
}

/* أداة تحديد الموقع */
.location-selector {
    background: var(--white);
    padding: 60px 20px;
}

.selector-header {
    text-align: center;
    margin-bottom: 40px;
}

.selector-header h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.search-box {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.search-box input {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    text-align: right;
}

.search-box button {
    padding: 15px 25px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.countries-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab {
    padding: 12px 25px;
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.tab:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.city-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.city-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.city-card.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-color);
}

.city-flag {
    font-size: 2rem;
    margin-bottom: 10px;
}

.map-container {
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 30px;
    border: 2px solid var(--border-color);
    position: relative;
}

#cityMap {
    width: 100%;
    height: 100%;
}

.map-instructions {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* عرض مواقيت الصلاة */
.prayer-times-display {
    background: var(--secondary-color);
    padding: 60px 20px;
}

.display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.display-header h2 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.location-info {
    background: var(--white);
    padding: 12px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
}

.prayer-table-container {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.prayer-table {
    width: 100%;
    border-collapse: collapse;
}

.prayer-table th {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: right;
    font-weight: 600;
}

.prayer-table td {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.prayer-table tr:hover {
    background: var(--secondary-color);
}

.prayer-table .prayer-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.prayer-table .prayer-time {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
}

.prayer-table .time-remaining {
    color: var(--warning);
    font-weight: 600;
}

.prayer-table .prayer-status {
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.prayer-status.upcoming {
    background: #fef3c7;
    color: #92400e;
}

.prayer-status.current {
    background: #d1fae5;
    color: #065f46;
}

.prayer-status.passed {
    background: #f1f5f9;
    color: #64748b;
}

.prayer-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-content h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.info-content p {
    color: var(--text-light);
    margin-bottom: 15px;
}

/* تقويم الصلوات الشهري */
.monthly-prayer-calendar {
    background: var(--white);
    padding: 60px 20px;
}

.monthly-prayer-calendar h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.btn-calendar-nav {
    padding: 12px 25px;
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-calendar-nav:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.calendar-wrapper {
    overflow-x: auto;
    margin-bottom: 30px;
}

.month-calendar {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.month-calendar th {
    background: var(--primary-color);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.month-calendar td {
    padding: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    vertical-align: top;
    height: 150px;
}

.calendar-day {
    position: relative;
}

.day-number {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.prayer-times-mini {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.8rem;
}

.prayer-time-mini {
    display: flex;
    justify-content: space-between;
    padding: 3px 5px;
    border-radius: 3px;
}

.prayer-time-mini.fajr {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.prayer-time-mini.dhuhr {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.prayer-time-mini.asr {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.prayer-time-mini.maghrib {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.prayer-time-mini.isha {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.fajr { background: #3b82f6; }
.legend-color.dhuhr { background: #10b981; }
.legend-color.asr { background: #f59e0b; }
.legend-color.maghrib { background: #ef4444; }
.legend-color.isha { background: #8b5cf6; }

/* منبه الصلاة */
.prayer-alarm {
    background: var(--secondary-color);
    padding: 60px 20px;
}

.prayer-alarm h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.alarm-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.alarm-card, .alarm-status {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.alarm-card h3, .alarm-status h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alarm-options {
    margin-bottom: 25px;
}

.option-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.option-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.option-group select {
    padding: 8px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text-dark);
}

.alarm-sound {
    margin-bottom: 25px;
}

.alarm-sound label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
}

.alarm-sound select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text-dark);
}

.alarm-actions {
    display: flex;
    gap: 15px;
}

.btn-primary, .btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.status-card {
    margin-bottom: 25px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.status-item:last-child {
    border-bottom: none;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-indicator.active {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.status-indicator.inactive {
    background: #ef4444;
}

.next-alarm-info {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
}

/* محول الوقت */
.time-converter-section {
    background: var(--white);
    padding: 60px 20px;
}

.time-converter-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.converter-tool {
    background: var(--secondary-color);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.converter-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 30px;
}

.converter-from, .converter-to {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.converter-from h4, .converter-to h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.converter-from select, .converter-to select {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text-dark);
    font-size: 1rem;
}

.prayer-select {
    display: flex;
    gap: 15px;
}

.prayer-select select {
    flex: 1;
}

.prayer-select input {
    width: 120px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text-dark);
    font-size: 1rem;
    text-align: center;
}

.converter-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.converter-arrow i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.converter-result {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    border: 2px solid var(--primary-color);
}

.result-time {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.result-prayer {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.converter-info {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* المعلومات الشرعية */
.islamic-info {
    background: var(--secondary-color);
    padding: 60px 20px;
}

.islamic-info h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.info-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.info-box h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box ul {
    list-style: none;
    padding-right: 0;
}

.info-box li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    position: relative;
    padding-right: 25px;
}

.info-box li:last-child {
    border-bottom: none;
}

.info-box li::before {
    content: "•";
    position: absolute;
    right: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.qibla-finder {
    text-align: center;
}

.compass {
    width: 200px;
    height: 200px;
    margin: 0 auto 25px;
    position: relative;
}

.compass-face {
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg, #f3f4f6 0%, #f3f4f6 90deg, #e5e7eb 90deg, #e5e7eb 270deg, #f3f4f6 270deg);
    border-radius: 50%;
    position: relative;
    border: 3px solid var(--border-color);
}

.needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 80px;
    background: #ef4444;
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(0deg);
    transition: transform 1s ease;
}

.qibla-direction {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* التجاوب مع الشاشات الصغيرة */
@media (max-width: 1200px) {
    .converter-inputs {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .converter-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .prayer-hero h1 {
        font-size: 2rem;
    }
    
    .live-time {
        font-size: 2.5rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .alarm-settings {
        grid-template-columns: 1fr;
    }
    
    .display-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .converter-tool {
        padding: 25px;
    }
    
    .prayer-select {
        flex-direction: column;
    }
    
    .prayer-select input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .countries-tabs {
        flex-direction: column;
    }
    
    .tab {
        justify-content: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .alarm-actions {
        flex-direction: column;
    }
    
    .month-calendar {
        font-size: 0.9rem;
    }
}