/* 衢州方言文化平台 - 基于 Bootstrap 4 的样式 */

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

:root {
    --primary-color: #3a6ea5; /* 主色调：深蓝色 */
    --secondary-color: #ff7e67; /* 辅助色：温暖橙红色 */
    --accent-color: #a2d5f2; /* 强调色：浅蓝 */
    --text-color: #2d3436;
    --light-text: #636e72;
    --background-color: #f9f9f9;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --footer-height: 300px; /* 页脚高度，用于计算内容区域的底部空间 */
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* 页脚样式 - 确保不覆盖内容 */
footer {
    position: relative; /* 设置为相对定位，避免覆盖内容 */
    z-index: 10; /* 设置适当的z-index，确保在内容之上但在导航栏之下 */
    margin-top: -100px; /* 负边距，与主内容区域的padding-bottom配合 */
}

/* 主内容区域增强样式 */
main {
    position: relative;
    z-index: 1;
}

/* Bootstrap 导航栏增强样式 */
.navbar {
    box-shadow: var(--shadow);
    z-index: 1050;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

/* 搜索框样式 - 电脑端优化 */
.navbar-search {
    flex-shrink: 0;
    min-width: 280px;
    max-width: 350px;
}

.search-input-group {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.search-input-group:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.navbar .search-input {
    border: 1px solid #e2e8f0;
    border-radius: 25px 0 0 25px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    border-right: none;
}

.navbar .search-input:focus {
    box-shadow: none;
    background-color: white;
    border-color: var(--primary-color);
    outline: none;
}

.navbar .search-input::placeholder {
    color: #94a3b8;
    font-size: 0.875rem;
}

.navbar .search-input:focus::placeholder {
    color: #cbd5e1;
}

/* 搜索按钮样式 */
.navbar .search-btn {
    border: 1px solid #e2e8f0;
    border-radius: 0 25px 25px 0;
    padding: 0.5rem 1.25rem;
    background-color: white;
    color: var(--primary-color);
    border-left: none;
    transition: all 0.3s ease;
}

.navbar .search-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.navbar .search-btn i {
    font-size: 1rem;
}

/* 导航栏滚动状态下的搜索框样式 */
.navbar-scrolled .search-input {
    background-color: white;
}

/* 登录和注册按钮样式 */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.auth-buttons .nav-item {
    margin: 0;
}

.login-link {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.login-link:hover {
    color: var(--primary-color);
    background-color: rgba(58, 110, 165, 0.05);
    border-radius: 20px;
}

.login-link i {
    font-size: 1.1rem;
}

.register-btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(58, 110, 165, 0.2);
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 110, 165, 0.3);
}

.register-btn i {
    font-size: 1rem;
}

/* 用户下拉菜单样式优化 */
.navbar-nav .dropdown-toggle {
    white-space: nowrap;
}

.navbar-nav .dropdown-toggle i {
    flex-shrink: 0;
}

.navbar-nav .dropdown-toggle span {
    display: inline-block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式导航栏增强 */
@media (max-width: 992px) {
    .navbar-nav {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem !important;
        text-align: center;
    }
    
    /* 移动端搜索框 */
    .navbar-search {
        min-width: 100%;
        max-width: 100%;
        margin: 1rem 0;
    }
    
    /* 移动端登录按钮 */
    .auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .auth-buttons .nav-item {
        width: 100%;
    }
    
    .login-link,
    .register-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* PC端导航栏优化 */
@media (min-width: 993px) {
    .navbar-nav {
        flex-direction: row;
    }
    
    .navbar-nav .nav-item {
        margin: 0;
    }
    
    .navbar-collapse {
        flex-wrap: nowrap;
        align-items: center;
    }
    
    .navbar-search {
        margin-left: 2rem;
        margin-right: 1rem;
    }
    
    .auth-buttons {
        margin-left: 1rem;
    }
}

/* 内容区域 */
.container {
    max-width: 1200px;
    padding: 0 1.5rem;
    margin: 0 auto;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    margin-top: 0;
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
    padding-left: 1.25rem;
    font-weight: 700;
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, 
        #667eea 0%, 
        #764ba2 50%, 
        #f093fb 100%);
    border-radius: 3px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--secondary-color) 0%, 
        transparent 100%);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

h2:hover::after {
    width: 120px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1rem;
    font-weight: 600;
}

h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, 
        var(--secondary-color) 0%, 
        var(--accent-color) 100%);
    border-radius: 2px;
}

/* 轮播图样式 */
.carousel {
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
    max-height: 500px;
}

.carousel-inner {
    border-radius: var(--border-radius);
}

.carousel-item {
    height: 500px;
    position: relative;
}

.carousel-item img {
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    text-align: left;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.5s ease;
}

.carousel-item.active .carousel-caption {
    transform: translateY(0);
    opacity: 1;
}

/* 轮播图指示器增强 */
.carousel-indicators li {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    border: none;
}

.carousel-indicators li.active {
    width: 30px;
    border-radius: 6px;
    background-color: white;
}

/* 轮播图样式 - 遵循 Bootstrap 4 官方文档标准 */
.carousel {
    margin-bottom: 4rem;
}

/* 轮播图控制按钮 */
.carousel-control-prev,
.carousel-control-next {
    width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

.carousel-caption h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.carousel-caption p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    max-width: 80%;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: var(--transition);
    background-color: var(--card-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    /* height: 100%; 注释掉这一行以解决div不显示的问题 */
    display: flex;
    flex-direction: column;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        #667eea 0%, 
        #764ba2 25%, 
        #f093fb 50%, 
        #4facfe 75%, 
        #667eea 100%);
    background-size: 200% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card:hover::before {
    transform: scaleX(1);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

.card-img-top {
    max-height: 220px;
    object-fit: cover;
    width: 100%;
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-img-container {
    overflow: hidden;
    position: relative;
    height: 220px;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 0.25rem;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover .card-title::after {
    transform: scaleX(1);
}

.card-text {
    color: var(--light-text);
    margin-bottom: 1rem;
    flex: 1;
}

/* 方言词汇卡片样式 */
.vocabulary-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-left: 4px solid var(--secondary-color);
}

/* 文化内容卡片样式 */
.cultural-card {
    background: linear-gradient(135deg, #ffffff 0%, #f1f3f5 100%);
    border-left: 4px solid var(--primary-color);
}

/* 地区卡片样式 */
.region-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-left: 4px solid var(--accent-color);
    text-align: center;
}

.region-card .card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* 卡片统计信息 */
.card-stats {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: var(--light-text);
}

.card-stats span {
    margin-right: 1rem;
    display: inline-flex;
    align-items: center;
}

.card-stats i {
    margin-right: 0.25rem;
    color: var(--primary-color);
}

/* 按钮样式 */
.btn {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
    z-index: -1;
}

.btn:hover::before {
    transform: translateX(100%);
}

/* 主按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(58, 110, 165, 0.3);
}

.btn-primary:hover {
    background-color: #2d568a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 110, 165, 0.4);
    color: white;
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.25);
}

/* 辅助按钮样式 */
.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 126, 103, 0.3);
}

.btn-secondary:hover {
    background-color: #e86a4e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 126, 103, 0.4);
    color: white;
}

/* 成功按钮样式 */
.btn-success {
    background-color: #28a745;
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: white;
}

/* 信息按钮样式 */
.btn-info {
    background-color: #17a2b8;
    color: white;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background-color: #138496;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
    color: white;
}

/* 警告按钮样式 */
.btn-warning {
    background-color: #ffc107;
    color: #212529;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    color: #212529;
}

/* 危险按钮样式 */
.btn-danger {
    background-color: #dc3545;
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    color: white;
}

/* 轮廓按钮样式 */
.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 圆角按钮样式 */
.btn-rounded {
    border-radius: 50px;
    padding: 0.5rem 2rem;
}

/* 大尺寸按钮 */
.btn-lg {
    font-size: 1.125rem;
    padding: 0.75rem 2rem;
}

/* 小尺寸按钮 */
.btn-sm {
    font-size: 0.875rem;
    padding: 0.375rem 1rem;
}

/* 按钮组样式 */
.btn-group .btn {
    margin-right: 0.5rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* 特色区域样式 */
.section {
    padding: 4rem 0;
    position: relative;
}

.section:nth-child(even) {
    background-color: #f9f9f9;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.6s ease;
    transform-origin: center;
}

.section:hover::before {
    transform: scaleX(1);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1.5rem;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.section-title::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -10px;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, 
        #667eea 0%, 
        #764ba2 50%, 
        #f093fb 100%);
    border-radius: 2px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--secondary-color) 50%, 
        transparent 100%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-title:hover::after {
    width: 180px;
}

.section-subtitle {
    text-align: center;
    color: var(--light-text);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
}

/* 方言简介区域 */
.intro-card {
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.intro-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent-color);
}

/* 区域选择区域 */
.region-card {
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.region-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* 页脚样式优化 */
footer {
    background-color: #2d3436;
    color: white;
    padding: 3rem 0 2rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-content .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.footer-content .col-md-4 {
    padding-right: 15px;
    padding-left: 15px;
    margin-bottom: 2rem;
}

.footer-content h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.footer-content ul {
    list-style: none;
    padding: 0;
}

.footer-content ul li {
    margin-bottom: 0.75rem;
}

.footer-content ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.footer-content ul li a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-content ul li a i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.footer-bottom {
    background-color: #212529;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 2rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0;
}

/* 社交链接样式 */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

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

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

/* 应用动画到各元素 */
.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

.slide-in-left {
    animation: slideInFromLeft 0.8s ease forwards;
}

.slide-in-right {
    animation: slideInFromRight 0.8s ease forwards;
}

/* 延迟动画 */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

.region-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.region-card h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

/* 搜索框样式增强 */
.form-control {
    transition: var(--transition);
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.1);
}

/* 下拉菜单样式增强 */
.dropdown-menu {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 0.5rem !important;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    font-size: 0.95rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: var(--background-color);
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

footer h3 {
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    margin-bottom: 0.5rem;
}

footer a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
    text-decoration: none;
}

/* 页脚背景效果 */
footer {
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    z-index: 1;
}

footer > div {
    position: relative;
    z-index: 2;
}

/* 动画效果 */
.animate__animated {
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

.animate__fadeInDown {
    animation-name: fadeInDown;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* 消息提示模态框样式 */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.modal-title {
    color: white;
}

.modal-header .close {
    color: white;
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem !important;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .carousel-caption h3 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .carousel-item {
        height: 400px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .search-input {
        width: 150px;
    }
    
    .search-input:focus {
        width: 200px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .card-img-container,
    .card-img-top {
        height: 180px;
    }
    
    .carousel {
        margin-top: 60px;
    }
    
    .carousel-item {
        height: 300px;
    }
    
    .carousel-caption {
        padding: 1.5rem;
    }
    
    .carousel-caption h3 {
        font-size: 1.25rem;
    }
    
    .carousel-caption p {
        display: none;
    }
    
    /* 调整控制按钮在小屏幕上的显示 */
    .carousel-control-prev,
    .carousel-control-next {
        opacity: 1;
        width: 15%;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 2rem;
        height: 2rem;
        padding: 0.5rem;
    }
    
    /* 搜索框在小屏幕上的样式调整 */
    .search-form {
        margin-top: 1rem;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.35rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .section {
        padding: 2.5rem 0;
    }
    
    .intro-card,
    .region-card {
        padding: 1.5rem;
    }
    
    /* 确保卡片在小屏幕上正常显示 */
    .card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .row > * {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* 确保col-12在小屏幕上占满宽度 */
    .col-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* 防止水平滚动 */
    body, html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 编辑页面特定样式 */
.edit-form-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.edit-form-header {
    background: linear-gradient(135deg, var(--primary-color), #2c5aa0);
    color: white;
    padding: 1.5rem 2rem;
}

.edit-form-header .btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    transition: all 0.3s ease;
}

.edit-form-header .btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.edit-form-body {
    padding: 2rem;
}

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

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.1);
    outline: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* 音频管理卡片样式 */
.audio-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
}

.audio-card-header {
    background-color: #6c757d;
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.audio-card-body {
    padding: 1.5rem;
}

.audio-player {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* 词汇信息卡片样式 */
.vocab-info-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.vocab-info-card-header {
    background-color: #6c757d;
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.vocab-info-card-body {
    padding: 1.5rem;
}

.vocab-info-row {
    display: flex;
    margin-bottom: 1rem;
    align-items: center;
}

.vocab-info-row:last-child {
    margin-bottom: 0;
}

.vocab-info-label {
    flex: 0 0 40%;
    font-weight: 600;
    text-align: right;
    padding-right: 1rem;
    color: var(--light-text);
}

.vocab-info-value {
    flex: 0 0 60%;
    color: var(--text-color);
}

/* 表单操作按钮样式 */
.form-actions {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2c5aa0;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(58, 110, 165, 0.2);
}

.btn-danger {
    background-color: #dc3545;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(220, 53, 69, 0.2);
}

/* 状态标签样式 */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .edit-form-body {
        padding: 1.5rem;
    }
    
    .vocab-info-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .vocab-info-label {
        flex: 1;
        text-align: left;
        padding-right: 0;
        margin-bottom: 0.25rem;
    }
    
    .vocab-info-value {
        flex: 1;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-primary, .btn-danger {
        width: 100%;
    }
}

/* 表单元素焦点效果 */
.form-group {
    position: relative;
    transition: all 0.3s ease;
}

.form-group-focused {
    transform: translateY(-2px);
}

.form-group-focused label {
    color: #007bff;
    font-weight: 600;
}

.form-group-focused .form-control {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 状态徽章样式 */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* 按钮加载状态 */
.btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

/* 音频播放器样式 */
.audio-player {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
}

/* 表单提交按钮动画 */
.btn-primary .bi-spinner,
.btn-danger .bi-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

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

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* =====================================
   区域页面特定样式
   ===================================== */

/* 区域卡片hover效果 */
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

/* hover文字颜色变化 */
.hover-text-primary:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
}

/* 进度条动画 */
.progress-bar {
    animation: progressAnimation 1s ease-out;
}

@keyframes progressAnimation {
    from {
        width: 0;
    }
}

/* 贡献排行榜卡片样式 */
.border-warning {
    border-left-color: #ffc107 !important;
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.border-secondary {
    border-left-color: #6c757d !important;
    background: linear-gradient(90deg, rgba(108, 117, 125, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.border-danger {
    border-left-color: #dc3545 !important;
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

/* 统计卡片样式 */
.card .display-4 {
    animation: countUp 1.5s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 响应式优化 */
@media (max-width: 768px) {
    .hover-lift:hover {
        transform: translateY(-4px);
    }
}

/* =====================================
   移动端语音播放按钮增强
   ===================================== */

/* 语音按钮基本样式 */
.audio-btn {
    position: relative !important;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent; /* 移除iOS点击高亮 */
    touch-action: manipulation; /* 优化移动端触摸响应 */
    transition: all 0.2s ease;
    z-index: 100 !important; /* 确保按钮在最上层 */
    isolation: isolate; /* 创建新的堆叠上下文 */
}

/* 移动端增大点击区域 */
@media (max-width: 768px) {
    .audio-btn {
        min-width: 52px !important;
        min-height: 52px !important;
        padding: 14px !important;
        margin: -14px !important;
    }
    
    .audio-btn i {
        font-size: 1.6rem !important;
    }
}

/* 按钮点击反馈效果 - 移动端 */
.audio-btn:active {
    transform: scale(0.85);
    opacity: 0.6;
    background-color: rgba(58, 110, 165, 0.2) !important;
    border-radius: 50%;
}

/* 按钮 hover 效果 (电脑端) */
@media (min-width: 769px) {
    .audio-btn:hover {
        background-color: rgba(58, 110, 165, 0.1) !important;
        border-radius: 50%;
        transform: scale(1.05);
    }
    
    .audio-btn:hover i {
        transform: scale(1.15);
    }
}

/* 语音播放中的动画效果 */
.audio-btn.playing i {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* 确保图标不阻挡点击 */
.audio-btn i {
    pointer-events: none !important;
}