* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family:-apple-system, BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    background:linear-gradient(135deg,#2b1a47 0%,#1c0f30 100%);
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    color:#e5e5f7;
}

.config-container {
    background:#1f1433;
    border-radius:16px;
    box-shadow:0 20px 40px rgba(0,0,0,0.6);
    width:100%;
    max-width:680px;
    overflow:hidden;
    border:1px solid #3a235a;
}

.header {
    background:linear-gradient(135deg,#5a3fa6 0%,#764ba2 100%);
    color:#fff;
    padding:30px;
    text-align:center;
}

.header h1 { font-size:28px; font-weight:700; margin-bottom:10px; }
.header p { opacity:.9; font-size:16px; }

.form-container { padding:40px; }

.method-tabs {
    display:flex;
    background:#2c1f47;
    border-radius:8px;
    padding:4px;
    margin-bottom:20px;
}

.method-tab {
    flex:1;
    padding:12px;
    text-align:center;
    border-radius:6px;
    cursor:pointer;
    transition:all .3s;
    font-weight:500;
    color:#c9b8e8;
    user-select:none;
}

.method-tab.active {
    background:#5a3fa6;
    box-shadow:0 2px 6px rgba(0,0,0,0.4);
    color:#fff;
}

.config-section { display:none; animation:fadeIn .3s ease; }
.config-section.active { display:block; }

@keyframes fadeIn {
    from { opacity:0; transform:translateY(10px); }
    to { opacity:1; transform:translateY(0); }
}

.form-group { margin-bottom:20px; }
.form-group label {
    display:block;
    margin-bottom:8px;
    font-weight:500;
    color:#d6d0ec;
}

.form-group input {
    width:100%;
    padding:12px 16px;
    border:2px solid #3a2d55;
    background:#2b1f45;
    color:#e5e5f7;
    border-radius:8px;
    font-size:14px;
    transition:border-color .3s, background .3s;
}

.form-group input:focus {
    outline:none;
    border-color:#8e5de3;
    background:#352457;
}

.checkbox-group {
    display:flex;
    align-items:center;
    gap:10px;
    color:#c9b8e8;
}

.checkbox-group input[type="checkbox"] {
    width:auto;
    transform:scale(1.2);
    cursor:pointer;
}

.install-button {
    width:100%;
    background:linear-gradient(135deg,#5a3fa6 0%,#8e5de3 100%);
    color:#fff;
    border:none;
    padding:16px;
    border-radius:8px;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    transition:transform .2s;
    margin-top:10px;
}

.install-button:hover { transform:translateY(-1px); }
.install-button:disabled { opacity:.6; cursor:not-allowed; transform:none; }

.info-box {
    background:#2c1f47;
    border-left:4px solid #8e5de3;
    padding:16px;
    margin-bottom:20px;
    border-radius:0 8px 8px 0;
}

.info-box h3 {
    color:#e0d9f7;
    margin-bottom:6px;
    font-size:16px;
}

.info-box p {
    color:#b3a6d6;
    font-size:14px;
    line-height:1.45;
}

.required { color:#f87171; }
small { display:block; margin-top:4px; line-height:1.3; color:#a89ac6; }

.pwd-toggle {
    color:#8e5de3;
    text-decoration:none;
    font-size:12px;
}
.pwd-toggle:hover { text-decoration:underline; }

@media (max-width:600px) {
    .form-container { padding:22px; }
    .header { padding:24px; }
    .header h1 { font-size:24px; }
}

/* Loader Overlay */
.loader-overlay {
    position:fixed;
    inset:0;
    background:rgba(18,12,30,0.85);
    backdrop-filter:blur(6px);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:999;
    padding:20px;
}

.loader-overlay.hidden { display:none; }

.loader-box {
    width:100%;
    max-width:480px;
    background:#241836;
    border:1px solid #4b2e72;
    border-radius:18px;
    padding:32px 32px 28px;
    box-shadow:0 18px 42px -8px rgba(0,0,0,0.6);
    position:relative;
    overflow:hidden;
}

.loader-box h2 {
    margin:0 0 10px;
    font-size:22px;
    font-weight:600;
    letter-spacing:.5px;
}

.loader-box p {
    margin:0 0 14px;
    line-height:1.4;
    color:#d4c9ea;
    font-size:14px;
}

.spinner {
    width:54px;
    height:54px;
    border-radius:50%;
    margin:0 auto 18px;
    border:6px solid #3e2b60;
    border-top-color:#8e5de3;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }

.progress-wrapper {
    position:relative;
    width:100%;
    height:14px;
    background:#34234f;
    border-radius:10px;
    overflow:hidden;
    margin:6px 0 10px;
}

.progress-bar {
    height:100%;
    width:0%;
    background:linear-gradient(90deg,#6a46c9,#8e5de3,#b978ff);
    background-size:200% 100%;
    animation: progressMove 3s linear infinite;
    transition:width .35s ease;
}
@keyframes progressMove {
    0% { background-position:0 0; }
    100% { background-position:-200% 0; }
}

.progress-text {
    font-size:13px;
    text-align:center;
    color:#cbb7ef;
    margin:0 0 12px;
}

.action-row {
    display:flex;
    gap:12px;
    margin-bottom:10px;
    flex-wrap:wrap;
}

.action-row button {
    flex:1;
    min-width:140px;
}

.open-btn,
.copy-btn,
.cancel-btn {
    border:none;
    border-radius:8px;
    padding:12px 16px;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:background .25s, transform .2s;
}

.open-btn {
    background:linear-gradient(135deg,#5a3fa6,#8e5de3);
    color:#fff;
}
.open-btn:disabled { opacity:.5; cursor:not-allowed; }
.open-btn:not(:disabled):hover { transform:translateY(-2px); }

.copy-btn {
    background:#3a2759;
    color:#e8dbff;
}
.copy-btn:disabled { opacity:.5; cursor:not-allowed; }
.copy-btn:not(:disabled):hover { background:#443067; }

.cancel-btn {
    background:#2d203f;
    color:#c6b2e9;
    width:100%;
    margin-top:6px;
}
.cancel-btn:hover { background:#382a4e; }

.status-details {
    font-size:12px;
    color:#a691c9;
    text-align:center;
    min-height:18px;
    white-space:pre-line;
    margin-top:2px;
}

.loader-box.success {
    border-color:#2e865f;
}
.loader-box.success .progress-bar {
    animation:none;
    background:linear-gradient(90deg,#3bb37b,#62d79d);
}

.loader-box.error {
    border-color:#b34242;
}
.loader-box.error .progress-bar {
    animation:none;
    background:linear-gradient(90deg,#b34242,#e85f5f);
}