/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    background: #090a0f;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

/* 登录页面样式 - 全新设计 */
.container {
    width: 100%;
    height: 100%;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 星空背景 - 只在登录页面显示 */
.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* 纯色背景 - 更亮的深色 */
            background-color: #1a1d27;
    z-index: -1;
}

/* 移除星星效果 */
.login-page::after {
    content: '';
    display: none;
}

/* 流星容器 */
.login-page .meteor-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
    perspective: 1000px;
}

/* 流星样式 */
.meteor {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px 6px rgba(255, 255, 255, 1), 0 0 20px 12px rgba(60, 125, 248, 0.8);
    /* 初始位置在中心 */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* 流星动画 - 简化版，确保每个流星独立运动 */
@keyframes meteor-fly {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.1);
        box-shadow: 0 0 2px 1px rgba(255, 255, 255, 0.5);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--end-x)), calc(-50% + var(--end-y))) scale(var(--scale));
        box-shadow: 0 0 20px 10px rgba(255, 255, 255, 1), 0 0 30px 20px rgba(60, 125, 248, 1);
    }
}

/* 登录卡片 */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 60px 50px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.8s ease;
}

.login-card:hover::before {
    left: 100%;
}

.login-card:hover {
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35);
}

/* 登录标题 */
.login-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.login-title h1 {
    font-size: 48px;
    font-weight: 800;
    color: #1a237e;
    margin-bottom: 0;
    background: linear-gradient(135deg, rgb(60, 125, 248) 0%, rgb(40, 100, 220) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleSlideIn 0.8s ease-out;
}

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

.login-subtitle {
    font-size: 18px;
    color: #78909c;
    margin-top: 0;
    animation: subtitleFadeIn 0.8s ease-out 0.2s both;
}

@keyframes subtitleFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 登录表单 */
.login-form {
    width: 100%;
    animation: formFadeIn 0.8s ease-out 0.4s both;
}

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

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

/* 输入框容器 */
.input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-group:focus-within .input-container {
    background: white;
    border-color: rgb(60, 125, 248);
    box-shadow: 0 0 0 4px rgba(60, 125, 248, 0.1);
}

/* 输入框图标 */
.input-icon {
    position: absolute;
    left: 20px;
    color: #a0aec0;
    font-size: 22px;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 2;
}

.form-group:focus-within .input-icon {
    color: rgb(60, 125, 248);
    transform: scale(1.1);
}

/* 输入框 */
.form-group input {
    width: 100%;
    padding: 20px 20px 20px 60px;
    border: none;
    border-radius: 16px;
    font-size: 19px;
    font-weight: 500;
    color: #2d3748;
    background: transparent;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.form-group input:focus {
    outline: none;
    color: #1a202c;
}

.form-group input::placeholder {
    color: #a0aec0;
    transition: all 0.3s ease;
}

.form-group:focus-within input::placeholder {
    color: #cbd5e0;
    transform: translateX(4px);
}

.form-group input.error {
    color: #e53e3e;
}

.form-group input.error + .input-icon {
    color: #e53e3e;
}

/* 错误信息 - 悬浮窗样式 */
.form-group {
    position: relative;
}

.error-message {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: linear-gradient(135deg, rgb(60, 125, 248) 0%, rgb(40, 100, 220) 100%);
    color: white;
    font-size: 14px;
    line-height: 1.4;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(60, 125, 248, 0.35);
    white-space: nowrap;
    animation: errorSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 提示框箭头 */
.error-message::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent rgb(60, 125, 248) transparent;
}

@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.error-message.show {
    display: block;
}

/* 按钮容器 */
.buttons {
    margin-top: 50px;
}

/* 按钮样式 */
.btn {
    padding: 20px 32px;
    border: none;
    border-radius: 16px;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    text-decoration: none;
    display: inline-block;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

/* 主按钮 - 全新设计 */
.btn-primary {
    background: linear-gradient(135deg, rgb(60, 125, 248) 0%, rgb(40, 100, 220) 100%);
    color: white;
    position: relative;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.6s, height 0.6s, top 0.6s, left 0.6s;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(60, 125, 248, 0.4);
    background: linear-gradient(135deg, rgb(40, 100, 220) 0%, rgb(30, 80, 180) 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

/* 按钮加载效果 */
.btn-primary.loading {
    pointer-events: none;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 页脚 */
.login-footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    z-index: 10;
    animation: footerFadeIn 0.8s ease-out 0.6s both;
}

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

.login-footer p {
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-card {
        padding: 40px 30px;
        margin: 0 20px;
    }
    
    .login-title h1 {
        font-size: 32px;
    }
    
    .login-subtitle {
        font-size: 16px;
    }
    
    .form-group input {
        padding: 16px 16px 16px 52px;
        font-size: 16px;
    }
    
    .btn {
        padding: 16px 24px;
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .login-title h1 {
        font-size: 28px;
    }
    
    .login-subtitle {
        font-size: 14px;
    }
    
    .form-group {
        margin-bottom: 24px;
    }
    
    .buttons {
        margin-top: 40px;
    }
}