/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #202020;
    background-color: #faf9f7;
    line-height: 1.6;
}

/* 关闭按钮 - 右上角 */
.auth-close-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e8e8e8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-close-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.auth-close-btn:active {
    transform: scale(0.95);
}

.auth-close-btn svg {
    color: #2c2c2c;
    width: 20px;
    height: 20px;
}

/* 认证页面样式 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #faf9f7 0%, #e8e8e8 100%);
    padding: 2rem 1rem;
}

.auth-box {
    width: 100%;
    max-width: 450px;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #6b6b6b;
    font-size: 0.95rem;
}

/* 标签切换 */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6b6b6b;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.auth-tab.active {
    color: #2c2c2c;
    border-bottom-color: #2c2c2c;
}

/* 表单 */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #2c2c2c;
}

.code-input-group {
    display: flex;
    gap: 0.5rem;
}

.code-input-group input {
    flex: 1;
}

/* 按钮基础样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: #2c2c2c;
    color: white;
}

.btn-primary:hover {
    background-color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #2c2c2c;
    border: 1px solid #e8e8e8;
}

.btn-secondary:hover {
    background-color: #e8e8e8;
    border-color: #d0d0d0;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-send-code {
    white-space: nowrap;
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #6b6b6b;
}

.form-footer a {
    color: #2c2c2c;
    font-weight: 500;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 分隔线 */
.auth-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e8e8e8;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    color: #6b6b6b;
    font-size: 0.9rem;
}

/* 社交登录 */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-social {
    width: 100%;
    padding: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.btn-wechat {
    background: #07c160;
    color: white;
    border: none;
}

.btn-wechat:hover {
    background: #06ad56;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    padding: 2rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6b6b6b;
    line-height: 1;
}

/* 响应式 */
@media (max-width: 768px) {
    .auth-box {
        padding: 2rem 1.5rem;
    }
    
    .auth-close-btn {
        top: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }
    
    .auth-close-btn svg {
        width: 18px;
        height: 18px;
    }
}

