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

body {
    font-family: "微软雅黑", "Microsoft YaHei", "微软幼圆", "YouYuan", monospace;
    overflow-x: hidden;
    position: relative;
    background: radial-gradient(ellipse at bottom, #0d1d31 0%, #0c0d13 100%);
    min-height: 100vh;
}

/* ========== 星空粒子背景 ========== */
#starsCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
}

/* ========== 主容器 ========== */
.home-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 30px 20px;
}

/* ========== 登录注册卡片 ========== */
.auth-card {
    background: rgba(20, 30, 45, 0.75);
    backdrop-filter: blur(16px);
    border-radius: 48px;
    padding: 2rem 2rem 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 255, 255, 0.2);
    transition: transform 0.3s;
}

.site-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.site-header h1 {
    font-size: 1.9rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #aaffff, #66ccff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: glowPulse 2s ease-in-out infinite;
}

.site-url {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 8px;
    color: #ccf4ff;
}

@keyframes glowPulse {
    0% { text-shadow: 0 0 5px #00aaff, 0 0 10px #0066cc; opacity: 0.8; }
    50% { text-shadow: 0 0 20px #33ccff, 0 0 30px #0099ff; opacity: 1; }
    100% { text-shadow: 0 0 5px #00aaff, 0 0 10px #0066cc; opacity: 0.8; }
}

.tab-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    font-weight: bold;
    color: #aab4cf;
    cursor: pointer;
    padding: 6px 18px;
    border-radius: 40px;
    transition: 0.2s;
    font-family: inherit;
}

.tab-btn.active {
    background: rgba(0, 180, 255, 0.3);
    color: #b5ffff;
    box-shadow: 0 0 8px cyan;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 18px;
}

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

.auth-form input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #2c5f7a;
    padding: 12px 16px;
    border-radius: 60px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: 0.2s;
    font-family: inherit;
}

.auth-form input:focus {
    border-color: #2cc;
    box-shadow: 0 0 8px #0af;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 60px;
    padding: 4px 12px;
}

.captcha-row span {
    font-weight: bold;
    color: #ccf4ff;
    min-width: 80px;
    font-size: 1rem;
}

.captcha-row input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 0;
    color: white;
}

.captcha-refresh {
    background: none;
    border: none;
    color: cyan;
    font-size: 1.2rem;
    cursor: pointer;
    font-weight: bold;
    padding: 0 6px;
}

.btn-submit {
    background: linear-gradient(95deg, #1c6ea4, #0a2f44);
    border: none;
    padding: 12px;
    border-radius: 60px;
    font-weight: bold;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.btn-submit:hover {
    transform: scale(1.02);
    background: linear-gradient(95deg, #2389c2, #0e415f);
    box-shadow: 0 0 12px #0af;
}

.form-message {
    text-align: center;
    font-size: 0.85rem;
    color: #ffa76b;
    margin-top: 8px;
}

/* ========== 手机自适应 ========== */
@media (max-width: 640px) {
    .home-container {
        padding: 20px 15px;
    }
    .auth-card {
        max-width: 95%;
        padding: 1.5rem;
    }
    .site-header h1 {
        font-size: 1.5rem;
    }
    .tab-btn {
        font-size: 1.1rem;
        padding: 4px 14px;
    }
    .captcha-row {
        gap: 8px;
    }
    .captcha-row span {
        min-width: 70px;
        font-size: 0.9rem;
    }
}