/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-color: #333;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 100vh;
    background: var(--bg-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 登录容器 */
.login-container {
    width: 100%;
    max-width: 900px;
    height: 550px;
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    display: flex;
    overflow: hidden;
}

/* 左栏：小人和装饰 */
.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

/* 可爱的小人 */
.character {
    width: 180px;
    height: 220px;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* 身体 */
.body {
    width: 100%;
    height: 100%;
    position: relative;
}

/* 头部 */
.head {
    width: 120px;
    height: 110px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 60px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.1);
}

/* 眼睛容器 */
.eyes {
    display: flex;
    gap: 25px;
    margin-top: 15px;
}

.eye {
    width: 35px;
    height: 35px;
    background: white;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.eye.left {
    transform-origin: center 25px;
}

.eye.right {
    transform-origin: center 25px;
}

/* 瞳孔 */
.pupil {
    position: absolute;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 瞳孔高光 */
.pupil::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    top: 4px;
    left: 4px;
}

/* 嘴巴 */
.mouth {
    width: 30px;
    height: 15px;
    border-bottom: 3px solid #6366f1;
    border-radius: 0 0 30px 30px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

/* 脸颊 */
.cheeks {
    position: absolute;
    bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.cheek {
    width: 25px;
    height: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: 50%;
}

/* 手臂 */
.arms {
    position: absolute;
    width: 100%;
    top: 70px;
}

.arm {
    position: absolute;
    width: 20px;
    height: 60px;
    background: linear-gradient(135deg, #e4e8ec 0%, #f5f7fa 100%);
    border-radius: 10px;
    transform-origin: top center;
    transition: all 0.3s ease;
}

.arm.left {
    left: 25px;
    transform: rotate(15deg);
}

.arm.right {
    right: 25px;
    transform: rotate(-15deg);
}

.arm.waving {
    animation: wave 0.8s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(-15deg); }
    50% { transform: rotate(45deg); }
}

/* 腿 */
.legs {
    position: absolute;
    width: 100%;
    bottom: 15px;
    display: flex;
    justify-content: space-around;
}

.leg {
    width: 24px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 12px;
}

/* 右栏：登录表单 */
.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #ffffff;
}

.login-form {
    width: 100%;
    max-width: 320px;
}

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

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

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: var(--transition);
    outline: none;
}

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

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--primary-hover);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

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

/* 面板标题 */
.panel-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    text-align: center;
}

.panel-subtitle {
    font-size: 15px;
    color: #666;
    text-align: center;
}

/* 当密码框获得焦点时，小人转过去 */
.password-focused .eye.left {
    transform: rotate(-25deg);
}

.password-focused .eye.right {
    transform: rotate(25deg);
}

.password-focused .mouth {
    width: 35px;
    border-radius: 50%;
    height: 20px;
    border-color: #8b5cf6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        height: auto;
        max-width: 400px;
    }

    .left-panel {
        padding: 30px 20px;
    }

    .right-panel {
        padding: 30px 20px;
    }

    .character {
        width: 140px;
        height: 170px;
    }

    .head {
        width: 95px;
        height: 90px;
        border-radius: 48px;
    }

    .eyes {
        gap: 18px;
    }

    .eye {
        width: 28px;
        height: 28px;
    }

    .pupil {
        width: 14px;
        height: 14px;
    }

    .arm {
        width: 16px;
        height: 48px;
    }

    .leg {
        width: 20px;
        height: 48px;
    }
}

/* 添加入口点点击时的动画效果 */
.login-container::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.login-container.expanding::before {
    opacity: 1;
    animation: expand 0.6s ease-out forwards;
}

@keyframes expand {
    0% { transform: translate(-50%, -50%) scale(0); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
