/* ===== 首页专用样式 ===== */

/* 页面基础样式 */
.home-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: url('/static/img/backimage.avif') no-repeat center center / cover;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden; /* 防止滚动条 */
    transition: background-color 0.3s ease, color 0.3s ease;
}









/* 登录页面主体 */
.login-hero-section {
    height: calc(100vh - 2.5rem); /* 减去页脚高度 */
    background: transparent; /* 完全透明，不遮挡背景 */
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
    display: flex;
    align-items: center;
}





/* 网站标题 */
.site-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: slideInDown 1s ease-out;
}

.site-subtitle {
    font-size: 1.3rem;
    color: #6b7280;
    margin-bottom: 0;
    font-weight: 500;
    animation: slideInDown 1s ease-out 0.2s both;
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 右侧登录卡片 */
.login-card {
    background: rgba(255, 255, 255, 0.1); /* 半透明白色背景 */
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2); /* 半透明边框 */
    position: relative;
    z-index: 2;
    animation: slideInUp 1s ease-out 0.4s both;
    margin: auto;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff; /* 白色文字 */
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); /* 文字阴影确保可读性 */
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.8); /* 半透明白色 */
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #ffffff; /* 白色文字 */
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.input-group-text {
    background: rgba(255, 255, 255, 0.15); /* 增加背景透明度 */
    border: 1px solid rgba(255, 255, 255, 0.3); /* 增加边框透明度 */
    color: rgba(255, 255, 255, 0.8); /* 增加图标透明度 */
    backdrop-filter: blur(5px); /* 增加模糊效果 */
}

.form-control {
    background: rgba(255, 255, 255, 0.12); /* 增加背景透明度 */
    border: 1px solid rgba(255, 255, 255, 0.3); /* 增加边框透明度 */
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95); /* 增加文字透明度 */
    transition: all 0.3s ease;
    backdrop-filter: blur(5px); /* 增加模糊效果 */
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5); /* 增加占位符透明度 */
}

.form-control:focus {
    border-color: rgba(102, 126, 234, 0.8); /* 增加聚焦边框透明度 */
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25); /* 增加阴影透明度 */
    background: rgba(255, 255, 255, 0.18); /* 聚焦时更明显的背景 */
    color: rgba(255, 255, 255, 1); /* 聚焦时完全不透明的文字 */
}

/* 表单提示文字样式 */
.form-text {
    color: rgba(255, 255, 255, 0.7) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* 紫色文字样式 */
.text-purple {
    color: rgba(147, 51, 234, 0.9) !important; /* 紫色 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.text-success {
    color: rgba(34, 197, 94, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.text-danger {
    color: rgba(239, 68, 68, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* 密码提示文字样式 */
.password-hint {
    color: #ef4444 !important; /* 红色文字 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    font-size: 0.85rem;
}

.login-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    padding: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

.login-btn:disabled:hover {
    transform: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* 注册按钮样式 */
.register-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    padding: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

/* 表单切换样式 */
.form-switch-container {
    margin-top: 2rem;
}

.register-form {
    animation: fadeIn 0.3s ease-in-out;
}

.login-form {
    animation: fadeIn 0.3s ease-in-out;
}

.email-login-form {
    animation: fadeIn 0.3s ease-in-out;
}

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

.login-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

/* 去掉横线效果 */
.login-divider::before {
    display: none; /* 隐藏横线 */
}

.login-divider span {
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    padding: 0 1rem;
    color: #ef4444; /* 红色文字 */
    font-size: 0.9rem;
    font-weight: 500; /* 稍微加粗 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); /* 文字阴影 */
}

/* 浏览量统计 - 低调显示 */
.page-views-counter {
    position: fixed;
    bottom: 3.5rem; /* 调整位置，避免与页脚重叠 */
    right: 20px;
    background: transparent; /* 去掉背景色 */
    border: none; /* 去掉边框 */
    border-radius: 12px;
    padding: 0.5rem 0.75rem; /* 减小内边距 */
    z-index: 1000;
    font-size: 0.75rem; /* 更小的字体 */
    color: rgba(255, 255, 255, 0.6); /* 半透明白色，更不显眼 */
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); /* 文字阴影确保可读性 */
}

.page-views-counter:hover {
    color: rgba(255, 255, 255, 0.9); /* 悬停时稍微明显一些 */
    transform: translateY(-1px); /* 减小悬停效果 */
}

.page-views-counter i {
    margin-right: 0.4rem;
    color: rgba(255, 255, 255, 0.5); /* 图标也用半透明白色 */
    font-size: 0.7rem; /* 更小的图标 */
}

.page-views-number {
    font-weight: 500; /* 减轻字重 */
    color: rgba(255, 255, 255, 0.7); /* 半透明白色 */
}

/* 正版阅读提醒页脚 */
.copyright-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    border-top: none;
    padding: 0.5rem 1rem;
    text-align: center;
    z-index: 999;

    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copyright-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #ffffff; /* 改为白色文字 */
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); /* 添加文字阴影确保可读性 */
}

