/* ================================================================
   启点创作台 — 登录页 Premium Design
   布局：左侧品牌展示区 + 右侧表单区
   ================================================================ */

/* ===== CSS Variables ===== */
:root {
    --bg-dark: #060810;
    --bg-panel: rgba(12, 14, 26, 0.92);
    --bg-form: rgba(15, 17, 32, 0.95);
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-input-focus: rgba(255, 255, 255, 0.06);

    --text-primary: #eaeaf8;
    --text-secondary: #9498b8;
    --text-muted: #5a5e7a;
    --text-placeholder: #444864;

    --accent-1: #6366f1;
    --accent-2: #8b5cf6;
    --accent-3: #ec4899;
    --accent-glow: rgba(139, 92, 246, 0.35);
    --accent-glow-soft: rgba(139, 92, 246, 0.12);

    --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #ec4899 100%);
    --gradient-brand-text: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #f9a8d4 100%);

    --border-subtle: rgba(99, 102, 241, 0.1);
    --border-normal: rgba(99, 102, 241, 0.18);
    --border-glow: rgba(139, 92, 246, 0.4);

    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 48px rgba(139, 92, 246, 0.2);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-dark: #eef0f8;
    --bg-panel: rgba(240, 242, 255, 0.95);
    --bg-form: rgba(255, 255, 255, 0.98);
    --bg-input: rgba(99, 102, 241, 0.04);
    --bg-input-focus: rgba(99, 102, 241, 0.07);
    --text-primary: #1a1b2e;
    --text-secondary: #4a4d70;
    --text-muted: #8a8daa;
    --text-placeholder: #b0b3cc;
    --border-subtle: rgba(99, 102, 241, 0.1);
    --border-normal: rgba(99, 102, 241, 0.2);
    --border-glow: rgba(99, 102, 241, 0.35);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 48px rgba(99, 102, 241, 0.12);
    --accent-glow: rgba(99, 102, 241, 0.25);
    --accent-glow-soft: rgba(99, 102, 241, 0.08);
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    font-size: 16px;
    height: 100%;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei UI', system-ui, sans-serif;
    background: var(--bg-dark);
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    color: var(--text-primary);
    transition: background-color 0.4s ease;
}

/* ===== 动态光晕背景 ===== */
.bg-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: orb-float 12s ease-in-out infinite alternate;
}

.orb-1 {
    width: 500px; height: 500px;
    left: -100px; top: -100px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
    animation-delay: 0s;
}

.orb-2 {
    width: 600px; height: 600px;
    right: -150px; bottom: -100px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    animation-delay: -4s;
}

.orb-3 {
    width: 400px; height: 400px;
    left: 35%; top: 30%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, transparent 70%);
    animation-delay: -8s;
}

[data-theme="light"] .orb { opacity: 0.3; }

@keyframes orb-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 20px) scale(1.08); }
}

/* ===== Canvas 背景（脱离文档流） ===== */
#bgCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ===== 页面布局 ===== */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 480px;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* 登录页退场动画 */
.page-layout.exiting {
    animation: page-exit 0.5s ease-in forwards;
    pointer-events: none;
}

@keyframes page-exit {
    from { opacity: 1; filter: blur(0); transform: scale(1); }
    to   { opacity: 0; filter: blur(6px); transform: scale(1.03); }
}

/* ===== 左侧品牌区 ===== */
.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 80px;
    gap: 16px;
    overflow: hidden;
}

/* ===== 大型抽象几何装饰 ===== */
.brand-hero-art {
    position: relative;
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    animation: hero-float 8s ease-in-out infinite;
    opacity: 0.55;
}

[data-theme="light"] .brand-hero-art { opacity: 0.3; }

@keyframes hero-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33%  { transform: translateY(-8px) rotate(2deg); }
    66%  { transform: translateY(4px) rotate(-1deg); }
}

.hero-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(139, 92, 246, 0.18);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.hero-ring-1 {
    width: 190px; height: 190px;
    border-color: rgba(99, 102, 241, 0.12);
    box-shadow: inset 0 0 60px rgba(99, 102, 241, 0.04);
}

.hero-ring-2 {
    width: 130px; height: 130px;
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: inset 0 0 40px rgba(139, 92, 246, 0.06);
    animation: ring-breathe 4s ease-in-out infinite;
}

