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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    background: url('../images/login-bg.png') center/cover no-repeat fixed;
    overflow: hidden;
}

/* 图片背景加载失败时的纯色兜底 */
@supports not (background: url('../images/login-bg.png')) {
    body {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e3a5f 100%);
    }
}

.login-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    background: #3b82f6;
    animation: float 20s infinite ease-in-out;
}

.shape1 {
    width: 400px;
    height: 400px;
    top: 5%;
    left: 5%;
    animation-delay: 0s;
}

.shape2 {
    width: 280px;
    height: 280px;
    bottom: 10%;
    right: 5%;
    animation-delay: 5s;
    background: #8b5cf6;
}

.shape3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 60%;
    animation-delay: 10s;
    background: #06b6d4;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.login-box {
    position: relative;
    width: 420px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    padding: 40px;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 15px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 16px;
}

.login-header h1 {
    font-size: 22px;
    color: #0f172a;
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.subtitle {
    font-size: 14px;
    color: #64748b;
}

.login-tabs {
    display: flex;
    margin-bottom: 28px;
    border-bottom: 1px solid #e2e8f0;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    font-size: 14px;
    color: #94a3b8;
    transition: all 0.2s ease;
    position: relative;
    font-weight: 500;
}

.tab:hover {
    color: #3b82f6;
}

.tab.active {
    color: #3b82f6;
    font-weight: 600;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2.5px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px;
    color: #475569;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14.5px;
    transition: all 0.2s ease;
    background: #f8fafc;
    color: #0f172a;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.btn-login {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    letter-spacing: 2px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

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

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

.login-footer {
    margin-top: 28px;
    text-align: center;
}

.login-footer p {
    font-size: 12px;
    color: #94a3b8;
}

/* 弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    min-width: 320px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

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

.modal-icon {
    margin-bottom: 20px;
}

.modal-icon.error svg circle,
.modal-icon.error svg line {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.modal-message {
    font-size: 16px;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-btn {
    padding: 10px 40px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

/* 响应式 */
@media (max-width: 480px) {
    .login-box {
        width: calc(100% - 40px);
        padding: 30px 25px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .bg-shape {
        opacity: 0.05;
    }
}
