/* 登录页面 - 动画角色版 */
* {
    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;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* 左侧 - 角色动画区域 */
.login-left {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    padding: 48px;
    overflow: hidden;
}

.login-left-header {
    position: relative;
    z-index: 10;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    font-size: 18px;
}

.login-left-footer {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 32px;
}

.login-left-footer a {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.login-left-footer a:hover {
    color: rgba(255,255,255,0.9);
}

/* 装饰元素 */
.login-left-decor {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.decor-1 {
    top: 20%;
    right: 20%;
    width: 256px;
    height: 256px;
    background: rgba(255,255,255,0.08);
    filter: blur(60px);
}

.decor-2 {
    bottom: 20%;
    left: 20%;
    width: 384px;
    height: 384px;
    background: rgba(255,255,255,0.04);
    filter: blur(60px);
}

.login-left-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

/* 角色容器 */
.characters-wrapper {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    z-index: 5;
}

.characters-container {
    position: relative;
    width: 480px;
    height: 380px;
}

/* 角色基础样式 */
.character {
    position: absolute;
    bottom: 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom center;
}

/* 紫色角色 */
.character-purple {
    left: 60px;
    width: 160px;
    height: 360px;
    background: #6C3FF5;
    border-radius: 10px 10px 0 0;
    z-index: 1;
}

.char-eyes {
    position: absolute;
    display: flex;
    gap: 24px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.character-purple .char-eyes {
    left: 45px;
    top: 40px;
}

/* 眼球 */
.eyeball {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: height 0.15s ease;
}

.eyeball.blinking {
    height: 2px;
}

.pupil {
    width: 8px;
    height: 8px;
    background: #2D2D2D;
    border-radius: 50%;
    transition: transform 0.1s ease-out;
}

/* 纯瞳孔（无白色眼球） */
.pupil-only {
    width: 14px;
    height: 14px;
    background: #2D2D2D;
    border-radius: 50%;
    transition: transform 0.1s ease-out;
}

/* 黑色角色 */
.character-black {
    left: 200px;
    width: 110px;
    height: 280px;
    background: #2D2D2D;
    border-radius: 8px 8px 0 0;
    z-index: 2;
}

.character-black .char-eyes {
    left: 26px;
    top: 32px;
    gap: 18px;
}

.character-black .eyeball {
    width: 18px;
    height: 18px;
}

.character-black .pupil {
    width: 7px;
    height: 7px;
}

/* 橙色角色 */
.character-orange {
    left: 0;
    width: 210px;
    height: 180px;
    background: #FF9B6B;
    border-radius: 105px 105px 0 0;
    z-index: 3;
}

.character-orange .char-eyes {
    left: 72px;
    top: 80px;
    gap: 24px;
}

/* 黄色角色 */
.character-yellow {
    left: 270px;
    width: 130px;
    height: 210px;
    background: #E8D754;
    border-radius: 65px 65px 0 0;
    z-index: 4;
}

.character-yellow .char-eyes {
    left: 44px;
    top: 38px;
    gap: 18px;
}

.char-mouth {
    position: absolute;
    width: 72px;
    height: 4px;
    background: #2D2D2D;
    border-radius: 2px;
    left: 34px;
    top: 85px;
    transition: all 0.2s ease-out;
}

/* 角色状态动画 */
.character.typing-purple {
    transform: skewX(-12deg) translateX(30px);
    height: 400px;
}

.character.typing-black {
    transform: skewX(10deg) translateX(15px);
}

.character.typing-orange {
    transform: skewX(0deg);
}

.character.typing-yellow {
    transform: skewX(0deg);
}

.character.peeking-purple {
    transform: skewX(0deg);
}

.character.peeking-purple .char-eyes {
    left: 20px;
    top: 35px;
}

/* 右侧 - 登录表单 */
.login-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: #ffffff;
    min-height: 100vh;
}

.login-mobile-logo {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 48px;
}

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

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

.login-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: #111;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.login-header p {
    font-size: 14px;
    color: #888;
}

/* 提示消息 */
.login-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    animation: alertSlideIn 0.3s ease-out;
}

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

.login-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.login-alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-icon {
    font-size: 16px;
}

/* 标签切换 */
.login-tabs {
    display: flex;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
}

.login-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-tab.active {
    background: #ffffff;
    color: #111;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.login-tab:hover:not(.active) {
    color: #555;
}

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

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #bbb;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 44px;
    border: 1.5px solid #e5e5e5;
    border-radius: 10px;
    font-size: 14px;
    color: #111;
    background: #fff;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper input::placeholder {
    color: #c0c0c0;
}