.hero-ring-3 {
    width: 72px; height: 72px;
    border: 2px solid rgba(236, 72, 153, 0.18);
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.08),
                inset 0 0 20px rgba(236, 72, 153, 0.04);
    animation: ring-breathe 4s ease-in-out 0.8s infinite;
}

@keyframes ring-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50%  { transform: translate(-50%, -50%) scale(1.06); opacity: 0.75; }
}

/* 轨道上的装饰点 */
.hero-dot {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 12px var(--accent-glow);
    animation: dot-orbit 6s linear infinite;
}

.hero-dot-1 {
    top: 50%; left: 50%;
    animation: dot-orbit-1 5s linear infinite;
}

.hero-dot-2 {
    top: 50%; left: 50%;
    animation: dot-orbit-2 7s linear infinite;
}

.hero-dot-3 {
    top: 50%; left: 50%;
    width: 4px; height: 4px;
    background: var(--accent-3);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.35);
    animation: dot-orbit-3 6s linear infinite;
}

@keyframes dot-orbit-1 {
    0%   { transform: translate(-50%, -50%) rotate(0deg) translateX(65px) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg) translateX(65px) rotate(-360deg); }
}

@keyframes dot-orbit-2 {
    0%   { transform: translate(-50%, -50%) rotate(120deg) translateX(95px) rotate(-120deg); }
    100% { transform: translate(-50%, -50%) rotate(480deg) translateX(95px) rotate(-480deg); }
}

@keyframes dot-orbit-3 {
    0%   { transform: translate(-50%, -50%) rotate(240deg) translateX(55px) rotate(-240deg); }
    100% { transform: translate(-50%, -50%) rotate(600deg) translateX(55px) rotate(-600deg); }
}

/* 中心十字星 */
.hero-cross {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 32px; height: 32px;
    animation: cross-pulse 3s ease-in-out infinite;
}

.hero-cross::before,
.hero-cross::after {
    content: '';
    position: absolute;
    background: var(--gradient-brand);
    border-radius: 2px;
}

.hero-cross::before {
    width: 100%; height: 2px;
    top: 50%; left: 0;
    transform: translateY(-50%);
}

.hero-cross::after {
    width: 2px; height: 100%;
    left: 50%; top: 0;
    transform: translateX(-50%);
}

@keyframes cross-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 0.8; }
    50%  { transform: translate(-50%, -50%) scale(1.3) rotate(45deg); opacity: 1; }
}

/* 顶部装饰带 */
.brand-top-accent {
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0.6;
    animation: brand-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.accent-line {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
    box-shadow: 0 0 6px var(--accent-glow);
}

.accent-tagline {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 3px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

[data-theme="light"] .accent-tagline { color: #6d6f94; }

.brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.06) 0%,
        rgba(139, 92, 246, 0.04) 50%,
        transparent 100%);
    pointer-events: none;
}

/* 右侧分割线 */
.brand-panel::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 0;
    width: 1px;
    height: 80%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(139, 92, 246, 0.3) 20%,
        rgba(236, 72, 153, 0.2) 60%,
        transparent 100%);
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
    animation: brand-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes brand-in {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--accent-glow-soft);
    border: 1px solid var(--border-normal);
    border-radius: 40px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-2);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.brand-badge::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--gradient-brand);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-glow);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 6px var(--accent-glow); transform: scale(1); }
    50% { box-shadow: 0 0 14px var(--accent-glow); transform: scale(1.2); }
}

.brand-logo {
    font-size: clamp(52px, 6vw, 84px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 6px;
    background: var(--gradient-brand-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.3));
}

.brand-desc {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 32px;
    font-weight: 400;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 36px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--text-secondary);
    animation: feature-in 0.6s ease both;
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.3s; }
.feature-item:nth-child(3) { animation-delay: 0.4s; }
.feature-item:nth-child(4) { animation-delay: 0.5s; }

@keyframes feature-in {
    from { opacity: 0; transform: translateX(-15px); }
    to { opacity: 1; transform: translateX(0); }
}

.feature-icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: var(--accent-glow-soft);
    border: 1px solid var(--border-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--accent-2);
    flex-shrink: 0;
}

