/* --- Design System 5.0: Apple Human Interface Guidelines --- */
:root { 
    /* --- 修改重点：极度透明化处理 --- */
    
    /* 1. 主卡片背景：大幅降低不透明度 */
    /* 上方仅保留 12% 的白色，下方完全透明，打造极致通透感 */
    --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.0) 100%);
    
    /* 2. 边框：调淡，仅保留一丝光泽 */
    --glass-border: rgba(255, 255, 255, 0.25);
    
    /* 3. 模糊度：【已修改】降低模糊度，从 20px 改为 10px */
    --glass-blur: blur(10px) 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;
    cursor: pointer; 
}

/* --- 背景图设置 --- */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    /* PC端背景 - 路径修正：使用 ../img 返回上一级找到图片 */
    background-image: url('../img/PC/PC20260128.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
@media screen and (max-width: 768px) {
    body::before { 
        /* 移动端背景 - 路径修正 */
        background-image: url('../img/mobile/mobile20260128_3.png'); 
    }
}

.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;
}

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

/* 头部 */
.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);
    /* Logo 盒子也做半透明处理，更加协调 */
    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); 
    letter-spacing: -0.02em; 
    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; 
    display: flex; align-items: center; gap: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    pointer-events: auto;
    position: relative;
    z-index: 20;
}
.subtitle:active { transform: scale(0.95); background: rgba(255,255,255,0.3); }

/* 公告区域 */
.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;
    letter-spacing: 0.5px;
}

.notice-content {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.5;
    font-weight: 500;
    max-height: 100px; 
    overflow-y: auto;
    scrollbar-width: thin; 
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}

.notice-content::-webkit-scrollbar { width: 4px; }
.notice-content::-webkit-scrollbar-track { background: transparent; }
.notice-content::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.1); border-radius: 4px; }

/* 表单区域 */
#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); 
    z-index: 15;
}

.input-container:hover { background: var(--surface-hover); }

.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); 
    letter-spacing: 0.5px; 
    font-weight: 600; 
    pointer-events: auto;
    -webkit-user-select: text;
    user-select: text;
}

input::placeholder { 
    font-family: 'Inter', sans-serif; 
    letter-spacing: 0; 
    color: var(--text-sub); 
    font-weight: 400; 
    font-size: 14px;
    opacity: 0.6;
}

/* 状态消息 */
.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;
    z-index: 20;
}

button:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 15px 30px -10px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.25);
    filter: brightness(1.05);
}
button:active { transform: scale(0.98); filter: brightness(0.95); }

.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; 
}
button.loading span { display: none; }
button.loading .loader { display: block; }

/* 底部区域 */
.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;
    letter-spacing: 0.02em;
}

.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); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.shake { animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
