:root {
    --primary-color: #8B0000;
    --secondary-color: #DAA520;
    --text-color: #5A3E36;
    --bg-color: #f5f0e8;
    --bg-gradient: linear-gradient(135deg, #f5f0e8 0%, #e8dcc6 50%, #d4c4a8 100%);
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
    --nav-height: 60px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "华文楷体", "KaiTi", "Microsoft YaHei", sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    margin: 0;
    padding: 60px 0 80px 0;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== 顶部适配导航栏 ===== */
.top-nav-bar {
position: fixed;
top: 0;
left: 0;
    right: 0;
    z-index: 1001;
    background: linear-gradient(135deg, var(--primary-color) 0%, #A52A2A 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.top-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    max-width: 100%;
}

.nav-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 600;
}

.nav-title i {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.nav-title span {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ===== AI按钮样式 ===== */
.ai-button {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ai-button:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.2);
}

.ai-button i {
    font-size: 1rem;
    color: var(--secondary-color);
}

.ai-button span {
    font-size: 0.85rem;
    font-weight: 500;
}


/* ===== 导航菜单 ===== */
.nav-menu {
position: fixed;
    bottom: 0;
left: 0;
    right: 0;
width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.8rem 0;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--secondary-color);
}

.nav-item {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    transition: var(--transition);
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.4rem;
position: relative;
    overflow: hidden;
    flex: 1;
    justify-content: center;
    min-height: 44px;
}

.nav-item i {
    font-size: 1.1rem;
transition: var(--transition);
}

.nav-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.nav-item.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* 移动端触摸时的:active伪类样式 */
.nav-item:active {
    background: var(--primary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* 确保只有当前页面的导航项保持高亮状态 */
.nav-item:not(.active) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

.nav-item:not(.active):hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.nav-item:hover i {
    color: var(--secondary-color);
    transform: scale(1.1);
}

/* ===== 主容器 ===== */
.app-container {
    margin-top: var(--nav-height);
    padding: 1rem;
    max-width: 100%;
}

/* ===== 通用区域样式 ===== */
section {
margin-bottom: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
        gap: 0.5rem;
    }

.section-header h2 i {
    color: var(--secondary-color);
}

.more-btn {
    color: var(--primary-color);
        font-size: 0.9rem;
display: flex;
align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: var(--transition);
}

.more-btn:hover {
    color: var(--secondary-color);
}

/* ===== 新闻区域 ===== */
.news-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, #f8f9fa 100%);
}

.news-carousel {
position: relative;
overflow: hidden;
    border-radius: 12px;
}

.news-card {
    display: none;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
transition: var(--transition);
}

.news-card.active {
    display: block;
    animation: slideIn 0.5s ease-out;
}

.news-image {
position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
width: 100%;
height: 100%;
object-fit: cover;
    transition: transform 0.3s ease;
}

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

.news-badge {
position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.news-content {
    padding: 1.2rem;
}

.news-content h3 {
    color: var(--primary-color);
font-size: 1.1rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.news-content p {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.news-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.news-meta span {
display: flex;
align-items: center;
    gap: 0.3rem;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* ===== 功能按钮区域 ===== */
.functions-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.8rem;
}

.function-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
position: relative;
overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.function-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.function-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
width: 100%;
height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.function-card:hover::before {
    left: 100%;
}

.function-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
    margin-bottom: 0.6rem;
    align-self: flex-start;
    color: white;
    font-size: 1.3rem;
}

.function-card h3 {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    font-weight: bold;
    line-height: 1.2;
    text-align: left;
}

.function-card p {
    color: var(--text-color);
    font-size: 0.75rem;
    line-height: 1.3;
    margin: 0;
    text-align: left;
}

/* ===== 底部间距 ===== */
.bottom-spacing {
    height: 2rem;
}

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

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

/* ===== 晋剧消消乐游戏样式 ===== */

/* 游戏区域样式 */
.game-section {
    margin: 20px 0;
    padding: 20px;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.game-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.game-section .section-header h2 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin: 0;
    font-family: "华文楷体", "KaiTi", "Microsoft YaHei", sans-serif;
}

.game-toggle-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #A52A2A 100%);
color: white;
    padding: 10px 20px;
    border-radius: 8px;
cursor: pointer;
    transition: all 0.3s ease;
display: flex;
align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

.game-toggle-btn:hover {
transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(165, 42, 42, 0.3);
}

.game-content {
    text-align: center;
}

/* 游戏时长选择器样式 */
.time-selector {
    margin: 15px 0;
    text-align: center;
}

.time-selector label {
    font-size: 1rem;
    color: var(--text-dark);
    margin-right: 10px;
    font-weight: 500;
}

.time-select {
    padding: 8px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
background: white;
    color: var(--text-dark);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.time-select:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(232, 199, 195, 0.3);
}

.time-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(232, 199, 195, 0.2);
}

.time-select option {
    padding: 5px;
    background: white;
    color: var(--text-dark);
}

/* 游戏统计信息 */
.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 15px 0;
}

.score, .timer {
font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* 开始挑战按钮样式 */
.start-game-container {
    margin: 20px 0;
text-align: center;
}

.start-game-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #A52A2A 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(165, 42, 42, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "华文楷体", "KaiTi", "Microsoft YaHei", sans-serif;
}

.start-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(165, 42, 42, 0.4);
    background: linear-gradient(135deg, var(--accent-color) 0%, #8B0000 100%);
}

.start-game-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(165, 42, 42, 0.3);
}

.start-game-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.start-game-btn i {
    font-size: 1.1rem;
}

.game-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 3px;
    background: rgba(165, 201, 183, 0.1);
    padding: 10px;
border-radius: 15px;
    box-shadow: var(--shadow);
    max-width: 400px;
    width: 100%;
    min-height: 320px;
}

.cell {
    aspect-ratio: 1;
    background: white;
    border-radius: 8px;
display: flex;
align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    min-height: 35px;
}

.cell:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.cell.selected {
    border-color: var(--accent-color);
    background: rgba(232, 199, 195, 0.2);
    transform: scale(1.1);
}

.cell.matched {
    animation: matchAnimation 0.5s ease-out;
    background: rgba(165, 201, 183, 0.3);
}

@keyframes matchAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.game-over {
font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: bold;
    margin: 20px 0;
    padding: 15px;
    background: rgba(232, 199, 195, 0.1);
    border-radius: 10px;
    display: none;
}

.game-over.show {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

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

/* 移动端隐藏游戏区域 */
@media (max-width: 768px) {
    .game-section {
        display: none;
    }
}

/* 移动端游戏优化 */
@media (max-width: 768px) {
    .game-section {
        margin: 15px 0;
        padding: 15px;
    }
    
    .game-section .section-header h2 {
        font-size: 1.3rem;
    }
    
    .game-toggle-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .time-selector {
        margin: 12px 0;
    }
    
    .time-selector label {
        font-size: 0.9rem;
        margin-right: 8px;
    }
    
    .time-select {
        padding: 6px 12px;
        font-size: 0.9rem;
        border-radius: 6px;
    }
    
    .game-stats {
        gap: 20px;
        margin: 12px 0;
    }
    
    .score, .timer {
        font-size: 1rem;
    }
    
    .start-game-container {
        margin: 15px 0;
    }
    
    .start-game-btn {
        padding: 12px 25px;
        font-size: 1.1rem;
        border-radius: 10px;
    }
    
    .grid {
        gap: 2px;
        padding: 8px;
        max-width: 350px;
        min-height: 280px;
    }
    
    .cell {
        font-size: 1.2rem;
        border-radius: 6px;
        min-height: 30px;
    }
    
    .cell:hover {
        transform: scale(1.03);
    }
    
    .cell.selected {
        transform: scale(1.08);
    }
    
    .game-over {
        font-size: 1.3rem;
        margin: 15px 0;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .game-section {
        margin: 10px 0;
        padding: 12px;
    }
    
    .game-section .section-header h2 {
        font-size: 1.1rem;
    }
    
    .game-toggle-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
    
    .time-selector {
        margin: 10px 0;
    }
    
    .time-selector label {
        font-size: 0.8rem;
        margin-right: 6px;
    }
    
    .time-select {
        padding: 5px 10px;
        font-size: 0.8rem;
        border-radius: 5px;
    }
    
    .game-stats {
        gap: 15px;
        margin: 10px 0;
    }
    
    .score, .timer {
        font-size: 0.9rem;
    }
    
    .start-game-container {
        margin: 12px 0;
    }
    
    .start-game-btn {
        padding: 10px 20px;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .grid {
        gap: 1px;
        padding: 6px;
        max-width: 300px;
        min-height: 240px;
    }
    
    .cell {
        font-size: 1rem;
        border-radius: 4px;
        min-height: 25px;
    }
    
    .cell:hover {
        transform: scale(1.02);
    }
    
    .cell.selected {
        transform: scale(1.05);
    }
    
    .game-over {
        font-size: 1.1rem;
        margin: 12px 0;
        padding: 10px;
    }
}

/* 触摸优化 */
@media (max-width: 768px) {
    .cell {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .cell:active {
        transform: scale(0.95);
    }
}

/* 游戏导航按钮样式 - 与其他导航项保持一致 */
.game-nav-item {
    /* 移除特殊样式，使用标准导航项样式 */
}

/* 移动端游戏导航按钮 - 与其他导航项保持一致 */
@media (max-width: 768px) {
    .game-nav-item {
        /* 移除特殊样式，使用标准导航项样式 */
    }
}

/* ===== 响应式设计 ===== */
@media (min-width: 769px) {
    /* 桌面端隐藏顶部导航栏 */
    .top-nav-bar {
        display: none;
    }
    
    /* 桌面端调整body padding */
    body {
        padding: 0 0 80px 0;
    }
}

@media (max-width: 768px) {
    /* 手机端显示顶部导航栏 */
    .top-nav-bar {
        display: block;
    }
    
    /* 手机端AI按钮优化 */
    .ai-button {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        border-radius: 18px;
    }
    
    .ai-button i {
        font-size: 0.9rem;
    }
    
    .ai-button span {
        font-size: 0.8rem;
    }
    
    /* 手机端调整body padding */
    body {
        padding: 60px 0 80px 0;
        overflow-y: auto; /* 启用上下滚动 */
        -webkit-overflow-scrolling: touch; /* iOS 惯性滚动 */
        touch-action: pan-y; /* 明确允许垂直滚动手势 */
    }
    
    .app-container {
        padding: 0.8rem;
        overflow: visible; /* 确保内容不被裁切，随页面滚动 */
    }
    
    section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .nav-item {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        margin: 0;
        flex: 1 1 auto;
        justify-content: center;
        border-radius: 20px;
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-item i {
        font-size: 1.2rem;
    }
    
    /* 隐藏手机端不需要的导航按钮 */
    .nav-item[href="roles.html"],
    .nav-item[href="costumes.html"],
    .nav-item[href="introduction.html"],
    .nav-item[href="history.html"],
    .nav-item[href="map.html"],
    .nav-item[href="data-analysis.html"] {
        display: none;
    }
    
    .functions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }
    
    .news-image {
        height: 160px;
    }
    
    .function-card {
        min-height: 120px;
        padding: 1rem;
        /* 确保触控区域足够大 */
        min-height: 44px;
        min-width: 44px;
        /* 优化触控体验 */
        cursor: pointer;
        touch-action: manipulation;
        /* 确保没有边框 */
        border: none !important;
    }
    
    .function-icon {
        width: 55px;
        height: 55px;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
        color: white;
        /* 确保图标触控区域 */
        min-height: 44px;
        min-width: 44px;
        /* 确保没有边框 */
        border: none !important;
    }
    
    .function-card h3 {
        font-size: 1rem;
        /* 确保文字可读性 */
        line-height: 1.2;
    }
    
    .function-card p {
        font-size: 0.85rem;
        /* 确保文字可读性 */
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 0.5rem;
    }
    
    /* 超小屏幕AI按钮优化 */
    .ai-button {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
        border-radius: 16px;
    }
    
    .ai-button i {
        font-size: 0.8rem;
    }
    
    .ai-button span {
        font-size: 0.75rem;
    }
    
    section {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .section-header {
        margin-bottom: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
    
    .news-content {
        padding: 1rem;
    }
    
    .news-content h3 {
        font-size: 1rem;
    }
    
    .nav-item {
        padding: 0.6rem 0;
        border-radius: 15px;
        font-size: 0.8rem;
        margin: 0;
        flex: 1 1 auto;
    justify-content: center;
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-item i {
        font-size: 1.3rem;
    }
    
    /* 确保小屏幕也隐藏这些导航按钮 */
    .nav-item[href="roles.html"],
    .nav-item[href="costumes.html"],
    .nav-item[href="introduction.html"],
    .nav-item[href="history.html"],
    .nav-item[href="map.html"],
    .nav-item[href="data-analysis.html"] {
        display: none;
    }
    
    .functions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }
    
    .function-card {
        padding: 0.8rem;
        min-height: 100px;
        /* 确保触控区域足够大 */
        min-height: 44px;
        min-width: 44px;
        /* 优化触控体验 */
        cursor: pointer;
        touch-action: manipulation;
        /* 确保没有边框 */
        border: none !important;
    }
    
    .function-card h3 {
        font-size: 0.9rem;
        /* 确保文字可读性 */
        line-height: 1.2;
    }
    
    .function-card p {
        font-size: 0.75rem;
        /* 确保文字可读性 */
        line-height: 1.3;
    }
    
    .function-icon {
        width: 45px;
        height: 45px;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        margin-bottom: 0.6rem;
        color: white;
        /* 确保图标触控区域 */
        min-height: 44px;
        min-width: 44px;
        /* 确保没有边框 */
        border: none !important;
    }
}

/* ===== 触控优化 ===== */
@media (hover: none) and (pointer: coarse) {
    .news-card:hover .news-image img,
    .function-card:hover {
        transform: none;
        border-color: transparent;
        box-shadow: var(--shadow);
    }
    
    /* 移动端触控反馈 */
    .function-card {
        -webkit-tap-highlight-color: rgba(139, 0, 0, 0.2);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        /* 确保触控区域足够大 */
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 增强触控反馈效果 */
    .function-card:active {
        transform: scale(0.95);
        background: rgba(139, 0, 0, 0.1);
        border-color: rgba(139, 0, 0, 0.3);
        transition: all 0.1s ease;
    }
    
    /* 确保图标在触控时也有反馈 */
    .function-card:active .function-icon {
        transform: scale(0.9);
        transition: transform 0.1s ease;
    }
    
    /* 确保文字在触控时也有反馈 */
    .function-card:active h3,
    .function-card:active p {
        color: var(--primary-color);
        transition: color 0.1s ease;
    }
    
    /* 优化触控时的整体视觉效果 */
    .function-card:active {
        box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
    }
}

/* ===== 深色模式样式 ===== */
body.dark-theme {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #e0e0e0;
}

body.dark-theme .app-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

body.dark-theme .news-section {
    background: rgba(45, 45, 45, 0.9);
    border: 1px solid #404040;
}

body.dark-theme .news-card {
    background: #2d2d2d;
    border: 1px solid #404040;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.dark-theme .news-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-theme .news-title {
    color: #e0e0e0;
}

body.dark-theme .news-content {
    color: #b0b0b0;
}

body.dark-theme .news-date {
    color: #888;
}

body.dark-theme .feature-section {
    background: rgba(45, 45, 45, 0.9);
    border: 1px solid #404040;
}

body.dark-theme .feature-card {
    background: #2d2d2d;
    border: 1px solid #404040;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.dark-theme .feature-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-theme .feature-title {
    color: #e0e0e0;
}

body.dark-theme .feature-description {
    color: #b0b0b0;
}

body.dark-theme .nav-menu {
    background: rgba(45, 45, 45, 0.95);
    border-top-color: #DAA520;
}

body.dark-theme .nav-item {
    background: linear-gradient(135deg, #8B0000, #A52A2A);
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.4);
}

body.dark-theme .nav-item.active {
    background: linear-gradient(135deg, #DAA520, #FFD700);
    color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.4);
}

body.dark-theme .nav-item:hover {
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.5);
}

/* 深色模式主题切换按钮 */
body.dark-theme .theme-toggle-btn {
    background: linear-gradient(135deg, #DAA520, #FFD700) !important;
    color: #1a1a1a !important;
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.4) !important;
}

/* ===== 主题切换动画 ===== */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container,
.news-section,
.feature-section,
.news-card,
.feature-card,
.nav-menu,
.nav-item {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}