:root {
    --primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --primary-solid: #6366f1;
    --bg-light: #f8faff;
    --border: #e0e7ff;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

body {
    margin: 0; background: #f0f2f5; font-family: -apple-system, sans-serif;
    display: flex; justify-content: center; min-height: 100vh;
}

/* 页面入场效果 */
.auth-card {
    opacity: 0; transform: translateY(20px); transition: var(--transition);
    width: 92%; max-width: 400px; margin: 20px 0; padding: 30px 24px;
    background: white; border-radius: 32px; height: fit-content;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}
.auth-ready .auth-card { opacity: 1; transform: translateY(0); }

/* Logo 区域样式 */
/* Logo 区域样式 - 负责整体居中 */
.logo-area { 
    display: flex;             /* 开启 Flex 布局 */
    flex-direction: column;    /* 垂直排列 */
    align-items: center;       /* 水平居中 */
    justify-content: center;   /* 垂直居中 */
    text-align: center;        /* 文本居中 */
    margin-bottom: 20px;       /* 底部间距 */
}

/* 让 logo 区域支持点击 - 负责内部堆叠 */
.logo-area .home-link {
    text-decoration: none; 
    color: inherit;        
    display: block;        /* 改为 block，让图片和文字垂直堆叠 */
    cursor: pointer;       
    transition: transform 0.2s ease; 
    width: 100%;           /* 占满父容器宽度，确保点击区域大 */
}

/* 鼠标悬停时的效果 */
.logo-area .home-link:hover {
    transform: scale(1.05); /* 稍微放大一点点 */
}

/* 确保图片大小合适 */
.logo-area .home-link img {
    height: 60px;  /* 稍微调大一点，配合两行布局 */
    width: auto;
    display: block;
    margin: 0 auto; /* 图片水平居中 */
}

/* 确保标题没有默认边距干扰布局 */
.logo-area .brand-title {
    margin: 10px 0 0 0; /* 顶部留出一点空隙 */
    font-size: 24px; 
    line-height: 1.2;
    font-weight: 800;
    color: #5c67ff;
}

.brand-title { color: #5c67ff; font-size: 24px; margin: 10px 0 0 0; line-height: 1; font-weight: 800; }
.brand-title span { color: #8b5cf6; }
.slogan { color: #94a3b8; font-size: 13px; margin: 5px 0 25px 0; }

/* Tab 滑动切换 */
.tab-group { position: relative; display: flex; background: #f1f5f9; border-radius: 14px; padding: 4px; margin-bottom: 20px; }
.tab-item { position: relative; flex: 1; padding: 12px; text-align: center; cursor: pointer; font-weight: bold; color: #64748b; z-index: 1; }
.tab-item.active { color: white; transition: color 0.3s; }

/* 滑块动画 */
.tab-group::after {
    content: ''; position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); height: calc(100% - 8px);
    background: var(--primary); border-radius: 11px; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 0;
}
[data-auth-tab="reg"] .tab-group::after { transform: translateX(100%); }

/* 注册字段平滑展开 */
.reg-fields-wrapper { display: grid; grid-template-rows: 0fr; transition: var(--transition); overflow: hidden; }
[data-auth-tab="reg"] .reg-fields-wrapper { grid-template-rows: 1fr; margin-bottom: 16px; }
.reg-fields-inner { min-height: 0; }

/* 输入框交互 */
.input-group { margin-bottom: 16px; }
.input-label { display: block; font-size: 13px; color: #475569; margin-bottom: 6px; padding-left: 5px; }
.input-wrapper { background: var(--bg-light); border: 1.5px solid var(--border); border-radius: 14px; display: flex; align-items: center; transition: var(--transition); }
.input-wrapper:focus-within { border-color: var(--primary-solid); background: white; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); }
.input-wrapper input { flex: 1; border: none; background: transparent; padding: 14px; outline: none; font-size: 15px; }
.input-wrapper input[readonly] { background: transparent; cursor: pointer; }

/* 图标与箭头 */
.input-icon { margin-left: 10px; padding-right: 5px; font-size: 18px; }
.arrow-icon { margin-right: 15px; color: #94a3b8; font-size: 16px; }
.eye-icon { padding: 0 15px; cursor: pointer; font-size: 18px; }

/* 验证码按钮 */
.send-sms-btn {
    border: none; background: #cbd5e1; color: white; padding: 0 15px; height: 36px;
    margin-right: 8px; border-radius: 10px; font-weight: bold; font-size: 12px; cursor: not-allowed; transition: background 0.3s;
}
.send-sms-btn.active { background: #6366f1; cursor: pointer; }

/* 提交按钮 */
.submit-btn {
    width: 100%; padding: 16px; margin-top: 10px; border: none; border-radius: 16px;
    font-size: 17px; font-weight: bold; color: white; background: #cbd5e1; cursor: not-allowed; transition: var(--transition);
}
.submit-btn.active { background: var(--primary); cursor: pointer; box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2); }