/* 水墨风格配色 */
:root {
    --ink-dark: #1a1a1a;    /* 墨色 */
    --ink-medium: #4a4a4a;  /* 中墨色 */
    --ink-light: #8a8a8a;   /* 淡墨色 */
    --paper: #f5f2e9;       /* 宣纸色 */
    --paper-dark: #e5e2d9;  /* 深宣纸色 */
    --accent: #a33;         /* 印章红 */
    --text-color: #2c2c2c;
    --border-color: #d1d1d1;
}

/* 全局样式 */
body {
    font-family: "FangSong", "STFangsong", serif;
    background-color: var(--paper);
    color: var(--text-color);
    line-height: 1.8;
}

/* 水墨效果容器 */
.ink-container {
    position: relative;
    background: linear-gradient(to right, var(--paper), #fff);
    overflow: hidden;
}

.ink-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/ink_texture.png');
    opacity: 0.05;
    pointer-events: none;
}

/* 导航栏样式 */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 64px;
    background: var(--ink-dark);
    color: var(--paper);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: "FangSong", "STFangsong", serif;
}

.nav-bar .logo a {
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    color: var(--paper);
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.nav-bar .logo a:hover {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    gap: 40px;
    margin: 0 40px;
}

.nav-item {
    font-size: 18px;
    text-decoration: none;
    color: var(--paper);
    padding: 6px 0;
    position: relative;
    transition: all 0.3s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: var(--accent);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.nav-item.active {
    color: var(--accent);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-btn {
    padding: 6px 20px;
    border: 1px solid var(--accent);
    border-radius: 20px;
}

.login-btn:hover {
    background: var(--accent);
    color: var(--paper);
}

/* 响应式导航栏 */
@media screen and (max-width: 768px) {
    .nav-bar {
        padding: 0 20px;
    }

    .nav-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--ink-dark);
        padding: 10px;
        margin: 0;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        text-align: center;
    }

    .nav-item {
        font-size: 16px;
        padding: 8px 0;
    }

    .user-menu {
        display: none;
    }
}

/* 侧边栏样式 */
.side-menu {
    position: fixed;
    left: 0;
    top: 60px;
    width: 200px;
    height: calc(100vh - 60px);
    background: #fff;
    padding: 20px 0;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
}

.menu-item:hover {
    background: #f5f5f5;
}

.menu-item img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

/* 主要内容区样式 */
.main-content {
    margin-left: 200px;
    margin-top: 60px;
    padding: 20px;
}

.carousel {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 内容列表样式 */
.content-list {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.content-list h2 {
    color: #c62828;
    margin-bottom: 15px;
    font-size: 20px;
}

/* 游戏区域样式 */
.game-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
}

.game-section h2 {
    color: #c62828;
    margin-bottom: 15px;
    font-size: 20px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.game-item {
    text-align: center;
    cursor: pointer;
}

.game-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* 内容列表样式优化 */
.list-item {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.list-item:last-child {
    border-bottom: none;
}

.item-image {
    width: 200px;
    height: 120px;
    margin-right: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-content {
    flex: 1;
}

.item-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.item-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.item-info {
    color: #999;
    font-size: 14px;
}

.item-info span {
    margin-right: 20px;
}

/* 轮播图样式优化 */
.carousel {
    position: relative;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}

.indicator.active {
    background: #fff;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* 中国风元素 */
:root {
    --primary-color: #c62828; /* 中国红 */
    --secondary-color: #8d6e63; /* 棕褐色 */
    --gold-color: #d4af37; /* 金色 */
    --ink-color: #2c3e50; /* 墨色 */
    --jade-color: #70a19f; /* 玉色 */
    --rice-color: #f9f2e8; /* 米色 */
    --bamboo-color: #7c9c3c; /* 竹青色 */
    --text-color: #333;
    --border-color: #ddd;
    --bg-color: var(--rice-color);
}

/* 水墨效果 */
.ink-bg {
    background: linear-gradient(45deg, var(--rice-color), #fff);
    position: relative;
    overflow: hidden;
}

.ink-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/ink_texture.png');
    opacity: 0.08;
    pointer-events: none;
}

/* 折叠面板样式 */
.collapse-section {
    margin-bottom: 20px;
}

.collapse-panel {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.panel-header {
    padding: 15px 20px;
    background: var(--secondary-color);
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-content {
    padding: 20px;
    display: none;
}

.panel-content.active {
    display: block;
}

/* 索引列表样式 */
.index-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
}

.index-group {
    margin-bottom: 20px;
}

.group-title {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.group-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.group-items a {
    color: var(--text-color);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.group-items a:hover {
    background-color: var(--bg-color);
}

/* 表单样式 */
.custom-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.submit-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

/* 登录页面样式 */
.login-page {
    background: var(--bg-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header img {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
}

.login-btn {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.form-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 响应式布局 */
@media screen and (max-width: 768px) {
    .side-menu {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .nav-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to bottom, var(--primary-color), #b71c1c);
        border-top: 1px solid var(--gold-color);
        padding: 10px;
        box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    }

    .list-item {
        flex-direction: column;
    }

    .item-image {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
} 

/* 游戏相关样式 */
.game-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.game-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, transparent 50%, var(--gold-color) 50%);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    position: relative;
}

.game-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.game-header h3 {
    color: var(--primary-color);
    font-size: 20px;
}

.score {
    font-size: 18px;
    color: var(--secondary-color);
}

/* 成语接龙游戏 */
.idiom-game .game-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.current-idiom {
    font-size: 24px;
    color: var(--ink-color);
    text-align: center;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 4px;
}

.idiom-input {
    padding: 10px;
    font-size: 18px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* 诗词填空游戏 */
.poem-title {
    font-size: 20px;
    color: var(--ink-color);
    text-align: center;
    margin-bottom: 20px;
}

.poem-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.poem-line {
    font-size: 18px;
    text-align: center;
}

.poem-input {
    width: 100px;
    padding: 5px;
    font-size: 18px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.poem-input.correct {
    border-color: #4caf50;
    background: #e8f5e9;
}

.poem-input.wrong {
    border-color: #f44336;
    background: #ffebee;
}

/* 文物拼图游戏 */
.puzzle-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--border-color);
    padding: 2px;
    border-radius: 4px;
    margin-top: 20px;
    border: 2px solid var(--gold-color);
    padding: 4px;
    background: var(--rice-color);
}

.puzzle-piece {
    aspect-ratio: 1;
    background-size: 300% 300%;
    cursor: pointer;
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.puzzle-piece:hover {
    transform: scale(0.98);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.puzzle-piece.empty {
    background: var(--bg-color);
}

/* 游戏按钮样式 */
.game-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.game-btn:hover {
    opacity: 0.9;
}

/* 中国风按钮样式 */
.btn-chinese {
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--gold-color);
    padding: 10px 24px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-chinese:hover {
    background: #b71c1c;
    box-shadow: 0 0 10px rgba(212,175,55,0.3);
}

.btn-chinese::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.2),
        transparent
    );
    transition: 0.5s;
}

.btn-chinese:hover::before {
    left: 100%;
}

/* 卡片样式优化 */
.chinese-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.chinese-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--gold-color));
    border-radius: 8px 8px 0 0;
}

.chinese-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 输入框样式优化 */
.chinese-input {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    width: 100%;
    font-size: 16px;
    transition: all 0.3s ease;
}

.chinese-input:focus {
    border-color: var(--gold-color);
    box-shadow: 0 0 5px rgba(212,175,55,0.2);
    outline: none;
}

/* 动画效果 */
@keyframes inkFlow {
    0% {
        transform: translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.ink-animation {
    position: relative;
    overflow: hidden;
}

.ink-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(0,0,0,0.05));
    animation: inkFlow 3s ease-in-out infinite;
}

/* 中国风装饰元素 */
.chinese-decoration {
    position: relative;
}

.chinese-decoration::before,
.chinese-decoration::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold-color);
}

.chinese-decoration::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.chinese-decoration::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* 卡片样式 */
.ink-card {
    background: #fff;
    border-radius: 2px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.ink-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(0,0,0,0.02));
    pointer-events: none;
}

/* 标题样式 */
.ink-title {
    font-size: 24px;
    color: var(--ink-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ink-light);
    position: relative;
}

.ink-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent);
}

/* 按钮样式 */
.ink-btn {
    background: var(--ink-dark);
    color: var(--paper);
    border: none;
    padding: 10px 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ink-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.ink-btn:hover::before {
    left: 100%;
}

/* 列表样式 */
.ink-list {
    list-style: none;
}

.ink-list-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--paper-dark);
    transition: all 0.3s ease;
}

.ink-list-item:hover {
    padding-left: 10px;
    background: linear-gradient(to right, var(--paper), transparent);
}

/* 输入框样式 */
.ink-input {
    background: var(--paper);
    border: 1px solid var(--ink-light);
    padding: 10px 15px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.ink-input:focus {
    outline: none;
    border-color: var(--ink-dark);
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* 装饰元素 */
.ink-decoration {
    position: relative;
}

.ink-decoration::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid var(--ink-light);
    opacity: 0.3;
    pointer-events: none;
}

/* 水墨动画 */
@keyframes inkDrop {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.ink-animation {
    position: relative;
}

.ink-animation::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, var(--ink-light), transparent);
    transform: translate(-50%, -50%);
    animation: inkDrop 2s ease-out infinite;
} 