:root {
  --pink: #FF6B9D;
  --orange-pink: #FF8C42;
  --berry: #D63A6A;
  --bg-light: #FFF5F8;
  --white: #FFFFFF;
  --text-main: #333333;
  --text-gray: #777777;
  --shadow-pink: 0 4px 12px rgba(255, 107, 157, 0.12);
  --shadow-pink-hover: 0 8px 20px rgba(255, 107, 157, 0.25);
  --radius-lg: 12px;
  --radius-md: 8px;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 顶部导航 */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  height: 64px;
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 18px;
  color: var(--berry);
}

.brand img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 15px;
  color: var(--text-main);
}

.nav-links a:hover {
  color: var(--pink);
}

.search-box {
  display: flex;
  align-items: center;
  border: 2px solid var(--orange-pink);
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
}

.search-box input {
  border: none;
  outline: none;
  padding: 6px 12px;
  font-size: 14px;
  width: 180px;
}

.search-box button {
  background: var(--orange-pink);
  color: var(--white);
  border: none;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}

/* 拼接 Banner 区 */
.banner-section {
  margin-bottom: 40px;
  margin-top: 16px;
}

.bento-grid {
  display: grid;
  grid-template-columns: 520px 1fr;
  grid-template-rows: 140px 140px;
  gap: 12px;
  height: 292px;
}

.bento-main {
  grid-row: 1 / 3;
  grid-column: 1 / 2;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-pink);
}

.bento-side {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-pink);
}

.bento-side-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.bento-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: var(--white);
}

.bento-title {
  font-size: 16px;
  font-weight: bold;
}

.bento-main .bento-title {
  font-size: 24px;
  margin-bottom: 8px;
}

.bento-dots {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.bento-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}

.bento-dots span.active {
  background: var(--pink);
  width: 16px;
  border-radius: 4px;
}

/* 分类栏与专题版块 */
.category-bar {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 24px;
  scrollbar-width: none;
}
.category-bar::-webkit-scrollbar {
  display: none;
}

.category-tag {
  padding: 8px 20px;
  background: var(--white);
  border-radius: 20px;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: var(--shadow-pink);
  cursor: pointer;
  transition: all 0.2s;
}

.category-tag.active {
  background: var(--pink);
  color: var(--white);
  font-weight: bold;
}

.topic-banner {
  background-color: #FFE5ED;
  background-image: linear-gradient(135deg, #FFF0F5 0%, #FFE5ED 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.topic-badge {
  background: #FF3B3B;
  color: var(--white);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 12px;
}

.topic-title {
  font-size: 28px;
  font-weight: bold;
  color: var(--berry);
  margin-bottom: 8px;
}

.topic-subtitle {
  color: var(--text-gray);
  margin-bottom: 20px;
}

.topic-btn {
  background: linear-gradient(90deg, var(--pink), var(--orange-pink));
  color: var(--white);
  padding: 10px 24px;
  border-radius: 20px;
  font-weight: bold;
  transition: transform 0.2s, box-shadow 0.2s;
}

.topic-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

/* 核心双列布局 */
.main-content-layout {
  display: flex;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 40px;
}

.left-sections {
  flex: 1;
  min-width: 0;
}

.right-sidebar {
  width: 300px;
  flex-shrink: 0;
}

.section-block {
  margin-bottom: 32px;
}

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

.section-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-main);
  display: flex;
  align-items: center;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--pink);
  margin-right: 8px;
  border-radius: 2px;
}

.more-link {
  font-size: 13px;
  color: var(--text-gray);
}

.more-link:hover {
  color: var(--pink);
}

.comic-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.comic-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
  cursor: pointer;
}

.comic-card:hover {
  transform: translateY(-4px);
}

.comic-cover-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-pink);
}

.comic-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comic-chapter-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: var(--white);
  font-size: 12px;
  padding: 4px 8px;
  text-align: center;
}

.comic-info {
  margin-top: 8px;
}