.input-wrapper input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.input-wrapper input:focus ~ .input-icon,
.input-wrapper input:focus + .input-icon {
    color: #6366f1;
}

.input-wrapper:has(input:focus) .input-icon {
    color: #6366f1;
}

/* 密码显示切换 */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #bbb;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    color: #666;
}

.eye-icon {
    width: 18px;
    height: 18px;
}

/* 表单选项 */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
    cursor: pointer;
}

.forgot-link {
    font-size: 13px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #4f46e5;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    height: 48px;
    background: #111111;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.login-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.login-btn:active {
    transform: scale(0.98);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.6s linear infinite;
}

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

/* 底部文字 */
.login-footer-text {
    text-align: center;
    font-size: 13px;
    color: #999;
    margin-top: 32px;
}

.login-footer-text a {
    color: #111;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.login-footer-text a:hover {
    opacity: 0.7;
}

/* ===== 响应式 ===== */

/* 平板 */
@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
    }

    .login-left {
        display: none;
    }

    .login-mobile-logo {
        display: flex;
    }

    .login-right {
        padding: 32px;
    }
}

/* 手机端 */
@media (max-width: 768px) {
    .login-container {
        display: flex;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .login-right {
        padding: 32px 24px;
        min-height: 100vh;
        min-height: 100dvh;
        width: 100%;
    }

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

    .login-mobile-logo {
        margin-bottom: 32px;
    }

    .login-mobile-logo .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .login-mobile-logo .logo-text {
        font-size: 18px;
    }

    .login-header {
        margin-bottom: 28px;
    }

    .login-header h1 {
        font-size: 22px;
        letter-spacing: -0.02em;
    }

    .login-header p {
        font-size: 13px;
        margin-top: 6px;
    }

    .login-tabs {
        margin-bottom: 24px;
        padding: 3px;
        border-radius: 8px;
    }

    .login-tab {
        padding: 9px 12px;
        font-size: 13px;
        border-radius: 6px;
    }

    .login-form {
        gap: 16px;
    }

    .form-field label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .input-wrapper input {
        height: 46px;
        font-size: 15px;
        padding: 0 12px 0 42px;
        border-radius: 8px;
    }

    .input-icon {
        left: 12px;
        width: 16px;
        height: 16px;
    }

    .toggle-password {
        right: 10px;
    }

    .eye-icon {
        width: 16px;
        height: 16px;
    }

    .form-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .checkbox-label {
        font-size: 12px;
    }

    .forgot-link {
        font-size: 12px;
    }

    .login-btn {
        height: 46px;
        font-size: 14px;
        border-radius: 8px;
    }

    .login-footer-text {
        margin-top: 24px;
        font-size: 12px;
    }

    .login-alert {
        padding: 10px 14px;
        font-size: 12px;
        border-radius: 8px;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .login-right {
        padding: 20px 16px;
    }

    .login-mobile-logo {
        margin-bottom: 28px;
    }

    .login-header {
        margin-bottom: 24px;
    }

    .login-header h1 {
        font-size: 20px;
    }

    .login-form {
        gap: 14px;
    }

    .input-wrapper input {
        height: 44px;
        font-size: 14px;
    }

    .login-btn {
        height: 44px;
    }
}

/* 横屏 */
@media (max-height: 500px) and (orientation: landscape) {
    .login-right {
        padding: 12px 24px;
        justify-content: flex-start;
        padding-top: 20px;
    }

    .login-mobile-logo {
        margin-bottom: 12px;
    }

    .login-header {
        margin-bottom: 12px;
    }

    .login-header h1 {
        font-size: 18px;
    }

    .login-form {
        gap: 8px;
    }

    .form-field {
        margin-bottom: 0;
    }

    .form-field label {
        margin-bottom: 4px;
    }

    .input-wrapper input {
        height: 38px;
        font-size: 13px;
    }

    .login-btn {
        height: 38px;
        margin-top: 2px;
    }

    .form-options {
        margin-top: -4px;
    }

    .login-footer-text {
        margin-top: 12px;
    }
}
