/* AI Hub 登录页面 - 现代暗黑科技风设计系统 */
:root {
    --bg-dark: #0a0e17;
    --card-bg: rgba(18, 24, 38, 0.75);
    --card-border: rgba(56, 189, 248, 0.2);
    --card-glow: rgba(56, 189, 248, 0.15);
    --primary-cyan: #06b6d4;
    --primary-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.8);
    --input-border: rgba(148, 163, 184, 0.2);
    --input-focus: #06b6d4;
    --error-red: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.15);
    --success-green: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    color: var(--text-main);
}

/* 背景光晕装饰 */
.background-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
    animation: floatGlow 12s infinite alternate ease-in-out;
}

.glow-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, rgba(59, 130, 246, 0.1) 70%, transparent 100%);
    top: -80px;
    left: -80px;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(6, 182, 212, 0.08) 70%, transparent 100%);
    bottom: -100px;
    right: -100px;
    animation-delay: -6s;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.1); }
}

/* 网格纹理底纹 */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    z-index: 1;
    pointer-events: none;
}

/* 登录卡片容器 */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 38px 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 30px var(--card-glow);
    transition: all 0.3s ease;
}

.login-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
}

/* 品牌头部 */
.brand-header {
    text-align: center;
    margin-bottom: 28px;
}

.brand-logo {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-cyan);
    font-size: 28px;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.pulse-ring {
    position: absolute;
    inset: -6px;
    border-radius: 20px;
    border: 2px solid rgba(6, 182, 212, 0.3);
    animation: pulseRing 3s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulseRing {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 0.2; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.brand-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffffff 30%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* 错误提示框 */
.alert-box {
    display: none;
    align-items: center;
    gap: 10px;
    background: var(--error-bg);
    border: 1px solid var(--error-red);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    animation: fadeIn 0.25s ease;
}

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

.alert-box.shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

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

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-control {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #64748b;
    font-size: 15px;
    transition: color 0.2s;
    pointer-events: none;
}

.input-control input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 12px 14px 12px 42px;
    font-size: 14px;
    color: var(--text-main);
    outline: none;
    transition: all 0.25s ease;
}

.input-control input:focus {
    border-color: var(--input-focus);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.input-control input:focus + .input-icon,
.input-control:focus-within .input-icon {
    color: var(--primary-cyan);
}

.toggle-password-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
    transition: color 0.2s;
}

.toggle-password-btn:hover {
    color: var(--text-main);
}

/* 记住我选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    user-select: none;
}

.remember-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-label input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 11px;
    color: transparent;
    transition: all 0.2s;
}

.remember-label input[type="checkbox"]:checked + .custom-checkbox {
    background: var(--primary-cyan);
    border-color: var(--primary-cyan);
    color: #ffffff;
}

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

/* 登录按钮 */
.login-btn {
    position: relative;
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
    transition: all 0.3s ease;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.55);
    background: linear-gradient(135deg, #0891b2, #2563eb);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.loading .btn-text,
.login-btn.loading .btn-icon {
    visibility: hidden;
    opacity: 0;
}

.spinner {
    display: none;
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.login-btn.loading .spinner {
    display: block;
}

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

/* 卡片页脚 */
.card-footer {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    justify-content: center;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success-green);
    box-shadow: 0 0 8px var(--success-green);
    display: inline-block;
}

/* 响应式适配 */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
}
