/* 漫画社 - 全局样式 */
:root {
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --primary-dark: #7c3aed;
  --bg-dark: #0a0a18;
  --bg-card: #1a1a35;
  --bg-card-light: #1c1c3e;
  --bg-section: #14142e;
  --border-color: #2d2d55;
  --text-primary: #f0f0ff;
  --text-secondary: #d0d0e8;
  --text-muted: #8888aa;
  --gradient-main: linear-gradient(135deg, #0a0a18 0%, #14142a 100%);
  --gradient-btn: linear-gradient(135deg, #7c3aed, #6d28d9);
  --gradient-btn-hover: linear-gradient(135deg, #8b5cf6, #7c3aed);
  --shadow-card: 0 10px 30px rgba(139, 92, 246, 0.2);
  --glass-bg: rgba(26, 26, 53, 0.7);
  --glass-border: rgba(139, 92, 246, 0.2);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-dark);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--gradient-main);
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

body::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: rgba(13, 13, 32, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(13, 13, 32, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
  background: linear-gradient(135deg, #f0f0ff, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  cursor: pointer;
}

.logo span {
  color: var(--primary-light);
  background: linear-gradient(135deg, #a78bfa, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

nav a {
  color: var(--text-secondary);
  font-size: 15px;
  padding: 5px 0;
  border-bottom: 2px solid transparent;
  position: relative;
  transition: all 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--primary-light);
  border-bottom-color: transparent;
  text-decoration: none;
}

nav a:hover::after {
  width: 100%;
}

nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Main */
main {
  padding: 30px 0;
  animation: fadeInUp 0.6s ease;
}

section {
  margin-bottom: 50px;
  position: relative;
}

h2 {
  font-size: 28px;
  color: var(--text-primary);
  margin-bottom: 25px;
  position: relative;
  padding-left: 15px;
  background: linear-gradient(135deg, #f0f0ff, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

h3 {
  font-size: 20px;
  color: var(--text-primary);
  margin: 20px 0 15px;
  transition: color 0.3s ease;
}

/* 热门漫画 */
.comic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.comic-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  animation: fadeInUp 0.5s ease;
  animation-fill-mode: both;
}

.comic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
  transition: left 0.5s ease;
}

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

.comic-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-card);
  border-color: var(--primary);
}

.comic-card img {
  width: 100%;
  height: 310px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.comic-info {
  padding: 15px;
  background: linear-gradient(to top, rgba(10, 10, 24, 0.9), transparent);
}

.comic-info h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--text-primary);
  font-weight: 600;
}

.comic-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 4px 0;
  line-height: 1.4;
}

.comic-type {
  display: inline-block;
  background: rgba(139, 92, 246, 0.2);
  color: var(--primary-light);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  margin-top: 8px;
  margin-right: 5px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: all 0.3s ease;
}

.comic-type:hover {
  background: rgba(139, 92, 246, 0.3);
  transform: scale(1.05);
}

/* 精品推荐 */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.featured-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.5s ease;
  animation-fill-mode: both;
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: var(--primary);
}

