* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f1f5f9;
    overflow: hidden;
    position: relative;
    color: #334155;
}

#leaf-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    perspective: 800px; 
}

#leaf-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 10;
}

.triangle-leaf {
    position: absolute;
    will-change: transform, opacity;
    transform-style: preserve-3d;
}

.glass-container {
    width: 92%;
    max-width: 380px;
    padding: 32px 28px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 
                0 20px 40px -10px rgba(0, 0, 0, 0.08);
    z-index: 1; 
    position: relative;
}

/* 表单切换 */
.form-wrapper { display: grid; }
.auth-form {
    grid-area: 1 / 1; 
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(15px) scale(0.98);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-form.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: center;
    color: #1e293b;
    letter-spacing: -0.5px;
}
.subtitle {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    margin-bottom: 24px;
}

/* 输入控件 */
.input-group {
    margin-bottom: 16px;
    position: relative;
}
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 10px;
    color: #334155;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}
input:focus {
    background: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-captcha {
    width: 100%;
    padding: 11px;
    background: rgba(241, 245, 249, 0.8);
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}
.btn-captcha:hover {
    background: #f8fafc;
    border-color: #3b82f6;
    color: #3b82f6;
}
.btn-captcha.success {
    background: #f0fdf4;
    border: 1px solid #22c55e;
    color: #16a34a;
    pointer-events: none;
}

.flex-group { display: flex; gap: 8px; }
.flex-group input { flex: 1; }
.btn-code {
    padding: 0 16px;
    min-width: 100px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.btn-code:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
}

.form-actions {
    margin: 4px 0 20px 0;
    font-size: 13px;
}
.row-between { display: flex; justify-content: space-between; align-items: center; }

.checkbox-container { display: flex; align-items: center; cursor: pointer; color: #64748b; }
.checkbox-container input { display: none; } 
.checkmark {
    width: 15px; height: 15px;
    background: #fff; border: 1px solid #cbd5e1;
    border-radius: 4px; margin-right: 6px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.checkbox-container input:checked + .checkmark { background: #3b82f6; border-color: #3b82f6; }
.checkbox-container input:checked + .checkmark::after {
    content: ''; width: 3px; height: 6px;
    border: solid white; border-width: 0 2px 2px 0;
    transform: rotate(45deg); margin-bottom: 2px;
}

.text-link { color: #3b82f6; text-decoration: none; font-weight: 500; }
.text-link:hover { text-decoration: underline; }

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: all 0.2s;
    margin-bottom: 16px;
    position: relative;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3); }

.btn-primary.loading {
    color: transparent !important;
    pointer-events: none;
}
.btn-primary.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinBtn 0.8s linear infinite;
}
@keyframes spinBtn { to { transform: rotate(360deg); } }

.form-footer { text-align: center; font-size: 13px; color: #64748b; }

.toast-container { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 13px;
    color: #1e293b;
    border: 1px solid rgba(255,255,255,0.5);
    animation: toastFadeIn 0.3s ease-out forwards;
}
.toast-icon { font-size: 14px; }
.toast.fade-out { animation: toastFadeOut 0.3s ease-in forwards; }
@keyframes toastFadeIn { 0% { opacity: 0; transform: translateY(-10px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes toastFadeOut { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-10px); } }

.error-msg { color: #ef4444; font-size: 12px; text-align: center; margin-bottom: 8px; height: 16px; opacity: 0; transition: opacity 0.2s;}
.error-msg.show { opacity: 1; }

.input-group.has-hint input { padding-right: 65px; }
.pwd-hint { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; opacity: 0; }
.pwd-hint.show { opacity: 1; }
.pwd-hint.match { color: #22c55e; }
.pwd-hint.mismatch { color: #ef4444; }

/* =========================================
   新增：多账号下拉组合框样式
========================================= */
.combo-group { position: relative; }
.combo-group input { padding-right: 36px !important; }
.combo-toggle {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    cursor: pointer; color: #94a3b8; padding: 4px; border-radius: 6px; 
    transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.combo-toggle:hover { background: rgba(0,0,0,0.05); color: #3b82f6; }
.combo-toggle svg { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.combo-toggle.open svg { transform: rotate(180deg); }

.combo-list {
    position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 100; list-style: none;
    max-height: 180px; overflow-y: auto; overflow-x: hidden;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.combo-list.show { opacity: 1; visibility: visible; transform: translateY(0); }

.combo-list::-webkit-scrollbar { width: 5px; }
.combo-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; }

.combo-item {
    padding: 10px 14px; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; font-size: 14px; color: #334155; transition: background 0.2s;
}
.combo-item:hover { background: #f8fafc; }
.combo-item-user { 
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; 
    display: flex; align-items: center; gap: 8px;
}
.combo-item-user::before {
    content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: #e2e8f0; transition: background 0.3s;
}
.combo-item.has-pwd .combo-item-user::before { background: #22c55e; } 

.combo-delete {
    color: #94a3b8; padding: 4px; border-radius: 6px; 
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.combo-delete:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.combo-item.removing { animation: slideOutLeft 0.3s ease-in forwards; }

@keyframes slideOutLeft { 
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-30px); } 
}