/* 加载自定义字体 - 汤显宾宋 */
@font-face {
    font-family: 'TangXianBinSong';
    src: url('../assets/fonts/TangXianBinSong-2.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #ff2442;
    --primary-hover: #e02038;
    --text-primary: #333;
    --text-secondary: #666;
    --bg-gradient-start: #f8f8f8;
    --bg-gradient-end: #ff2442;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
}

body {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 50%, #ffd4d4 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* 流动背景容器 */
.flow-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* 左侧流动区域 */
.flow-left {
    position: absolute;
    left: 0;
    top: 0;
    width: 35%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 36, 66, 0.05) 0%, transparent 100%);
    animation: flow-left 8s ease-in-out infinite;
}

/* 右侧流动区域 */
.flow-right {
    position: absolute;
    right: 0;
    top: 0;
    width: 35%;
    height: 100%;
    background: linear-gradient(-90deg, rgba(255, 107, 107, 0.05) 0%, transparent 100%);
    animation: flow-right 8s ease-in-out infinite;
}

@keyframes flow-left {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(20px) translateY(10px);
    }
    50% {
        transform: translateX(-10px) translateY(20px);
    }
    75% {
        transform: translateX(10px) translateY(-10px);
    }
}

@keyframes flow-right {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-20px) translateY(-10px);
    }
    50% {
        transform: translateX(10px) translateY(-20px);
    }
    75% {
        transform: translateX(-10px) translateY(10px);
    }
}

/* 液态毛玻璃效果 */
.glass-panel {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

.glass-panel:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 60px rgba(255, 36, 66, 0.15);
    background: rgba(255, 255, 255, 0.9);
}

/* 符号和文字容器 */
.symbol-container {
    position: absolute;
    font-size: 24px;
    color: rgba(255, 36, 66, 0.4);
    transition: all 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
    filter: blur(1.5px);
    user-select: none;
    z-index: 5;
}

.symbol-container:hover {
    filter: blur(0) !important;
    color: rgba(255, 36, 66, 1) !important;
    transform: scale(1.4) !important;
    text-shadow: 0 0 30px rgba(255, 36, 66, 0.6);
    z-index: 10 !important;
}

/* 诗句样式 */
.poetry-line {
    font-family: 'TangXianBinSong', 'Georgia', 'Times New Roman', serif;
    font-size: 34px;
    color: rgba(255, 36, 66, 0.35);
    white-space: nowrap;
    filter: blur(1.8px);
    transition: all 0.3s ease;
    z-index: 5;
}

.poetry-line:hover {
    filter: blur(0) !important;
    color: rgba(255, 36, 66, 0.9) !important;
    transform: scale(1.2) !important;
    text-shadow: 0 0 25px rgba(255, 36, 66, 0.5);
    z-index: 10 !important;
}

/* 主容器 */
.main-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    margin: 40px auto;
    padding: 0 20px;
}

/* 登录卡片 */
.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(255, 36, 66, 0.1);
    padding: 40px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 标题区域 */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 表单样式 */
.login-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 36, 66, 0.1);
}

.form-group input::placeholder {
    color: #ccc;
}

/* 验证码容器 */
.captcha-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-container input {
    flex: 1;
}

.captcha-image {
    width: 120px;
    height: 40px;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.captcha-image:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(255, 36, 66, 0.15);
}

.captcha-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    text-align: center;
    opacity: 0.8;
}

/* Remember Me 和 忘记密码 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.remember-me label {
    cursor: pointer;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff2442 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 36, 66, 0.2);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 36, 66, 0.3);
    background: linear-gradient(135deg, #e02038 0%, #ff5555 100%);
}

.login-btn:active {
    transform: translateY(0);
}

/* 分割线 */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #ccc;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e8e8;
}

.divider span {
    padding: 0 16px;
}

/* 注册链接 */
.register-section {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.register-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-section a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 错误提示 */
.error-message {
    color: var(--primary-color);
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.form-group.has-error input {
    border-color: var(--primary-color);
}

.form-group.has-error .error-message {
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .flow-left,
    .flow-right {
        width: 50%;
        opacity: 0.5;
    }

    .main-container {
        margin: 20px auto;
        padding: 0 16px;
    }

    .login-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .flow-left,
    .flow-right {
        display: none;
    }

    .login-card {
        padding: 24px 20px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    /* 验证码移动端优化 */
    .captcha-container {
        flex-direction: column;
        gap: 8px;
    }

    .captcha-container input {
        width: 100%;
    }

    .captcha-image {
        width: 100%;
        max-width: 120px;
        margin: 0 auto;
        display: block;
    }
}