.copyright-footer p::before {
    margin-right: 0.25rem;
}

/* ===== 移动端样式 ===== */
@media (max-width: 768px) {
    /* 移动端使用白色背景 */
    .home-page {
        background: #ffffff !important;
        color: #333333;
    }



    /* 调整登录卡片样式 */
    .login-card {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: none !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        padding: 2rem !important;
    }

    /* 调整标题颜色 */
    .site-title {
        color: #1f2937 !important;
        text-shadow: none !important;
    }

    .site-subtitle {
        color: #6b7280 !important;
    }

    /* 调整登录标题颜色 */
    .login-title {
        color: #1f2937 !important;
        text-shadow: none !important;
    }

    /* 调整表单标签颜色 */
    .form-label {
        color: #374151 !important;
        text-shadow: none !important;
    }

    /* 调整输入框样式 */
    .input-group-text {
        background: #f9fafb !important;
        border: 1px solid #d1d5db !important;
        color: #6b7280 !important;
        backdrop-filter: none !important;
    }

    .form-control {
        background: #ffffff !important;
        border: 1px solid #d1d5db !important;
        color: #111827 !important;
        backdrop-filter: none !important;
    }

    .form-control::placeholder {
        color: #9ca3af !important;
    }

    .form-control:focus {
        border-color: #3b82f6 !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
        background: #ffffff !important;
        color: #111827 !important;
    }

    /* 调整提示文字颜色 */
    .form-text {
        color: #6b7280 !important;
        text-shadow: none !important;
    }

    .text-muted {
        color: #6b7280 !important;
        text-shadow: none !important;
    }

    .text-success {
        color: #059669 !important;
        text-shadow: none !important;
    }

    .text-danger {
        color: #dc2626 !important;
        text-shadow: none !important;
    }

    .text-purple {
        color: #9333ea !important; /* 移动端紫色 */
        text-shadow: none !important;
    }

    /* 调整密码提示文字 */
    .password-hint {
        color: #dc2626 !important;
        text-shadow: none !important;
    }

    /* 调整分割线文字 */
    .login-divider span {
        background: #f9fafb !important;
        color: #dc2626 !important;
        text-shadow: none !important;
    }

    /* 调整浏览量统计 */
    .page-views-counter {
        color: #6b7280 !important;
        text-shadow: none !important;
    }

    .page-views-counter:hover {
        color: #374151 !important;
    }

    .page-views-counter i {
        color: #9ca3af !important;
    }

    .page-views-number {
        color: #6b7280 !important;
    }

    /* 调整页脚 */
    .copyright-footer p {
        color: #6b7280 !important;
        text-shadow: none !important;
    }

    /* 移动端特定调整 */
    .site-title {
        font-size: 2.5rem !important;
    }

    .login-card {
        margin: 1rem !important;
    }

    .login-hero-section {
        padding: 2rem 0 !important;
    }
}

/* 小屏幕移动端进一步优化 */
@media (max-width: 480px) {
    .site-title {
        font-size: 2rem !important;
    }

    .site-subtitle {
        font-size: 1.1rem !important;
    }

    .login-card {
        padding: 1.5rem !important;
        margin: 0.5rem !important;
    }

    .login-title {
        font-size: 1.5rem !important;
    }
}

/* ===== 经典名句卡片样式 ===== */
.famous-line-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 1s ease-out 0.5s both;
    position: relative;
    overflow: hidden;
}

.famous-line-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    border-radius: 16px 16px 0 0;
}

.famous-line-content {
    position: relative;
    z-index: 1;
}

.famous-line-content .bi-quote {
    font-size: 2rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.famous-line-text {
    font-size: 1.4rem;
    line-height: 1.8;
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-family: "KaiTi", "楷体", serif;
    font-weight: 500;
    text-align: center;
    position: relative;
}

.famous-line-author {
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
}

.author-name {
    font-weight: 600;
    color: #3b82f6;
    margin-right: 0.5rem;
}

.author-dynasty {
    margin-right: 0.5rem;
}

.work-title {
    font-style: italic;
    color: #8b5cf6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .famous-line-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .famous-line-text {
        font-size: 1.2rem;
        line-height: 1.6;
    }

    .famous-line-author {
        font-size: 0.9rem;
    }
}