/* ===== Settings Page ===== */
.settings-page {
    max-width: 700px;
    margin: 0 auto;
}

.settings-page__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.settings-page__header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ===== Settings Section ===== */
.settings-section {
    background: var(--bg-card);
    backdrop-filter: var(--card-bg-blur, blur(12px));
    -webkit-backdrop-filter: var(--card-bg-blur, blur(12px));
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.settings-section:hover {
    border-color: rgba(var(--accent-primary), 0.3);
}

.settings-section h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-weight: 700;
}

.settings-section__desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ===== Theme Picker ===== */
.theme-picker {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.theme-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: border-color 0.2s ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease;
    min-width: 100px;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 600;
}

.theme-swatch:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.theme-swatch--active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow, rgba(49, 130, 206, 0.3)),
                0 6px 20px rgba(0, 0, 0, 0.15);
}

.theme-swatch__preview {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: block;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.theme-swatch:hover .theme-swatch__preview {
    transform: scale(1.08);
}

.theme-swatch__preview--default {
    background: linear-gradient(135deg, #3b82f6 40%, #0f1729 40%, #0f1729 60%, #1e40af 60%);
}

.theme-swatch__preview--dark {
    background: linear-gradient(135deg, #06b6d4 40%, #0a0a0f 40%, #0a0a0f 60%, #0e7490 60%);
}

.theme-swatch__preview--forest {
    background: linear-gradient(135deg, #10b981 40%, #0d1f0d 40%, #0d1f0d 60%, #047857 60%);
}

.theme-swatch__preview--sunset {
    background: linear-gradient(135deg, #f59e0b 40%, #1a0f05 40%, #1a0f05 60%, #f43f5e 60%);
}

.theme-swatch__preview--arctic {
    background: linear-gradient(135deg, #0ea5e9 40%, #eef2f7 40%, #eef2f7 60%, #38bdf8 60%);
}

.theme-swatch__preview--lavender {
    background: linear-gradient(135deg, #8b5cf6 40%, #f3f0f9 40%, #f3f0f9 60%, #a78bfa 60%);
}

.theme-swatch__preview--rose {
    background: linear-gradient(135deg, #f43f5e 40%, #fdf2f4 40%, #fdf2f4 60%, #fb7185 60%);
}

.theme-swatch__preview--mint {
    background: linear-gradient(135deg, #14b8a6 40%, #ecfdf5 40%, #ecfdf5 60%, #2dd4bf 60%);
}

.theme-swatch__label {
    pointer-events: none;
    opacity: 0.8;
}

/* ===== Gizmo Toggles ===== */
.gizmo-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gizmo-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    color: var(--text-primary);
    border: 1px solid transparent;
}

.gizmo-toggle:hover {
    background-color: var(--bg-primary);
    border-color: var(--border-color);
}

/* Toggle switch style */
.gizmo-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    background: var(--bg-primary);
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.gizmo-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.2s ease;
}

.gizmo-toggle input[type="checkbox"]:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.gizmo-toggle input[type="checkbox"]:checked::after {
    transform: translateX(18px);
    background: #ffffff;
}

.gizmo-toggle__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.gizmo-toggle__name {
    font-weight: 500;
}

/* ===== Settings Actions ===== */
.settings-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* ===== Toast ===== */
.settings-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    animation: toastSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(8px);
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
