/* Enhanced Settings Modal Styles */
.settings-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-modal.show {
    opacity: 1;
    visibility: visible;
}

.settings-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #2c3e50;
    border-radius: 20px;
    padding: 40px 35px 30px;
    max-width: 480px;
    width: 95%;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.settings-modal.show .settings-content {
    transform: scale(1) translateY(0);
}

.settings-content.dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e4e6eb;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.2);
}

.settings-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3498db, #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.settings-title i {
    color: #3498db;
    animation: rotate 3s ease-in-out infinite;
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.settings-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-close:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.settings-group {
    margin-bottom: 25px;
}

.settings-group h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-content.dark .settings-group h3 {
    color: #e4e6eb;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(52, 152, 219, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.setting-item:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.settings-content.dark .setting-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-content.dark .setting-item:hover {
    background: rgba(52, 152, 219, 0.15);
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 500;
    flex: 1;
}

.setting-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3498db;
    font-size: 1.1rem;
}

/* Custom Toggle Switch */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #bdc3c7;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.toggle-switch.active {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.toggle-switch::before {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::before {
    transform: translateX(30px);
}

/* Custom Select Styling */
.custom-select {
    position: relative;
    min-width: 200px;
}

.custom-select select {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 10px;
    background: white;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
}

.custom-select select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.custom-select::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #3498db;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.custom-select:hover::after {
    transform: translateY(-50%) rotate(180deg);
}

.settings-content.dark .custom-select select {
    background: rgba(255, 255, 255, 0.1);
    color: #e4e6eb;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Multi-select styling */
.multi-select-container {
    margin-top: 10px;
}

.multi-select-container select {
    height: 120px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 10px;
    padding: 8px;
}

.multi-select-container select option {
    padding: 8px 12px;
    border-radius: 6px;
    margin: 2px 0;
    font-weight: 500;
}

.multi-select-container select option:checked {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.multi-select-hint {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-top: 8px;
    font-style: italic;
}

.settings-content.dark .multi-select-hint {
    color: #bdc3c7;
}

/* Save Button */
.save-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.save-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.save-button:active {
    transform: translateY(0);
}

.save-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.save-button:hover::before {
    left: 100%;
}

/* Responsive Design */
@media (max-width: 600px) {
    .settings-content {
        padding: 25px 20px 20px;
        margin: 20px;
        border-radius: 15px;
    }
    
    .settings-title {
        font-size: 1.5rem;
    }
    
    .setting-item {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .custom-select {
        min-width: 100%;
        margin-top: 8px;
    }
    
    .toggle-switch {
        margin-top: 8px;
    }
}

/* Dark mode specific adjustments */
body.dark-mode .settings-modal {
    background: rgba(0, 0, 0, 0.8);
}

body.dark-mode .settings-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e4e6eb;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .settings-title {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .settings-title i {
    color: #74b9ff;
}

