/* ========================================
   BIAS Settings Page Styles
   Premium fonts: Space Grotesk + Inter
======================================== */

.settings-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section {
    background: rgba(10, 10, 20, 0.7);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(20px);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(66, 153, 225, 0.2);
}

.section-header i {
    font-size: 24px;
    color: #4299e1;
}

.section-header h2 {
    font-family: 'Space Grotesk', monospace;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item.full-width {
    grid-column: 1 / -1;
}

.setting-item label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.setting-item input[type="text"],
.setting-item input[type="email"],
.setting-item select {
    padding: 12px 16px;
    background: rgba(66, 153, 225, 0.05);
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

.setting-item input[type="text"]:focus,
.setting-item input[type="email"]:focus,
.setting-item select:focus {
    outline: none;
    border-color: #4299e1;
    background: rgba(66, 153, 225, 0.1);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

/* Toggle Switch */
.toggle-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.toggle-setting > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-desc {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, #4299e1, #667eea);
    border-color: transparent;
}

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

.toggle:hover .toggle-slider {
    background: rgba(255, 255, 255, 0.15);
}

.toggle input:checked:hover + .toggle-slider {
    background: linear-gradient(135deg, #5ba9eb, #7688f4);
}

/* Theme Options */
.theme-options {
    display: flex;
    gap: 12px;
}

.theme-btn {
    flex: 1;
    padding: 16px;
    background: rgba(66, 153, 225, 0.05);
    border: 2px solid rgba(66, 153, 225, 0.3);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.theme-btn i {
    font-size: 24px;
}

.theme-btn:hover {
    background: rgba(66, 153, 225, 0.1);
    border-color: rgba(66, 153, 225, 0.5);
    color: #ffffff;
}

.theme-btn.active {
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.2), rgba(102, 126, 234, 0.2));
    border-color: #4299e1;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

/* Color Options */
.color-options {
    display: flex;
    gap: 12px;
}

.color-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: var(--accent);
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px var(--accent), 0 4px 12px var(--accent);
}

.color-btn::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-btn.active::after {
    opacity: 1;
}

/* Range Input */
.range-input {
    display: flex;
    align-items: center;
    gap: 16px;
}

.range-input input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(66, 153, 225, 0.2);
    border-radius: 3px;
    outline: none;
}

.range-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #4299e1, #667eea);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.4);
    transition: all 0.3s ease;
}

.range-input input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.range-input input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #4299e1, #667eea);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.4);
    transition: all 0.3s ease;
}

.range-input input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.range-value {
    font-family: 'Space Grotesk', monospace;
    font-size: 15px;
    font-weight: 600;
    color: #4299e1;
    min-width: 50px;
    text-align: right;
}

/* API Key Input */
.api-key-input {
    display: flex;
    gap: 8px;
}

.api-key-input input {
    flex: 1;
}

.icon-btn {
    width: 44px;
    height: 44px;
    background: rgba(66, 153, 225, 0.1);
    border: 1px solid rgba(66, 153, 225, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(66, 153, 225, 0.2);
    color: #ffffff;
    border-color: rgba(66, 153, 225, 0.5);
}

/* Action Buttons */
.save-btn,
.action-btn {
    padding: 14px 28px;
    border-radius: 10px;
    font-family: 'Space Grotesk', monospace;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.save-btn {
    background: linear-gradient(135deg, #4299e1, #667eea);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.5);
}

.action-btn {
    width: 100%;
}

.action-btn.secondary {
    background: rgba(66, 153, 225, 0.1);
    color: #4299e1;
    border: 1px solid rgba(66, 153, 225, 0.3);
}

.action-btn.secondary:hover {
    background: rgba(66, 153, 225, 0.2);
    border-color: rgba(66, 153, 225, 0.5);
}

.action-btn.danger {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.action-btn.danger:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: rgba(255, 71, 87, 0.5);
}

/* Responsive */
@media (max-width: 968px) {
    .settings-section {
        padding: 24px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .theme-options {
        flex-direction: column;
    }

    .theme-btn {
        flex-direction: row;
        justify-content: center;
    }

    .main-content {
        padding-bottom: 80px;
    }
}

@media (max-width: 640px) {
    .settings-section {
        padding: 20px;
    }

    .section-header h2 {
        font-size: 18px;
    }

    .toggle-setting {
        flex-direction: column;
        align-items: flex-start;
    }

    .color-options {
        flex-wrap: wrap;
    }
}
