        

        body {
            background-color: var(--bg-color);
            background-image:
                radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
                radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 0.2) 0, transparent 50%),
                radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 0.2) 0, transparent 50%);
            color: var(--text-primary);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            padding: 2rem;
        }

        .container {
            background: var(--card-bg);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 24px;
            padding: 2.5rem;
            width: 100%;
            max-width: 600px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
            animation: fadeIn 0.6s ease-out;
            position: relative;
        }

        

        .header {
            display: flex;
            align-items: center;
            margin-bottom: 2rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding-bottom: 1.5rem;
        }

        .back-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--text-primary);
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            transition: all 0.2s;
            margin-right: 1.5rem;
        }

        .back-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateX(-3px);
        }

        h1 {
            font-size: 1.75rem;
            font-weight: 600;
            background: linear-gradient(135deg, #60a5fa, #c084fc);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .form-group {
            margin-bottom: 1.5rem;
            display: flex;
            flex-direction: column;
        }

        label {
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }

        input,
        select {
            width: 100%;
            padding: 0.875rem 1rem;
            background: var(--input-bg);
            border: 1px solid var(--input-border);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 1rem;
            outline: none;
            transition: all 0.2s;
            appearance: none;
        }

        /* Custom select arrow styling */
        select {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            background-size: 1em;
            padding-right: 2.5rem;
        }

        select option {
            background: var(--bg-color);
            color: var(--text-primary);
        }

        input:focus,
        select:focus {
            border-color: var(--input-focus);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
        }

        .btn-save {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem 1.5rem;
            font-size: 1.125rem;
            font-weight: 500;
            color: white;
            border: none;
            border-radius: 12px;
            margin-top: 2rem;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            z-index: 1;
        }

        .btn-save::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
            z-index: -1;
            transition: opacity 0.3s ease;
        }

        .btn-save:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5);
        }

        .btn-save:active {
            transform: translateY(1px);
        }

        .helper-text {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 0.5rem;
            opacity: 0.8;
        }

        .icon {
            margin-right: 0.5rem;
        }

        /* --- Provider Toggle Section --- */
        .provider-section {
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            padding: 1.25rem;
            margin-bottom: 1.25rem;
            transition: all 0.3s ease;
            position: relative;
            background: rgba(0, 0, 0, 0.15);
        }

        .provider-section.disabled {
            opacity: 0.45;
            pointer-events: none;
        }

        .provider-section.disabled .provider-header {
            pointer-events: all;
        }

        .provider-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 1rem;
            cursor: pointer;
            user-select: none;
        }

        .provider-header:last-child {
            margin-bottom: 0;
        }

        /* Custom Toggle Switch */
        .toggle-switch {
            position: relative;
            width: 44px;
            height: 24px;
            flex-shrink: 0;
        }

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

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

        .toggle-slider::before {
            content: '';
            position: absolute;
            height: 18px;
            width: 18px;
            left: 2px;
            bottom: 2px;
            background: #64748b;
            border-radius: 50%;
            transition: all 0.3s;
        }

        .toggle-switch input:checked+.toggle-slider {
            background: rgba(59, 130, 246, 0.3);
            border-color: rgba(59, 130, 246, 0.5);
        }

        .toggle-switch input:checked+.toggle-slider::before {
            transform: translateX(20px);
            background: #3b82f6;
            box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
        }

        .provider-name {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .provider-badge {
            font-size: 0.65rem;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .badge-primary {
            background: rgba(59, 130, 246, 0.2);
            color: #60a5fa;
        }

        .badge-fallback {
            background: rgba(251, 191, 36, 0.15);
            color: #fbbf24;
        }

        .badge-claude {
            background: rgba(217, 119, 87, 0.2);
            color: #e8956a;
        }

        .badge-groq {
            background: rgba(16, 185, 129, 0.15);
            color: #34d399;
        }

        .provider-body {
            padding-top: 0.25rem;
        }

        .provider-body .form-group {
            margin-bottom: 1rem;
        }

        .provider-body .form-group:last-child {
            margin-bottom: 0;
        }

        /* Section separator */
        .section-divider {
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
            margin: 0.5rem 0 1.5rem 0;
        }

        /* Fallback chain info */
        .fallback-info {
            background: rgba(139, 92, 246, 0.08);
            border: 1px solid rgba(139, 92, 246, 0.15);
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            font-size: 0.8rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        .fallback-info strong {
            color: #a78bfa;
        }

        .fallback-chain {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: 0.5rem;
            flex-wrap: wrap;
        }

        .chain-item {
            padding: 3px 10px;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 600;
            transition: all 0.3s;
        }

        .chain-item.active {
            opacity: 1;
        }

        .chain-item.inactive {
            opacity: 0.3;
            text-decoration: line-through;
        }

        .chain-arrow {
            color: rgba(255, 255, 255, 0.3);
            font-size: 0.75rem;
        }

        .chain-gemini {
            background: rgba(59, 130, 246, 0.2);
            color: #60a5fa;
        }

        .chain-studio {
            background: rgba(168, 85, 247, 0.2);
            color: #c084fc;
        }

        .chain-claude {
            background: rgba(217, 119, 87, 0.2);
            color: #e8956a;
        }

        .chain-groq {
            background: rgba(16, 185, 129, 0.15);
            color: #34d399;
        }

        .btn-list {
            padding: 0 15px;
            border-radius: 8px;
            font-size: 0.85rem;
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-primary);
            border: 1px solid rgba(255, 255, 255, 0.12);
            cursor: pointer;
            transition: all 0.2s;
            height: 48px;
            display: flex;
            align-items: center;
            white-space: nowrap;
        }

        .btn-list:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.2);
        }
