* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
    background-color: #0A0F1E;
    color: #EFF3FC;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

:root {
    --primary: #2A6DFF;
    --primary-dark: #1E52CC;
    --primary-glow: rgba(42, 109, 255, 0.25);
    --bg-card: #111827;
    --bg-elevated: #1E293B;
    --border-dim: #2D3A5E;
    --text-muted: #A0B3D9;
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background: rgba(10, 15, 30, 0.92);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(45, 58, 94, 0.5);
    flex-shrink: 0;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 700;
}

.logo i {
    font-size: 2rem;
    color: var(--primary);
    transform: rotate(-20deg);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-outline {
    border: 1.5px solid var(--primary);
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary);
    padding: 8px 24px;
    border-radius: 40px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(42, 109, 255, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline:hover {
    background: rgba(42, 109, 255, 0.1);
}

#menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* 登录页主体 */
.auth-wrapper {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
}

.auth-wrapper-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, #0f172f, #030614);
    z-index: -1;
}

.auth-wrapper-bg::before {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(42,109,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: drift 40s linear infinite;
    pointer-events: none;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20%, 20%); }
}

.auth-card {
    background: var(--bg-card);
    border-radius: 32px;
    border: 1px solid var(--border-dim);
    padding: 48px 44px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(42,109,255,0.25), rgba(42,109,255,0.05));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.auth-icon-circle i {
    font-size: 2.2rem;
    color: var(--primary);
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header .sub {
    color: var(--text-muted);
    font-size: 1rem;
}

.auth-header .sub a {
    color: var(--primary);
    font-weight: 600;
}

.auth-header .sub a:hover {
    text-decoration: underline;
}

/* 标签切换 */
.auth-tabs {
    display: flex;
    background: var(--bg-elevated);
    border-radius: 20px;
    padding: 4px;
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 18px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    color: var(--text-muted);
}

.auth-tab.active {
    background: var(--primary);
    color: #fff;
}

/* 表单字段 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #CBD5E1;
    font-weight: 500;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.input-with-icon input {
    width: 100%;
    padding: 16px 18px 16px 46px;
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-dim);
    border-radius: 20px;
    color: #EFF3FC;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.input-with-icon input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42, 109, 255, 0.15);
}

.input-with-icon input::placeholder {
    color: #64748B;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}

.password-toggle:hover {
    color: var(--primary);
}

/* 记住我/忘记密码 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 24px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.5px solid var(--border-dim);
    background: var(--bg-elevated);
    cursor: pointer;
    appearance: none;
    position: relative;
}

.remember-me input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.remember-me input[type="checkbox"]:checked::after {
    content: "✓";
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-link {
    color: var(--primary);
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* 登录按钮 */
.btn-block {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 20px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    background: var(--primary);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-block:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 109, 255, 0.3);
}

/* 分割线 */
.auth-divider {
    text-align: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--border-dim);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* 第三方登录 */
.social-login {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s;
}

.social-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* 安全提示 */
.security-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(42, 109, 255, 0.08);
    border: 1px solid rgba(42, 109, 255, 0.2);
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 20px;
}

.security-note i {
    color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

/* 移动端 */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
    }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 24px 0;
        gap: 20px;
    }
    .menu-icon {
        display: block;
    }
    #menu-toggle:checked ~ .nav-links {
        display: flex;
    }
    .auth-card {
        padding: 36px 24px;
        border-radius: 24px;
    }
    .auth-header h1 {
        font-size: 1.6rem;
    }
}

@media (min-width: 769px) {
    .nav-links {
        display: flex !important;
    }
}
