/* ================================================================
   登录/注册页面样式
   ================================================================ */

/* ---------- CSS 变量（与主站一致） ---------- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0c0;
    --accent-cyan: #00d4ff;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --glow-cyan: rgba(0, 212, 255, 0.4);
    --glow-purple: rgba(168, 85, 247, 0.4);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.hidden {
    display: none !important;
}

/* ---------- 容器 ---------- */
.auth-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0f 70%);
}

/* ---------- 卡片 ---------- */
.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: rgba(18, 18, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- 头部 ---------- */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---------- 表单 ---------- */
.auth-form {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px var(--glow-cyan);
}

.form-group input::placeholder {
    color: rgba(160, 160, 192, 0.5);
}

/* ---------- 提交按钮 ---------- */
.btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--glow-purple);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ---------- 切换链接 ---------- */
.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* ---------- 错误提示 ---------- */
.auth-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: center;
    animation: shakeIn 0.4s ease;
}

@keyframes shakeIn {
    0% { opacity: 0; transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* ---------- 底部链接 ---------- */
.auth-footer {
    margin-top: 24px;
    text-align: center;
}

.auth-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-footer a:hover {
    color: var(--accent-cyan);
}

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
    .auth-card {
        margin: 16px;
        padding: 24px;
    }

    .auth-title {
        font-size: 1.6rem;
    }
}
