/* --- Design System 5.0 --- */
:root { 
    --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.0) 100%);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-blur: blur(4px) saturate(180%);
    --glass-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255,255,255,0.3);
    
    --primary-color: #007AFF; 
    --primary-gradient: linear-gradient(180deg, #2b95ff 0%, #007aff 100%);
    --primary-glow: rgba(0, 122, 255, 0.35);
    
    --text-main: rgba(0, 0, 0, 0.95);
    --text-sub: rgba(0, 0, 0, 0.65);
    
    --surface-inner: rgba(255, 255, 255, 0.08); 
    --surface-hover: rgba(255, 255, 255, 0.15);
    --surface-focus: rgba(255, 255, 255, 0.3);
    
    --success: #34c759;
    --error: #ff3b30;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    width: 100vw; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    overflow: hidden; 
    position: relative;
    background-color: #f0f2f5;
    touch-action: manipulation;
}

/* 背景配置 PC */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background-image: url('https://youke.xn--y7xa690gmna.cn/s1/2026/01/31/697d0960f2497.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* 背景配置 移动端 */
@media screen and (max-width: 768px) {
    body::before { 
        background-image: url('https://picui.ogmua.cn/s1/2026/02/27/69a186c43f11b.webp'); 
    }
}

.noise-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    z-index: 0; pointer-events: none; opacity: 0.04; 
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E"); 
}

.glass-card { 
    position: relative; 
    z-index: 10; 
    width: 86%; 
    max-width: 350px; 
    background: var(--glass-bg); 
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur); 
    border: 1px solid var(--glass-border); 
    border-radius: 32px; 
    padding: 24px;
    box-shadow: var(--glass-shadow);
    animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@keyframes cardEntrance { 
    from { opacity: 0; transform: translateY(20px) scale(0.98); } 
    to { opacity: 1; transform: translateY(0) scale(1); } 
}

/* Header Styles */
.header { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.brand-area { display: flex; align-items: center; gap: 12px; }
.icon-box { 
    width: 36px; height: 36px; 
    border-radius: 9px; 
    overflow: hidden; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.8);
    display: flex; align-items: center; justify-content: center;
}
.logo-img { width: 100%; height: 100%; object-fit: cover; }
h1 { font-size: 18px; font-weight: 700; color: var(--text-main); line-height: 1; text-shadow: 0 1px 2px rgba(255,255,255,0.5); }
.subtitle { 
    font-size: 11px; color: var(--text-sub); font-weight: 600; 
    background: rgba(255,255,255,0.15); padding: 6px 10px; border-radius: 8px; 
    cursor: pointer; transition: all 0.2s; border: 1px solid rgba(255,255,255,0.2);
    display: flex; align-items: center; gap: 4px;
}
.subtitle:active { transform: scale(0.95); background: rgba(255,255,255,0.3); }

/* Notice Box */
.notice-box {
    background: var(--surface-inner); border-radius: 18px; padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.15); display: flex; flex-direction: column; gap: 6px;
}
.notice-header {
    display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
    color: var(--primary-color); opacity: 0.9; text-transform: uppercase;
}
.notice-content {
    font-size: 13px; color: var(--text-sub); line-height: 1.5; font-weight: 500;
    max-height: 100px; overflow-y: auto;
}

/* Form */
#auth-form { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.input-container { 
    position: relative; background: var(--surface-inner); border-radius: 18px; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; align-items: center; height: 52px; border: 1px solid rgba(255,255,255,0.15); 
}
.input-container:focus-within { 
    background: var(--surface-focus); box-shadow: 0 4px 20px -4px rgba(0,122,255,0.15); 
    border-color: rgba(0,122,255,0.3); transform: translateY(-1px);
}
.input-icon { padding-left: 18px; color: var(--text-sub); font-size: 20px; transition: color 0.3s; opacity: 0.7; }
.input-container:focus-within .input-icon { color: var(--primary-color); opacity: 1; }
input { 
    width: 100%; height: 100%; padding: 0 16px; background: transparent; border: none; 
    font-family: 'Monaco', 'Menlo', monospace; font-size: 15px; color: var(--text-main); 
    font-weight: 600; 
}
input::placeholder { font-family: 'Inter', sans-serif; color: var(--text-sub); font-weight: 400; opacity: 0.6; }

/* Status & Button */
.status-message { 
    height: 0; opacity: 0; font-size: 13px; text-align: center; font-weight: 500; 
    transition: all 0.3s ease; overflow: hidden; margin-top: -10px; 
}
.status-message.active { height: 20px; opacity: 1; margin-top: 0; margin-bottom: 2px; }
.status-message.error { color: var(--error); }
.status-message.success { color: var(--success); }

button { 
    width: 100%; height: 50px; border: none; border-radius: 16px; 
    background: var(--primary-gradient); color: white; font-size: 16px; font-weight: 600; 
    cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s;
    box-shadow: 0 10px 25px -8px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.25);
    display: flex; align-items: center; justify-content: center;
}
button:active { transform: scale(0.98); filter: brightness(0.95); }
button.loading span { display: none; }
button.loading .loader { display: block; }
.loader { 
    display: none; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); 
    border-radius: 50%; border-top-color: #fff; animation: spin 0.8s linear infinite; 
}

/* Footer */
.footer { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; margin-top: 4px; }
.copyright { font-size: 11px; color: var(--text-sub); font-weight: 500; opacity: 0.6; }
.switch-group { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.switch-text { font-size: 11px; color: var(--text-sub); font-weight: 500; opacity: 0.8; }
.switch-input { display: none; }
.switch-slider { 
    width: 36px; height: 22px; background-color: rgba(0,0,0,0.08); 
    border-radius: 99px; position: relative; transition: 0.3s; 
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}
.switch-slider::before { 
    content: ""; position: absolute; width: 18px; height: 18px; left: 2px; bottom: 2px; 
    background: white; border-radius: 50%; transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.15); 
}
.switch-input:checked + .switch-slider { background-color: var(--primary-color); opacity: 1; }
.switch-input:checked + .switch-slider::before { transform: translateX(14px); }

/* Animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shakeX { 
    0%, 100% { transform: translateX(0); } 
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); } 
    20%, 40%, 60%, 80% { transform: translateX(4px); } 
}
.shake-anim { animation: shakeX 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
