* {
    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);
    cursor: pointer;
}

.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: 520px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
}

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

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

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

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

/* 验证码输入 */
.inline-code {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.inline-code .input-with-icon {
    flex: 1;
}

.inline-code button {
    padding: 0 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    font-family: inherit;
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.inline-code button:hover:not(:disabled) {
    background: rgba(42, 109, 255, 0.15);
}

/* 密码强度 */
.password-strength {
    margin-top: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    gap: 2px;
}

.strength-bar span {
    flex: 1;
    background: var(--border-dim);
    transition: background 0.3s ease;
}

.strength-bar[data-level="1"] span:nth-child(-n+1) { background: #F87171; }
.strength-bar[data-level="2"] span:nth-child(-n+2) { background: #FBBF24; }
.strength-bar[data-level="3"] span:nth-child(-n+3) { background: #FBBF24; }
.strength-bar[data-level="4"] span:nth-child(-n+4) { background: #6EE7B7; }
.strength-bar[data-level="5"] span:nth-child(-n+5) { background: #6EE7B7; }

.strength-text {
    color: var(--text-muted);
    min-width: 48px;
    text-align: right;
}

/* 条款协议 */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.terms-check 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;
    flex-shrink: 0;
    margin-top: 2px;
}

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

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

.terms-check a {
    color: var(--primary);
    font-weight: 600;
}

.terms-check a: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);
}

/* 立即获得福利徽章 */
.welcome-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(110, 231, 183, 0.08);
    border: 1px solid rgba(110, 231, 183, 0.25);
    border-radius: 20px;
    margin-bottom: 24px;
    font-size: 0.92rem;
    color: #CBD5E1;
}

.welcome-badge i {
    color: #6EE7B7;
    font-size: 1.1rem;
}

.welcome-badge strong {
    color: #6EE7B7;
    font-weight: 700;
}

/* 移动端 */
@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;
    }
}