.comic-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.comic-update {
  font-size: 12px;
  color: var(--text-gray);
}

/* 右侧排行榜 */
.ranking-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-pink);
  position: sticky;
  top: 84px;
}

.ranking-list li {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #F0F0F0;
  cursor: pointer;
}

.ranking-list li:last-child {
  border-bottom: none;
}

.rank-num {
  width: 24px;
  font-size: 16px;
  font-weight: bold;
  font-style: italic;
  margin-right: 12px;
  text-align: center;
}

.rank-1 { color: #FF3B3B; }
.rank-2 { color: #FF8C42; }
.rank-3 { color: #FFC107; }
.rank-other { color: #CCCCCC; }

.rank-info {
  flex: 1;
  overflow: hidden;
}

.rank-name {
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-author {
  font-size: 12px;
  color: var(--text-gray);
}

/* 下半部全宽区域 */
.full-section {
  width: 100%;
  margin-bottom: 40px;
}

.global-rank-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-pink);
}

.tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  border-bottom: 1px solid #F0F0F0;
  padding-bottom: 12px;
}

.tab-item {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-gray);
  cursor: pointer;
  position: relative;
}

.tab-item.active {
  color: var(--pink);
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--pink);
}

.rank-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.rank-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-item.top-3 .rank-thumb {
  width: 40px;
  height: 56px;
  border-radius: 4px;
  object-fit: cover;
}

.rank-item .rank-num {
  width: 20px;
  margin-right: 0;
}

.rank-item-text {
  font-size: 14px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 原创精品 */
.original-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.original-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-pink);
  transition: transform 0.2s;
  cursor: pointer;
}

.original-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-pink-hover);
}

.original-cover {
  position: relative;
  aspect-ratio: 3 / 4;
}

.original-cover img {
  width: 100%;
  height: 100%;
}

.original-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--berry);
  color: var(--white);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
}

.original-info {
  padding: 12px;
}

.original-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 4px;
}

.original-tags {
  font-size: 12px;
  color: var(--text-gray);
  margin-bottom: 8px;
}

.original-desc {
  font-size: 13px;
  color: var(--text-gray);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 互动投票 */
.vote-box {
  background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--white);
}

.vote-box h2 {
  margin-bottom: 24px;
  font-size: 22px;
}

.vote-item {
  margin-bottom: 20px;
  cursor: pointer;
}

.vote-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: bold;
}

.vote-bar-bg {
  height: 12px;
  background: rgba(255,255,255,0.3);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.vote-bar-fill {
  height: 100%;
  background: var(--white);
  border-radius: 6px;
  transition: width 0.4s ease-out;
}

.vote-bar-fill.active {
  background: linear-gradient(90deg, #FF6B9D, #D63A6A);
}

/* 大家都在说 */
.community-layout {
  display: flex;
  gap: 24px;
}

.comment-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-pink);
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.comment-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFD1DF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--berry);
  font-weight: bold;
  font-size: 14px;
}

.comment-name {
  font-size: 14px;
  font-weight: bold;
}

.comment-stars {
  color: #FFC107;
  font-size: 14px;
  letter-spacing: 2px;
}

.comment-content {
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 12px;
}

.comment-actions {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-gray);
}

.community-sidebar {
  width: 260px;
  flex-shrink: 0;
}

.sidebar-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-pink);
  margin-bottom: 16px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F0F0F0;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-tag {
  background: #FFF0F5;
  color: var(--berry);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
}

.super-comment {
  font-size: 13px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #F0F0F0;
}

.super-comment:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.super-comment-name {
  color: var(--pink);
  font-weight: bold;
  margin-bottom: 4px;
}

/* 常见问题 FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.faq-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pink);
  overflow: hidden;
}

.faq-question {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.faq-icon {
  font-size: 20px;
  color: var(--pink);
  transition: transform 0.3s;
}

.faq-card.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 16px 16px;
  font-size: 14px;
  color: var(--text-gray);
  display: none;
}

.faq-card.active .faq-answer {
  display: block;
}

/* 多端下载 */
.download-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 0;
  text-align: center;
  box-shadow: var(--shadow-pink);
  margin-bottom: 40px;
}

