﻿:root { --sidebar-bg: #1e272e; --primary-color: #3498db; --bg-color: #f4f6f9; }
body { margin: 0; font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; display: flex; background-color: var(--bg-color); overflow: hidden; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #bdc3c7; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #95a5a6; }

.sidebar { width: 220px; background: var(--sidebar-bg); height: 100vh; position: fixed; color: #fff; overflow-y: auto; box-shadow: 2px 0 10px rgba(0,0,0,0.1); z-index: 100; }
.sidebar .logo { padding: 20px; font-size: 20px; font-weight: bold; text-align: center; background: #111417; letter-spacing: 1px; border-bottom: 1px solid #2f3640; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li a { display: flex; align-items: center; padding: 15px 20px; color: #d2dae2; text-decoration: none; border-left: 4px solid transparent; transition: all 0.3s; }
.sidebar li a:hover { background: #2f3640; border-left-color: var(--primary-color); color: #fff; }
.nav-icon { margin-right: 12px; font-size: 18px; width: 20px; text-align: center;}
.menu-divider { height: 1px; background: #353b48; margin: 10px 20px; }

.main-content { margin-left: 220px; width: calc(100% - 220px); height: 100vh; overflow-y: auto; box-sizing: border-box; scroll-behavior: smooth; }

@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar .logo { font-size: 12px; padding: 20px 2px; overflow: hidden; white-space: nowrap;}
    .sidebar .nav-text { display: none; }
    .nav-icon { margin-right: 0; font-size: 22px; width: auto;}
    .main-content { margin-left: 60px; width: calc(100% - 60px); }
}

.app-container { display: none; padding: 30px 40px; min-height: 100%; box-sizing: border-box; }

/* 影视导航 */
#movie-container { color: #333; padding-bottom: 60px; }
.section-title { font-size: 20px; margin-bottom: 20px; font-weight: bold; display: flex; align-items: center; border-bottom: 2px solid #e0e0e0; padding-bottom: 10px; margin-top: 20px;}
.section-title span { margin-right: 10px; font-size: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 15px; margin-bottom: 30px; }
.card { background: #ffffff; border-radius: 8px; padding: 15px; display: flex; align-items: center; text-decoration: none; color: inherit; transition: all 0.3s; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid #f1f2f6; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); border-color: var(--primary-color); }
.avatar { width: 40px; height: 40px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: bold; margin-right: 12px; flex-shrink: 0; }
.info { flex-grow: 1; overflow: hidden; }
.info .name { font-size: 15px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #2f3542;}
.info .desc { font-size: 12px; color: #747d8c; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 四库全书 */
#siku-container { color: #2c2c2c; font-family: 'KaiTi', 'STKaiti', serif; padding-bottom: 60px;}
.siku-header { text-align: center; margin-bottom: 40px; border-bottom: 2px solid #8b8b8b; padding-bottom: 20px;}
.siku-header h1 { font-size: 2.5em; letter-spacing: 5px; margin-bottom: 10px;}
.gzh-banner { background: rgba(255,255,255,0.4); border: 2px dashed #4a4a4a; padding: 20px; text-align: center; border-radius: 10px; margin-bottom: 30px;}
.gzh-banner img { width: 160px; height: 160px; border: 1px solid #ccc; margin: 15px 0; object-fit: cover; box-shadow: 0 4px 8px rgba(0,0,0,0.2);}
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.book-card { background: rgba(255,255,255,0.6); border: 1px solid #a3a3a3; padding: 20px; border-radius: 5px; box-shadow: 3px 3px 10px rgba(0,0,0,0.1); text-align: center; transition: 0.3s;}
.book-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.9); }
.book-card h3 { font-size: 1.8em; margin-top: 0; border-bottom: 1px solid #ccc; padding-bottom: 10px;}

/* 留言板 */
#message-container { color: #333; max-width: 900px; margin: 0 auto; padding-bottom: 60px;}
.msg-board-title { font-size: 24px; border-bottom: 2px solid #3498db; padding-bottom: 10px; margin-bottom: 20px; }
.msg-form { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 30px;}
.msg-input { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #dfe4ea; border-radius: 6px; font-family: inherit; box-sizing: border-box; background: #f8f9fa; outline: none; transition: 0.3s;}
.msg-input:focus { border-color: #3498db; background: #fff;}
textarea.msg-input { height: 120px; resize: vertical; }
.btn-submit { background: var(--primary-color); color: #fff; border: none; padding: 12px 30px; border-radius: 6px; cursor: pointer; font-size: 16px; font-weight: bold; transition: 0.2s;}
.btn-submit:hover { background: #2980b9; transform: translateY(-2px);}
.msg-list { display: flex; flex-direction: column; gap: 15px; }
.msg-item { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); border-left: 4px solid #3498db;}
.msg-header { display: flex; justify-content: space-between; font-size: 13px; color: #a4b0be; margin-bottom: 12px; border-bottom: 1px dashed #f1f2f6; padding-bottom: 8px;}
.msg-header b { color: #2f3542; font-size: 16px;}
.msg-body { font-size: 15px; line-height: 1.6; margin-bottom: 15px; color: #57606f;}
.msg-reply { background: #f1f2f6; padding: 12px; border-radius: 6px; font-size: 14px; color: #2f3542; border-left: 3px solid #ffa502;}

/* 武侠世界 */
#wuxia-container { color: #2c2c2c; font-family: 'KaiTi', 'STKaiti', serif; text-align: center; padding-bottom: 60px;}
#wuxia-container .header { padding: 0 20px 30px 20px; border-bottom: 2px solid #8b8b8b; margin-bottom: 20px; }
#wuxia-container .header h1 { font-size: 2.5em; letter-spacing: 5px; margin: 0; }
.map-container { position: relative; display: inline-block; max-width: 90%; border: 5px solid #4a4a4a; box-shadow: 5px 5px 15px rgba(0,0,0,0.3); overflow: hidden; }
.map-image { display: block; width: 100%; height: auto; }
.hotspot { position: absolute; cursor: pointer; border: 2px dashed rgba(44, 44, 44, 0.5); background-color: rgba(255, 255, 255, 0.1); transition: all 0.3s ease; }
.hotspot:hover { background-color: rgba(0, 0, 0, 0.2); border: 2px solid #000; transform: scale(1.02); }
.hotspot::after { content: attr(data-title); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(233, 228, 212, 0.9); padding: 5px 10px; border: 1px solid #2c2c2c; opacity: 0; transition: opacity 0.3s; white-space: nowrap; font-size: 1.2em; }
.hotspot:hover::after { opacity: 1; }

#story-page { display: none; max-width: 800px; margin: 0 auto; padding: 30px; background-color: #f4f1e8; border: 1px solid #a3a3a3; text-align: left; }
.story-image { width: 100%; max-height: 350px; object-fit: cover; border-bottom: 2px solid #2c2c2c; margin-bottom: 20px; filter: grayscale(80%) sepia(20%); }
.story-title { font-size: 2em; text-align: center; margin-bottom: 20px; border-bottom: 1px dashed #a3a3a3; padding-bottom: 10px; }
.story-text { font-size: 1.2em; line-height: 1.8; text-indent: 2em; margin-bottom: 30px;}

.game-section { border: 2px solid #4a4a4a; background-color: rgba(0,0,0,0.03); padding: 20px; text-align: center; position: relative; min-height: 250px; margin-bottom: 20px; }
.game-title { font-size: 1.5em; margin-top: 0; margin-bottom: 15px; font-weight: bold; }
.game-btn { padding: 8px 15px; font-size: 1.1em; font-family: inherit; background: #e9e4d4; border: 2px solid #2c2c2c; cursor: pointer; transition: 0.2s; margin: 5px; }
.game-btn:hover { background: #2c2c2c; color: #e9e4d4; }
.game-msg { font-size: 1.3em; font-weight: bold; color: #8b0000; margin-top: 15px; min-height: 30px;}

.back-btn { display: block; width: 150px; margin: 20px auto 10px auto; padding: 10px; background: transparent; color: #2c2c2c; border: 2px solid #2c2c2c; font-size: 1.2em; font-family: inherit; cursor: pointer; text-align: center; }
.back-btn:hover { background: #2c2c2c; color: #e9e4d4; }

/* 拼图专用样式 */
#puzzle-board { display: grid; grid-template-columns: repeat(3, 100px); width: 300px; height: 300px; margin: 0 auto; border: 2px solid #2c2c2c; background: #ccc;}
.puzzle-tile { width: 100px; height: 100px; background-image: url('chap4.jpg'); background-size: 300px 300px; border: 1px solid #fff; box-sizing: border-box; cursor: pointer; transition: 0.1s;}
.puzzle-empty { background: #e9e4d4; border: none; cursor: default; }