/* ============================================================
   Neko Clond - 公共样式
   液态毛玻璃主题 · 与主页风格统一
   ============================================================ */

:root {
    --primary: #3b82f6;
    --primary-deep: #1d4ed8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 25%, #eff6ff 50%, #e0e7ff 75%, #f0f9ff 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #1e293b;
}

/* ---------- 液态背景层 ---------- */
.liquid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(ellipse at 20% 20%, rgba(219, 234, 254, 0.8) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(224, 231, 255, 0.8) 0%, transparent 50%),
                linear-gradient(135deg, #f0f9ff, #e0f2fe, #dbeafe);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    animation: liquidMove 25s infinite ease-in-out;
}

.blob-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.55) 0%, rgba(147, 197, 253, 0.25) 70%);
    top: -250px;
    right: -150px;
    animation-delay: 0s;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.45) 0%, rgba(196, 181, 253, 0.2) 70%);
    bottom: -200px;
    left: -150px;
    animation-delay: -8s;
}

.blob-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.45) 0%, rgba(125, 211, 252, 0.2) 70%);
    top: 40%;
    left: 45%;
    animation-delay: -16s;
}

@keyframes liquidMove {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); border-radius: 50%; }
    25% { transform: translate(60px, -40px) scale(1.12) rotate(5deg); border-radius: 45% 55% 60% 40%; }
    50% { transform: translate(-40px, 50px) scale(0.95) rotate(-5deg); border-radius: 55% 45% 40% 60%; }
    75% { transform: translate(30px, 60px) scale(1.08) rotate(3deg); border-radius: 40% 60% 55% 45%; }
}

/* ---------- 毛玻璃导航 ---------- */
.glass-nav {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

/* ---------- 毛玻璃卡片 ---------- */
.glass-card {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.06);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.1);
}

.glass-card-strong {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* ---------- 深蓝视觉卡片 ---------- */
.visual-card {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.92) 0%, rgba(37, 99, 235, 0.88) 50%, rgba(59, 130, 246, 0.85) 100%);
    position: relative;
    overflow: hidden;
}

.visual-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 55%),
                radial-gradient(circle at 70% 30%, rgba(147, 197, 253, 0.25) 0%, transparent 45%);
    animation: shimmer 12s infinite linear;
}

.visual-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.4;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---------- 按钮 ---------- */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* ---------- 入场动画 ---------- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ---------- 浮动 ---------- */
.float-element {
    animation: gentleFloat 7s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ---------- 文字渐变 ---------- */
.text-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- 粒子画布 ---------- */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ============================================================
   认证页面布局（登录 / 注册）
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.5rem 3rem;
}

.auth-grid {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .auth-grid {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 4rem;
        align-items: center;
    }
}

/* 品牌侧 */
.auth-brand {
    color: #fff;
    padding: 2.5rem;
    border-radius: 1.75rem;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand h2 {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.auth-brand .lead {
    color: rgba(219, 234, 254, 0.9);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 26rem;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1.1rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
}

.auth-feature svg {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: #93c5fd;
}

.auth-badge {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    float-element: true;
}

/* 表单侧 */
.auth-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 1.75rem;
    padding: 2.5rem;
    box-shadow: 0 18px 50px rgba(31, 38, 135, 0.1);
}

.auth-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.4rem;
}

.auth-card .sub {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

/* 第三方登录按钮 */
.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 0.85rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.65);
    color: #1e293b;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.oauth-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(31, 38, 135, 0.12);
}

.oauth-btn svg {
    width: 1.3rem;
    height: 1.3rem;
}

/* 第三方登录按钮 - 未开放（即将上线）禁用态 */
.oauth-btn.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    filter: grayscale(0.4);
    pointer-events: auto;
    transform: none !important;
    box-shadow: none !important;
}
.oauth-btn.disabled:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: none;
    box-shadow: none;
}
.soon-badge {
    margin-left: 0.45rem;
    font-size: 0.66rem;
    font-weight: 600;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.16);
    color: #4f46e5;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* 分隔线 */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.45), transparent);
}

/* 输入框 */
.auth-field {
    margin-bottom: 1.1rem;
}

.auth-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.45rem;
}

.auth-input {
    width: 100%;
    padding: 0.72rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    color: #1e293b;
    transition: all 0.2s ease;
    outline: none;
}

.auth-input::placeholder {
    color: #94a3b8;
}

.auth-input:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.auth-input.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.input-wrap {
    position: relative;
}

.input-wrap .toggle-pwd {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
}

.input-wrap .toggle-pwd:hover {
    color: #475569;
}

/* 行内选项 */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.4rem;
    font-size: 0.9rem;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 1rem;
    height: 1rem;
    accent-color: #3b82f6;
    cursor: pointer;
}

.auth-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

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

/* 提交按钮 */
.auth-submit {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.85rem;
    border: none;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.25rem;
}

/* 错误提示 */
.auth-alert {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
    border-radius: 0.7rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #dc2626;
    font-size: 0.88rem;
    margin-bottom: 1.2rem;
}

.auth-alert.show {
    display: flex;
}

.auth-alert svg {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
}

/* 成功提示 */
.auth-success {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
    border-radius: 0.7rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #059669;
    font-size: 0.88rem;
    margin-bottom: 1.2rem;
}

.auth-success.show {
    display: flex;
}

/* 底部切换 */
.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.92rem;
    color: #64748b;
}

/* 加载 spinner */
.spinner {
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 1023px) {
    .auth-brand {
        display: none;
    }
}

@media (max-width: 768px) {
    .blob { filter: blur(70px); }
    .blob-1 { width: 350px; height: 350px; }
    .blob-2 { width: 300px; height: 300px; }
    .blob-3 { width: 250px; height: 250px; }
    .auth-card { padding: 1.75rem; }
    .auth-main { padding-top: 5rem; }
}
