/* ==========================================
   KULLANICI AYARLARI - ANA MODAL
   ========================================== */

.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.settings-modal.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.settings-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: #0A0E27;
    border-radius: 25px;
    border: 2px solid #D4AF37;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Header */
.settings-header {
    padding: 25px 30px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(64, 224, 208, 0.1) 100%);
}

.settings-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #D4AF37;
    margin: 0;
}

.settings-close {
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #EF4444;
    border-radius: 50%;
    color: #EF4444;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-close:hover {
    background: #EF4444;
    color: white;
    transform: rotate(90deg);
}

/* Tabs */
.settings-tabs {
    display: flex;
    padding: 0 30px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    color: #94A3B8;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.tab-btn:hover {
    color: #D4AF37;
}

.tab-btn.active {
    color: #D4AF37;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #D4AF37 0%, #40E0D0 100%);
}

/* Content */
.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

.settings-content::-webkit-scrollbar {
    width: 8px;
}

.settings-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.settings-content::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 10px;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Settings Section */
.settings-section {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    overflow: hidden;
}

.section-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.02);
}

.section-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(64, 224, 208, 0.2) 100%);
    border-radius: 12px;
}

.section-info {
    flex: 1;
}

.section-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0 0 5px 0;
}

.section-info p {
    font-size: 0.85rem;
    color: #94A3B8;
    margin: 0;
}

.section-body {
    padding: 20px;
}

/* Setting Item */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

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

.setting-label {
    flex: 1;
}

