/**
 * 橘子GEO 登录页面样式 - 动态粒子背景 + Glassmorphism 玻璃拟态
 * 更新时间: 2026-04-14
 */

/* ==================== CSS 变量定义 ==================== */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --accent-primary: #3b82f6;
    --accent-secondary: #6366f1;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    --input-bg: rgba(255, 255, 255, 0.1);
    --input-border: rgba(255, 255, 255, 0.2);
    --input-focus: rgba(59, 130, 246, 0.5);
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ==================== 登录页面容器 ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}

/* 动态粒子画布 */
.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* 装饰光晕 */
.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 1;
}

.glow-1 {
    width: 700px;
    height: 700px;
    background: rgba(59, 130, 246, 0.2);
    top: -300px;
    right: -300px;
    animation: float 25s ease-in-out infinite;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: rgba(99, 102, 241, 0.15);
    bottom: -200px;
    left: -200px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, -40px) scale(1.1); }
    50% { transform: translate(-40px, 60px) scale(0.9); }
    75% { transform: translate(40px, 40px) scale(1.05); }
}

/* ==================== 主容器 ==================== */
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    animation: fadeIn 0.6s ease-out;
}

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

/* ==================== 品牌区域 ==================== */
.brand-area {
    text-align: center;
    animation: slideDown 0.8s ease-out;
}

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

.brand-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 6px;
    color: #fff;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.6));
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.4)); }
    50% { filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.8)); }
}

.brand-logo svg {
    width: 100%;
    height: 100%;
}

.brand-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 0;
    line-height: 1.2;
}

/* ==================== 登录卡片 - Glassmorphism 玻璃拟态 ==================== */
.login-card {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    animation: slideUp 0.8s ease-out 0.2s both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.card-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== 表单样式 ==================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    position: relative;
}

.verify-field {
    display: flex;
    gap: 12px;
}

/* 输入框容器 */
.input-box {
    position: relative;
    width: 100%;
}

.verify-box {
    flex: 1;
}

/* 输入框 - 玻璃拟态风格 */
.form-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* 浮动标签 - 简洁样式 */
.input-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--text-muted);
    pointer-events: none;
    transition: opacity 0.2s ease;
    background: transparent;
}

/* 输入框有内容或聚焦时，标签直接消失 */
.form-input:not(:placeholder-shown) ~ .input-label,
.form-input:focus ~ .input-label {
    opacity: 0;
}

/* 密码切换按钮 */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

/* 验证码图片 */
.verify-img {
    height: 52px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid var(--input-border);
    transition: all 0.3s ease;
    background: var(--input-bg);
}

.verify-img:hover {
    border-color: var(--accent-primary);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* ==================== 登录按钮 ==================== */
.submit-btn {
    width: 100%;
    height: 52px;
    margin-top: 8px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
}

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

.submit-btn:disabled,
.submit-btn.is-loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    display: inline-block;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-loading svg {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* ==================== 卡片底部 ==================== */
.card-footer {
    margin-top: 28px;
    text-align: center;
}

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

/* ==================== 响应式设计 ==================== */
@media (max-width: 480px) {
    .login-page {
        padding: 16px;
    }
    
    .login-wrapper {
        gap: 24px;
    }
    
    .brand-logo {
        width: 60px;
        height: 60px;
    }
    
    .brand-title {
        font-size: 26px;
    }
    
    .login-card {
        padding: 28px 20px;
        border-radius: 20px;
    }
    
    .card-header h2 {
        font-size: 20px;
    }
    
    .form-input {
        height: 48px;
    }
    
    .submit-btn {
        height: 48px;
    }
    
    .verify-field {
        flex-direction: column;
    }
    
    .verify-img {
        width: 100%;
        height: 48px;
        object-fit: contain;
    }
}

/* ==================== Layui 覆盖 ==================== */
.layui-form-item {
    margin-bottom: 0;
}

.layui-form-label {
    display: none;
}

/* ==================== 动画优化 ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== 输入框自动填充样式 ==================== */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.1) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* ==================== Layui 弹窗美化 - Glassmorphism 风格 ==================== */

/* 遮罩层 */
.layui-layer-shade {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px);
}

/* 弹窗容器 */
.layui-layer {
    background: transparent !important;
    box-shadow: none !important;
}

/* 弹窗内容区域 */
.layui-layer-msg,
.layui-layer-dialog {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 
                0 0 0 1px rgba(255, 255, 255, 0.05) inset !important;
    overflow: hidden !important;
}

/* 成功提示 */
.layui-layer-msg .layui-layer-content,
.layui-layer-dialog .layui-layer-content {
    padding: 20px 28px !important;
    font-size: 15px !important;
    color: var(--text-primary) !important;
}

/* 图标样式 - 隐藏所有图标 */
.layui-layer-msg .layui-layer-ico,
.layui-layer-dialog .layui-layer-ico,
.layui-layer-ico1,
.layui-layer-ico2,
.layui-layer-ico3,
.layui-layer-ico4,
.layui-layer-ico5,
.layui-layer-ico6,
.layui-layer-ico7,
.layui-layer-ico8,
.layui-layer-ico9,
.layui-layer-ico10,
.layui-layer-ico11,
.layui-layer-ico12,
.layui-layer-ico13,
.layui-layer-ico14,
.layui-layer-ico15,
.layui-layer-ico16,
body .layui-layer-msg .layui-layer-ico,
body .layui-layer-dialog .layui-layer-ico,
html body .layui-layer-msg .layui-layer-ico,
html body .layui-layer-dialog .layui-layer-ico {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* 弹窗按钮区域 */
.layui-layer-btn {
    padding: 0 20px 20px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px !important;
}

/* 按钮样式 */
.layui-layer-btn a {
    height: 40px !important;
    line-height: 40px !important;
    padding: 0 24px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    border: none !important;
    background: var(--glass-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--glass-border) !important;
}

/* 确认按钮 */
.layui-layer-btn .layui-layer-btn0 {
    background: var(--accent-gradient) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4) !important;
}

.layui-layer-btn .layui-layer-btn0:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5) !important;
}

/* 取消按钮 */
.layui-layer-btn .layui-layer-btn1 {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--glass-border) !important;
}

.layui-layer-btn .layui-layer-btn1:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

/* 弹窗标题 */
.layui-layer-title {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 16px 20px !important;
}

/* 关闭按钮 */
.layui-layer-setwin {
    top: 16px !important;
    right: 16px !important;
}

.layui-layer-setwin a {
    width: 20px !important;
    height: 20px !important;
    opacity: 0.6 !important;
    transition: opacity 0.3s ease !important;
}

.layui-layer-setwin a:hover {
    opacity: 1 !important;
}

/* 加载动画 */
.layui-layer-loading .layui-layer-content {
    background: transparent !important;
}

/* 提示框动画 */
.layui-layer-msg {
    animation: toastSlideIn 0.3s ease-out !important;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 对话框动画 */
.layui-layer-dialog {
    animation: dialogScaleIn 0.3s ease-out !important;
}

@keyframes dialogScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
