/* 加载自定义字体 - 汤显宾宋 */
@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;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 流动背景容器 */
.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: 500px;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 找回密码卡片 */
.forgot-password-card {
    background: white;
    border-radius: 20px;
    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);
    }
}

/* 卡片头部 */
.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h1 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
}

.card-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.card-header .icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

/* 表单样式 */
.forgot-password-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    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: #999;
}

.form-group.has-error input {
    border-color: var(--primary-color);
}

.form-group.has-error .error-message {
    display: block;
}

.error-message {
    display: none;
    color: var(--primary-color);
    font-size: 12px;
    margin-top: 5px;
}

/* 验证码输入组 */
.verification-group {
    display: flex;
    gap: 10px;
}

.verification-group input[type="text"] {
    flex: 1;
}

.send-code-btn {
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 140px;
}

.send-code-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 36, 66, 0.3);
}

.send-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 提交按钮 */
.submit-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;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(255, 36, 66, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 36, 66, 0.3);
    background: linear-gradient(135deg, #e02038 0%, #ff5555 100%);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 返回链接 */
.back-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 成功消息 */
.success-message {
    background: #4caf50;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .flow-left,
    .flow-right {
        width: 50%;
        opacity: 0.5;
    }

    .main-container {
        margin: 20px auto;
        padding: 0 16px;
    }

    .forgot-password-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .flow-left,
    .flow-right {
        display: none;
    }

    .forgot-password-card {
        padding: 24px 20px;
    }

    .card-header h1 {
        font-size: 24px;
    }

    .verification-group {
        flex-direction: column;
    }

    .send-code-btn {
        width: 100%;
    }
}