.label-text {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.label-desc {
    display: block;
    font-size: 0.85rem;
    color: #94A3B8;
}

.setting-control {
    margin-left: 15px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    transition: all 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #D4AF37 0%, #40E0D0 100%);
    border-color: #D4AF37;
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Current Location Display */
.current-location-display {
    padding: 20px;
    background: rgba(64, 224, 208, 0.1);
    border: 2px solid rgba(64, 224, 208, 0.3);
    border-radius: 15px;
    margin-bottom: 20px;
}

.location-label {
    font-size: 0.8rem;
    color: #94A3B8;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 700;
}

.location-value {
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
}

/* Action Button */
.action-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn.primary {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Saved Locations */
.saved-locations-section {
    margin-top: 20px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.section-title-row h4 {
    font-size: 0.9rem;
    color: #D4AF37;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0;
}

.add-btn {
    padding: 8px 15px;
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid #D4AF37;
    border-radius: 10px;
    color: #D4AF37;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.add-btn:hover {
    background: #D4AF37;
    color: white;
}

.saved-locations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.location-item:hover {
    background: rgba(64, 224, 208, 0.1);
    border-color: rgba(64, 224, 208, 0.3);
}

.location-item.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: #D4AF37;
}

.location-item-name {
    font-size: 1rem;
    color: white;
    font-weight: 600;
    flex: 1;
}

.location-item-badge {
    padding: 4px 10px;
    background: #D4AF37;
    color: white;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 10px;
}

.location-item-delete {
    color: #EF4444;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.3s;
}

.location-item-delete:hover {
    color: #DC2626;
}

/* Add Location Panel */
.add-location-panel {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    margin-top: 15px;
}

.add-location-panel h4 {
    font-size: 1rem;
    color: #D4AF37;
    margin: 0 0 15px 0;
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.form-select:focus {
    outline: none;
    border-color: #40E0D0;
    background: rgba(255, 255, 255, 0.08);
}

.form-select option {
    background: #0A0E27;
    color: white;
}

.form-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-cancel, .btn-save {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #EF4444;
    color: #EF4444;
}

.btn-cancel:hover {
    background: #EF4444;
    color: white;
}

.btn-save {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

/* Prayer Alerts */
.prayer-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prayer-alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.prayer-alert-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.3);
}

.prayer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prayer-icon {
    font-size: 1.5rem;
}

.prayer-name {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

/* Early Warning Config */
.early-warning-config,
.tahajjud-config,
.friday-config,
.sound-config {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.config-group {
    margin-bottom: 25px;
}

.config-label {
    display: block;
    font-size: 0.9rem;
    color: #D4AF37;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.time-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.time-option {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.time-option:hover {
    background: rgba(64, 224, 208, 0.1);
    border-color: rgba(64, 224, 208, 0.3);
}

.time-option.active {
    background: linear-gradient(135deg, #D4AF37 0%, #40E0D0 100%);
    border-color: #D4AF37;
}

.custom-time-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-time-input input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
}

.custom-time-input input:focus {
    outline: none;
    border-color: #40E0D0;
}

.custom-time-input span {
    color: #94A3B8;
    font-size: 0.9rem;
}

/* Prayer Checkboxes */
.prayer-checkboxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.prayer-checkboxes label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.prayer-checkboxes label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.prayer-checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #D4AF37;
}

/* Day Selector */
.day-selector {
    display: flex;
    gap: 8px;
}

.day-option {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.day-option input {
    display: none;
}

.day-option span {
    display: block;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.day-option:hover span {
    background: rgba(64, 224, 208, 0.1);
    border-color: rgba(64, 224, 208, 0.3);
}

.day-option input:checked + span {
    background: linear-gradient(135deg, #D4AF37 0%, #40E0D0 100%);
    border-color: #D4AF37;
}

/* Custom Time Picker */
.custom-time-picker {
    margin-top: 15px;
}

.custom-time-picker input[type="time"] {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
}

.custom-time-picker input[type="time"]:focus {
    outline: none;
    border-color: #40E0D0;
}

/* Sound Options */
.sound-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.sound-option {
    cursor: pointer;
}

.sound-option input {
    display: none;
}

.sound-card {
    position: relative;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
}

.sound-option:hover .sound-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.3);
}

.sound-option input:checked + .sound-card {
    background: rgba(212, 175, 55, 0.15);
    border-color: #D4AF37;
}

.sound-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.sound-name {
    display: block;
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
    margin-bottom: 10px;
}

.play-sound-btn {
    padding: 8px 15px;
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid #10B981;
    border-radius: 8px;
    color: #10B981;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.play-sound-btn:hover {
    background: #10B981;
    color: white;
}

/* Custom Sound Upload */
.custom-sound-upload {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    text-align: center;
}

.upload-sound-btn {
    width: 100%;
    padding: 15px;
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid #D4AF37;
    border-radius: 12px;
    color: #D4AF37;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.upload-sound-btn:hover {
    background: #D4AF37;
    color: white;
}

.custom-sound-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: rgba(64, 224, 208, 0.1);
    border: 2px solid rgba(64, 224, 208, 0.3);
    border-radius: 12px;
    margin-top: 15px;
}

.sound-filename {
    color: white;
    font-weight: 600;
}

.remove-sound-btn {
    width: 30px;
    height: 30px;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #EF4444;
    border-radius: 50%;
    color: #EF4444;
    cursor: pointer;
    transition: all 0.3s;
}

.remove-sound-btn:hover {
    background: #EF4444;
    color: white;
}

.hint-text {
    font-size: 0.8rem;
    color: #94A3B8;
    margin-top: 10px;
}

/* Volume Slider */
.volume-slider {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #D4AF37 0%, #40E0D0 100%);
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #D4AF37 0%, #40E0D0 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.volume-value {
    float: right;
    color: #40E0D0;
    font-weight: 700;
}

/* Test Notification */
.test-notification-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid rgba(212, 175, 55, 0.2);
}

.test-notification-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.test-notification-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

/* Footer */
.settings-footer {
    padding: 20px 30px;
    border-top: 2px solid rgba(212, 175, 55, 0.3);
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.02);
}

.btn-reset {
    flex: 1;
    padding: 15px;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #EF4444;
    border-radius: 12px;
    color: #EF4444;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-reset:hover {
    background: #EF4444;
    color: white;
}

.btn-save-settings {
    flex: 2;
    padding: 15px;
    background: linear-gradient(135deg, #D4AF37 0%, #40E0D0 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-save-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.5);
}

/* Section Description */
.section-description {
    font-size: 0.9rem;
    color: #94A3B8;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .settings-container {
        width: 95%;
        max-height: 95vh;
    }

    .settings-header {
        padding: 20px;
    }

    .settings-header h2 {
        font-size: 1.3rem;
    }

    .settings-tabs {
        padding: 0 15px;
    }

    .tab-btn {
        padding: 12px 15px;
        font-size: 0.85rem;
    }

    .settings-content {
        padding: 15px 20px;
    }

    .section-header {
        padding: 15px;
    }

    .section-icon {
        font-size: 1.5rem;
        width: 45px;
        height: 45px;
    }

    .section-info h3 {
        font-size: 1rem;
    }

    .section-body {
        padding: 15px;
    }

    .time-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .sound-options {
        grid-template-columns: 1fr;
    }

    .prayer-checkboxes {
        grid-template-columns: 1fr;
    }

    .settings-footer {
        padding: 15px 20px;
        flex-direction: column;
    }

    .btn-reset, .btn-save-settings {
        width: 100%;
    }
}