:root {
    --color-teal: #00c9b1;
    --color-dark-teal: #005d6c;
    --color-deep-blue: #00043c;
    --color-pink: #ffa3ac;
    --color-bg: #f8f9fa;
    --color-white: #ffffff;
    --color-text: #1a1a2e;
    --color-text-light: #5a5a7a;
    --color-border: #e8ecf1;
    --color-card-bg: #ffffff;
    --color-sidebar-bg: #fafbfc;
    --shadow-sm: 0 1px 3px rgba(0, 4, 60, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 4, 60, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 4, 60, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1400px;
    --sidebar-width: 360px;
    --nav-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.top-nav {
    position: sticky; top: 0; z-index: 1000; width: 100%; height: var(--nav-height);
    background: var(--color-deep-blue); display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; box-shadow: 0 2px 20px rgba(0,4,60,0.3); gap: 16px;
}
.top-nav .nav-brand { flex-shrink: 0; }
.top-nav .nav-brand h1 {
    font-size: 1.5rem; font-weight: 700; color: var(--color-white); letter-spacing: 0.5px; margin: 0; line-height: 1; white-space: nowrap;
    background: linear-gradient(135deg, #ffffff 0%, #d0f0ed 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links {
    display: flex; align-items: center; gap: 6px; list-style: none; flex-wrap: nowrap; overflow-x: auto;
    scrollbar-width: none; -ms-overflow-style: none; padding: 0; margin: 0; flex: 1; justify-content: center;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links li a {
    display: inline-block; padding: 8px 15px; color: rgba(255,255,255,0.85); text-decoration: none;
    font-size: 0.9rem; font-weight: 500; border-radius: 20px; white-space: nowrap; transition: var(--transition);
    letter-spacing: 0.3px; position: relative;
}
.nav-links li a:hover, .nav-links li a:focus-visible { color: #fff; background: rgba(255,255,255,0.1); outline: none; }
.nav-links li a::after {
    content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%) scaleX(0);
    width: 60%; height: 2px; background: var(--color-teal); border-radius: 2px; transition: transform var(--transition);
}
.nav-links li a:hover::after { transform: translateX(-50%) scaleX(1); }
.nav-right { flex-shrink: 0; display: flex; align-items: center; gap: 10px; }
.btn-nav {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; background: var(--color-teal);
    color: #fff; border: none; border-radius: 24px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
    text-decoration: none; white-space: nowrap; letter-spacing: 0.4px; transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0,201,177,0.35);
}
.btn-nav:hover { background: #00b8a0; transform: translateY(-1px); box-shadow: 0 4px 18px rgba(0,201,177,0.5); color: #fff; }
.hamburger-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-shrink: 0; z-index: 1001; }
.hamburger-btn span { display: block; width: 24px; height: 2.5px; background: #fff; margin: 5px 0; border-radius: 2px; transition: var(--transition); }

.main-container { max-width: var(--max-width); margin: 0 auto; padding: 20px 20px 32px; display: flex; gap: 24px; }
.content-area { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.sidebar { width: var(--sidebar-width); flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--nav-height) + 20px); align-self: flex-start; max-height: calc(100vh - var(--nav-height) - 40px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d0d5dd transparent; padding-right: 4px; }

.section-card { background: var(--color-card-bg); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); transition: var(--transition); }
.section-card:hover { box-shadow: var(--shadow-md); }
.section-title { font-size: 1.35rem; font-weight: 700; color: var(--color-deep-blue); margin-bottom: 18px; padding-bottom: 10px; border-bottom: 3px solid var(--color-teal); display: inline-block; letter-spacing: 0.5px; line-height: 1.3; }
.section-subtitle { font-size: 0.85rem; color: var(--color-text-light); margin-bottom: 16px; font-weight: 400; }

.hot-comics-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.comic-card { background: var(--color-white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); cursor: pointer; border: 1px solid transparent; display: flex; flex-direction: column; position: relative; }
.comic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--color-teal); }
.comic-card .comic-cover { position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: #eef0f5; flex-shrink: 0; }
.comic-card .comic-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.comic-card:hover .comic-cover img { transform: scale(1.06); }
.comic-card .comic-info { padding: 11px 12px 13px; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.comic-card .comic-info h3 { font-size: 0.9rem; font-weight: 700; color: var(--color-deep-blue); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.comic-card .comic-info .meta-row { font-size: 0.7rem; color: var(--color-text-light); display: flex; flex-wrap: wrap; gap: 4px 8px; line-height: 1.4; }
.comic-card .comic-info .meta-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.comic-type { display: inline-block; background: #e8f8f5; color: var(--color-dark-teal); font-size: 0.65rem; padding: 2px 8px; border-radius: 10px; font-weight: 600; align-self: flex-start; margin-top: 2px; }

.sidebar .section-card { padding: 18px; border-radius: var(--radius-md); }
.sidebar .section-title { font-size: 1.1rem; margin-bottom: 12px; padding-bottom: 8px; border-bottom-width: 2px; }
.rank-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); transition: var(--transition); cursor: pointer; background: #fafbfc; }
.rank-list li:hover { background: #f0fdf9; box-shadow: var(--shadow-sm); }
.rank-num { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; color: #fff; background: #b0b8c1; }
.rank-list li:nth-child(1) .rank-num { background: #e74c3c; }
.rank-list li:nth-child(2) .rank-num { background: #f39c12; }
.rank-list li:nth-child(3) .rank-num { background: #e67e22; }
.rank-cover { width: 44px; height: 58px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: #eef0f5; }
.rank-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 0.85rem; font-weight: 600; color: var(--color-deep-blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-meta { font-size: 0.7rem; color: var(--color-text-light); }

.stats-mini-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; text-align: center; }
.stat-mini-item { background: #f8fafb; border-radius: var(--radius-sm); padding: 12px 8px; border: 1px solid #eef1f4; }
.stat-val { font-size: 1.3rem; font-weight: 700; color: var(--color-dark-teal); }
.stat-label { font-size: 0.7rem; color: var(--color-text-light); margin-top: 3px; }
.stat-update-time { font-size: 0.68rem; color: #999; text-align: center; margin-top: 6px; }

.comment-list { list-style: none; display: flex; flex-direction: column; gap: 12px; max-height: 520px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d0d5dd transparent; padding-right: 2px; }
.comment-item { padding: 12px 14px; background: #fafcfd; border-radius: var(--radius-sm); border-left: 3px solid var(--color-teal); font-size: 0.82rem; color: #444; line-height: 1.5; transition: var(--transition); }
.comment-item:hover { background: #f5faf8; border-left-color: var(--color-dark-teal); }
.comment-user { font-weight: 600; font-size: 0.75rem; color: var(--color-dark-teal); margin-bottom: 3px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud .tag { display: inline-block; padding: 6px 14px; background: #f0f5f9; color: var(--color-dark-teal); border-radius: 18px; font-size: 0.78rem; font-weight: 500; cursor: pointer; transition: var(--transition); text-decoration: none; border: 1px solid transparent; }
.tag-cloud .tag:hover { background: var(--color-teal); color: #fff; border-color: var(--color-teal); box-shadow: 0 2px 8px rgba(0,201,177,0.3); }

.advantage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.advantage-item { text-align: center; padding: 20px 14px; background: #fafdfc; border-radius: var(--radius-md); transition: var(--transition); border: 1px solid transparent; }
.advantage-item:hover { border-color: var(--color-teal); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.advantage-item .adv-icon-wrap { width: 50px; height: 50px; margin: 0 auto 10px; background: linear-gradient(135deg, #e6f9f6 0%, #d0f5ee 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--color-dark-teal); font-weight: 700; }
.advantage-item h4 { font-size: 0.9rem; color: var(--color-deep-blue); margin: 0 0 4px; font-weight: 700; }
.advantage-item p { font-size: 0.75rem; color: var(--color-text-light); line-height: 1.4; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; transition: var(--transition); background: #fafcfd; }
.faq-item summary { padding: 14px 18px; font-weight: 600; cursor: pointer; font-size: 0.9rem; color: var(--color-deep-blue); list-style: none; display: flex; justify-content: space-between; align-items: center; letter-spacing: 0.3px; user-select: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.2rem; font-weight: 700; color: var(--color-teal); transition: transform var(--transition); flex-shrink: 0; margin-left: 12px; }
.faq-item[open] summary::after { content: '\2212'; transform: rotate(180deg); }
.faq-item .faq-answer { padding: 0 18px 14px; font-size: 0.82rem; color: #555; line-height: 1.6; }

.app-download-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.app-dl-card { display: flex; align-items: center; gap: 10px; padding: 16px; background: #fafdfc; border-radius: var(--radius-md); border: 1px solid var(--color-border); cursor: pointer; transition: var(--transition); text-decoration: none; color: inherit; }
.app-dl-card:hover { border-color: var(--color-teal); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.app-dl-card .app-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #f0f4f8; }
.app-dl-card .app-icon img { width: 28px; height: 28px; object-fit: contain; display: block; }
.app-dl-info { flex: 1; min-width: 0; }
.dl-platform { font-weight: 700; font-size: 0.9rem; color: var(--color-deep-blue); }
.dl-hint { font-size: 0.7rem; color: var(--color-text-light); }

.character-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.character-card { background: #fafdfc; border-radius: var(--radius-md); padding: 18px 14px; text-align: center; border: 1px solid var(--color-border); transition: var(--transition); }
.character-card:hover { border-color: var(--color-teal); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.character-card .char-avatar { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; margin: 0 auto 10px; background: #eef0f5; border: 3px solid #e8f8f5; }
.character-card .char-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.character-card h4 { font-size: 0.9rem; font-weight: 700; color: var(--color-deep-blue); margin: 0 0 3px; }
.char-role { font-size: 0.72rem; color: var(--color-teal); font-weight: 600; }
.character-card p { font-size: 0.73rem; color: var(--color-text-light); margin: 4px 0 0; line-height: 1.4; }

.footer-nav { width: 100%; background: var(--color-deep-blue); color: rgba(255,255,255,0.8); padding: 32px 24px 20px; margin-top: 20px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 10px; font-weight: 700; letter-spacing: 0.4px; }
.footer-col a { display: block; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.8rem; padding: 3px 0; transition: var(--transition); letter-spacing: 0.3px; }
.footer-col a:hover { color: var(--color-teal); }
.footer-bottom { max-width: var(--max-width); margin: 16px auto 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.15); text-align: center; font-size: 0.75rem; color: rgba(255,255,255,0.55); letter-spacing: 0.3px; }
.footer-bottom a { color: var(--color-teal); text-decoration: none; font-weight: 500; margin: 0 6px; }

@media (max-width: 1200px) {
    .hot-comics-grid { grid-template-columns: repeat(4, 1fr); }
    .sidebar { width: 300px; }
    .advantage-grid { grid-template-columns: repeat(3, 1fr); }
    .app-download-grid { grid-template-columns: repeat(2, 1fr); }
    .character-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .main-container { flex-direction: column; padding: 14px 12px 24px; }
    .sidebar { width: 100%; position: static; max-height: none; overflow-y: visible; }
    .hot-comics-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; width: 100%; background: var(--color-deep-blue); flex-direction: column; padding: 10px 16px; gap: 2px; box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 999; }
    .nav-links.show { display: flex; }
    .hamburger-btn { display: block; }
    .top-nav { padding: 0 14px; }
    .btn-nav { padding: 7px 15px; font-size: 0.8rem; }
    .section-card { padding: 16px; }
    .comment-list { max-height: 360px; }
}
@media (max-width: 600px) {
    .hot-comics-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .advantage-grid { grid-template-columns: 1fr 1fr; }
    .app-download-grid { grid-template-columns: 1fr 1fr; }
    .character-grid { grid-template-columns: 1fr 1fr; }
    .footer-inner { flex-direction: column; gap: 16px; }
    .comment-list { max-height: 300px; }
}