.featured-card img {
  width: 150px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.featured-card:hover img {
  transform: scale(1.03);
}

.featured-info h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.featured-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

/* 介绍区域 */
.intro-section {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.intro-section:hover {
  border-color: var(--primary);
}

.intro-section p {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.intro-section h3 {
  color: var(--primary-light);
  font-size: 22px;
  margin-top: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

/* 角色 */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.character-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.5s ease;
  animation-fill-mode: both;
}

.character-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: var(--primary);
}

.character-card img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 15px;
  border: 3px solid var(--primary);
  transition: all 0.4s ease;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.character-card:hover img {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.character-card h3 {
  color: var(--text-primary);
  margin: 0 0 5px;
  font-size: 18px;
}

.character-card .role {
  color: var(--primary-light);
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 500;
}

.character-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 平台介绍 */
.platform-section {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.platform-section:hover {
  border-color: var(--primary);
}

.platform-section p {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.8;
}

.platform-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.feature-item {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease;
  animation-fill-mode: both;
}

.feature-item:hover {
  background: rgba(139, 92, 246, 0.15);
  transform: translateY(-3px);
  border-color: var(--primary);
}

.feature-item h3 {
  margin: 0 0 10px;
  color: var(--primary-light);
  font-size: 18px;
}

.feature-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* APP下载 */
.app-download {
  background: linear-gradient(135deg, rgba(26, 26, 53, 0.9), rgba(20, 20, 46, 0.9));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 50px 40px;
  text-align: center;
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.app-download::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
}

.app-download h2 {
  text-align: center;
  padding-left: 0;
  font-size: 32px;
}

.app-download h2::before {
  display: none;
}

.app-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  background: var(--gradient-btn);
  color: #ffffff;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn::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 ease;
}

.btn:hover {
  background: var(--gradient-btn-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
  text-decoration: none;
}

.btn:hover::before {
  left: 100%;
}

/* 评论 */
.comment-list {
  display: grid;
  gap: 20px;
}

.comment-item {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease;
  animation-fill-mode: both;
}

.comment-item:hover {
  border-color: var(--primary);
  transform: translateX(5px);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.comment-user {
  color: var(--primary-light);
  font-weight: 600;
  font-size: 15px;
}

.comment-time {
  color: var(--text-muted);
  font-size: 14px;
}

.comment-content {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* 侧边栏 */
.sidebar-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}

.main-content {
  min-width: 0;
}

.sidebar {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 18px;
}

.rank-list {
  list-style: none;
}

.rank-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(45, 45, 85, 0.5);
  font-size: 14px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.rank-list li:hover {
  color: var(--primary-light);
  padding-left: 10px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
}

.rank-num {
  display: inline-block;
  width: 25px;
  height: 25px;
  background: var(--gradient-btn);
  color: #fff;
  text-align: center;
  line-height: 25px;
  border-radius: 6px;
  font-size: 13px;
  margin-right: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.stats-box {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.stats-box:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--primary);
}

.stats-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-light);
  font-family: 'Courier New', monospace;
}

.stats-label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 底部 */
footer {
  background: rgba(10, 10, 24, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: 50px;
  position: relative;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 30px;
}

.footer-links a {
  color: var(--primary-light);
  font-size: 14px;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: #c4b5fd;
  transform: translateY(-2px);
}

.footer-info {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 2;
}

.footer-info a {
  color: var(--primary-light);
  transition: color 0.3s ease;
}

.footer-info a:hover {
  color: #c4b5fd;
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* 滚动动画 */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 15px;
  }
  
  nav {
    justify-content: center;
    gap: 12px;
  }
  
  nav a {
    font-size: 14px;
  }
  
  .comic-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .comic-card img {
    height: 220px;
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .featured-card {
    flex-direction: column;
  }
  
  .featured-card img {
    width: 100%;
    height: 200px;
  }
  
  .sidebar-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
    margin-top: 30px;
  }
  
  .intro-section, .platform-section {
    padding: 25px;
  }
  
  .character-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
  }
  
  .character-card img {
    width: 120px;
    height: 120px;
  }
  
  h2 {
    font-size: 22px;
  }
  
  .app-download {
    padding: 30px 20px;
  }
  
  .app-download h2 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .app-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .comic-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .comic-card img {
    height: 180px;
  }
  
  .comic-info {
    padding: 10px;
  }
  
  .comic-info h3 {
    font-size: 16px;
  }
  
  .comic-info p {
    font-size: 12px;
  }
  
  .featured-card {
    padding: 15px;
  }
  
  .comment-item {
    padding: 15px;
  }
  
  .comment-header {
    flex-direction: column;
    gap: 5px;
  }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-dark: #0a0a18;
    --bg-card: #1a1a35;
    --bg-card-light: #1c1c3e;
    --bg-section: #14142e;
    --border-color: #2d2d55;
    --text-primary: #f0f0ff;
    --text-secondary: #d0d0e8;
    --text-muted: #8888aa;
  }
}

/* 打印样式 */
@media print {
  header, footer, .sidebar, .app-download, nav {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
  
  section {
    margin-bottom: 20px;
  }
}