.brand-stats {
    display: flex;
    align-items: center;
    gap: 36px;
    padding: 28px 36px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-num {
    font-size: 28px;
    font-weight: 900;
    background: var(--gradient-brand-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border-subtle);
}

/* 品牌侧浮动粒子 */
.brand-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.bp {
    position: absolute;
    border-radius: 50%;
    animation: bp-float linear infinite;
    opacity: 0;
}

@keyframes bp-float {
    0% { opacity: 0; transform: translateY(0) scale(0.5); }
    15% { opacity: 0.7; }
    85% { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(-40px) scale(1.2); }
}

/* ===== 右侧表单区 ===== */
.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 44px;
    background: var(--bg-panel);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    position: relative;
    overflow-y: auto;
}

.form-card {
    width: 100%;
    max-width: 360px;
    animation: form-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes form-in {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 表单头部 */
.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-logo {
    font-size: 28px;
    background: var(--gradient-brand-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.5));
    animation: logo-glow 3s ease-in-out infinite;
    display: block;
}

@keyframes logo-glow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4)); }
    50% { filter: drop-shadow(0 0 20px rgba(236, 72, 153, 0.5)); }
}

.form-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 1px;
    transition: var(--transition);
}

.form-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition);
}

/* Tab 切换 */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    background: rgba(99, 102, 241, 0.06);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-subtle);
}

.tab {
    flex: 1;
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.tab:hover { color: var(--text-secondary); }

.tab.active {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

/* 表单容器 */
.form-container {
    display: none;
}

.form-container.active {
    display: block;
    animation: form-slide 0.3s ease-out;
}

@keyframes form-slide {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 表单组 */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.label-icon {
    color: var(--accent-2);
    font-size: 10px;
}

.input-wrapper {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input::placeholder {
    color: var(--text-placeholder);
}

.form-group input:focus {
    border-color: var(--accent-2);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px var(--accent-glow-soft),
                0 0 20px rgba(139, 92, 246, 0.1);
}

/* 主按钮 */
.form-actions {
    margin-top: 24px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--gradient-brand);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 36px var(--accent-glow);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.btn-primary:hover .btn-shine {
    left: 150%;
}

/* 忘记密码 */
.forgot-link {
    text-align: center;
    margin-top: 16px;
}

.forgot-link a {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
    letter-spacing: 0.3px;
}

.forgot-link a:hover {
    color: var(--accent-2);
}

/* 重置密码头部 */
.form-header-inline {
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.back-link:hover { color: var(--accent-2); }

.reset-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 消息提示 */
.error-message {
    margin-top: 14px;
    padding: 12px 16px;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: var(--radius-sm);
    color: #f87171;
    font-size: 13px;
    display: none;
    line-height: 1.6;
}

.error-message.show {
    display: block;
    animation: form-slide 0.25s ease-out;
}

.success-message {
    margin-top: 14px;
    padding: 12px 16px;
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: var(--radius-sm);
    color: #34d399;
    font-size: 13px;
    display: none;
    line-height: 1.6;
}

.success-message.show {
    display: block;
    animation: form-slide 0.25s ease-out;
}

/* 表单底部 */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-muted);
}

.footer-brand {
    font-weight: 700;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== 浮动主题按钮 ===== */
.theme-float-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-normal);
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 16px var(--accent-glow-soft);
    transition: var(--transition);
    padding: 0;
}

.theme-float-btn:hover {
    transform: scale(1.1);
    border-color: var(--accent-2);
    box-shadow: 0 4px 24px var(--accent-glow);
}

.theme-float-btn:active { transform: scale(0.93); }

.theme-float-icon {
    font-size: 22px;
    line-height: 1;
    pointer-events: none;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.4); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: 1fr 420px;
    }
    .brand-panel { padding: 48px 48px; }
    .brand-logo { font-size: 56px; }
}

@media (max-width: 768px) {
    .page-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    .brand-panel {
        padding: 40px 32px;
        min-height: 0;
    }
    .brand-panel::after { display: none; }
    .brand-logo { font-size: 44px; }
    .brand-stats { gap: 20px; padding: 18px 24px; }
    .brand-features { display: none; }
    .form-panel {
        padding: 32px 24px;
        overflow-y: auto;
    }
    body { overflow: auto; }
}

@media (max-width: 480px) {
    .brand-panel { padding: 32px 24px; }
    .form-panel { padding: 24px 20px; }
    .brand-logo { font-size: 36px; }
    .brand-stats { flex-direction: column; gap: 12px; }
    .stat-divider { width: 60px; height: 1px; }
}