.phone-mocks {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.phone-outer {
  width: 140px;
  height: 280px;
  background: #333;
  border-radius: 20px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.phone-inner {
  width: 100%;
  height: 100%;
  background: var(--bg-light);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.phone-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dl-btn {
  padding: 10px 32px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: bold;
  transition: all 0.2s;
}

.dl-btn-outline {
  border: 2px solid var(--pink);
  color: var(--pink);
  background: transparent;
}

.dl-btn-outline:hover {
  background: var(--pink);
  color: var(--white);
}

.dl-btn-solid {
  background: var(--pink);
  color: var(--white);
  border: 2px solid var(--pink);
}

.dl-btn-solid:hover {
  background: var(--berry);
  border-color: var(--berry);
}

/* 合作商 */
.partner-section {
  margin-bottom: 40px;
}

.partner-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.partner-card {
  flex: 1;
  min-width: 120px;
  background: #FDF3F6;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  color: var(--text-gray);
  font-size: 14px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.partner-card:hover {
  background: var(--white);
  border-color: var(--pink);
  box-shadow: var(--shadow-pink);
  color: var(--pink);
}

/* 深色页脚 */
.footer {
  background: #4A1A2E;
  color: #E0C0CC;
  padding: 48px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 14px;
  color: #E0C0CC;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 13px;
  color: #A87A8A;
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 600px;
  max-width: 90%;
  display: flex;
  gap: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-gray);
}

.modal-cover {
  width: 160px;
  height: 220px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.modal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.modal-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 8px;
}

.modal-chapter {
  background: #FFF0F5;
  color: var(--berry);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  display: inline-block;
  margin-bottom: 16px;
  align-self: flex-start;
}

.modal-tip {
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 16px;
}

.copy-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.copy-box input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #E0E0E0;
  border-radius: 4px;
  outline: none;
  font-size: 14px;
  background: #F9F9F9;
}

.copy-btn {
  background: var(--pink);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.copy-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  display: none;
}

/* 底部悬浮栏 (移动端) */
.mobile-bottom-bar {
  display: none;
}

/* 响应式 */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 200px;
    height: 412px;
  }
  .bento-main {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
  }
  .bento-side-grid {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
  }
  .comic-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .main-content-layout {
    flex-direction: column;
  }
  .right-sidebar {
    width: 100%;
  }
  .ranking-box {
    position: static;
  }
  .original-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .community-layout {
    flex-direction: column;
  }
  .community-sidebar {
    width: 100%;
  }
  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .search-box input {
    width: 120px;
  }
  .comic-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .original-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .rank-list-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .top-nav {
    height: 56px;
  }
  .search-box {
    flex: 1;
    margin-left: 12px;
  }
  .search-box input {
    width: 100%;
  }
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 160px 120px;
    height: 292px;
    gap: 8px;
  }
  .bento-main {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
  }
  .bento-side-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .bento-main .bento-title {
    font-size: 18px;
  }
  .comic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .topic-banner {
    padding: 20px;
  }
  .topic-title {
    font-size: 22px;
  }
  .modal-content {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }
  .modal-cover {
    width: 100%;
    height: 200px;
  }
  .phone-outer {
    width: 120px;
    height: 240px;
  }
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(255, 107, 157, 0.15);
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 200;
  }
  .bar-text {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-main);
  }
  .bar-text span:first-child {
    font-size: 16px;
    color: var(--berry);
  }
  .bar-btn {
    background: linear-gradient(90deg, var(--pink), var(--orange-pink));
    color: var(--white);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 15px;
  }
  body {
    padding-bottom: 64px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .download-buttons {
    gap: 12px;
  }
  .dl-btn {
    padding: 8px 24px;
    font-size: 14px;
  }
}