/* ============================================ */
/*              登录页面 - 美化样式                */
/* ============================================ */

:root {
    --primary-color: #4080ff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 背景装饰 */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 50%);
    border-radius: 50%;
    animation: float1 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.25) 0%, transparent 55%);
    border-radius: 50%;
    animation: float2 25s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(-20px) translateY(20px);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(20px) translateY(-20px);
    }
}

/* 背景网格 */
#app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
}

/* 动态光晕效果 */
.login-container::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
    border-radius: calc(var(--radius-lg) + 2px);
    z-index: -1;
    opacity: 0.5;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        opacity: 0.3;
        filter: blur(10px);
    }
    to {
        opacity: 0.6;
        filter: blur(15px);
    }
}

#app {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.login-container {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px 40px;
    animation: fadeInUp 0.4s ease;
    position: relative;
}

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

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.login-container h1 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 36px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-container h1::before,
.login-container h1::after {
    content: '';
    width: 24px;
    height: 3px;
    background: var(--bg-gradient);
    border-radius: 2px;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafbfc;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 128, 255, 0.1);
    background: #fff;
}

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

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 36px;
}

.form-actions button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-actions button:first-child {
    background: var(--bg-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.form-actions button:first-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-home {
    background: var(--secondary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(108, 117, 141, 0.3);
}

.btn-home:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 141, 0.4);
}

.message {
    margin-top: 24px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 14px;
    animation: slideIn 0.3s ease;
}

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

.message.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message.success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* 验证码样式 */
.captcha-group {
    margin-bottom: 24px;
}

.captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-row input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafbfc;
    letter-spacing: 4px;
}

.captcha-row input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 128, 255, 0.1);
    background: #fff;
}

.captcha-img {
    width: 100px;
    height: 44px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.captcha-img:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.security-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    color: #718096;
    font-size: 13px;
    border: 1px solid #e2e8f0;
}

.lock-icon {
    font-size: 18px;
    color: var(--primary-color);
}

/* 响应式设计 - 平板设备 (最大宽度 768px) */
@media screen and (max-width: 768px) {
    #app {
        padding: 15px;
    }
    
    .login-container {
        padding: 36px 24px;
    }
    
    .login-container h1 {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .form-group input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .form-actions {
        gap: 10px;
        margin-top: 30px;
    }
    
    .form-actions button {
        padding: 12px;
        font-size: 14px;
    }
}

/* 响应式设计 - 手机设备 (最大宽度 480px) */
@media screen and (max-width: 480px) {
    #app {
        padding: 10px;
    }
    
    .login-container {
        padding: 28px 20px;
        border-radius: var(--radius-md);
    }
    
    .login-container h1 {
        font-size: 22px;
        margin-bottom: 24px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .form-group input {
        padding: 12px;
        font-size: 14px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 24px;
    }
    
    .form-actions button {
        padding: 12px;
        font-size: 14px;
    }
    
    .security-info {
        padding: 12px;
        font-size: 12px;
    }
    
    .message {
        padding: 12px;
        font-size: 13px;
    }
}

/* 响应式设计 - 小屏手机 (最大宽度 360px) */
@media screen and (max-width: 360px) {
    #app {
        padding: 5px;
    }
    
    .login-container {
        padding: 20px 15px;
    }
    
    .login-container h1 {
        font-size: 20px;
    }
}