/* 全局样式 */
:root {
  --primary-color: #FF6B6B;
  --secondary-color: #4ECDC4;
  --accent-color: #FFE66D;
  --text-color: #333;
  --text-light: #666;
  --text-lighter: #999;
  --bg-color: #fff;
  --bg-light: #f8f9fa;
  --bg-dark: #343a40;
  --border-color: #e9ecef;
  --border-radius: 8px;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--bg-light);
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
}

ul, ol {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section {
  padding: 50px 0;
}

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

.section-header h1,
.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-color);
  position: relative;
}

.section-header h1::after,
.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary-color);
}

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

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

/* 头部样式 */
.header {
  background-color: var(--bg-color);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
}

.logo a {
  display: flex;
  align-items: center;
}

.main-nav ul {
  display: flex;
}

.main-nav li {
  margin: 0 15px;
}

.main-nav a {
  font-size: 16px;
  font-weight: 500;
  padding: 10px 0;
  position: relative;
}

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

.main-nav a:hover::after {
  width: 100%;
}

.search-box {
  display: flex;
  align-items: center;
}

.search-box input {
  width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary-color);
}

.search-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background-color: #ff5252;
}

/* 轮播图样式 */
.banner {
  padding: 20px 0;
}

.slider-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.slider-wrapper {
  position: relative;
  height: 400px;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slide.active {
  opacity: 1;
}

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

.slide-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
}

.slide-info h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.5);
  margin: 0 5px;
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background-color: white;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: rgba(0,0,0,0.3);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-arrow:hover {
  background-color: rgba(0,0,0,0.6);
}

.slider-arrow.prev {
  left: 20px;
}

.slider-arrow.next {
  right: 20px;
}

/* 漫画卡片样式 */
.manga-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.manga-card {
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.manga-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.manga-cover {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.manga-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.manga-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: white;
}

.manga-tag.hot {
  background-color: #ff5252;
}

.manga-tag.new {
  background-color: #4caf50;
}

.manga-tag.complete {
  background-color: #2196f3;
}

.manga-info {
  padding: 15px;
}

.manga-info h3 {
  font-size: 16px;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manga-author, .manga-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 5px;
}

.manga-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 36px;
}

/* 最新更新样式 */
.manga-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.manga-item {
  display: flex;
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.manga-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.manga-item .manga-cover {
  width: 80px;
  height: 120px;
  flex-shrink: 0;
}

.manga-item .manga-info {
  flex-grow: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.update-info, .update-time {
  font-size: 12px;
  color: var(--text-lighter);
}

/* 分类样式 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.category-card {
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
}

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

.category-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.category-card p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 15px;
}

.category-link {
  display: inline-block;
  padding: 5px 15px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 14px;
  transition: var(--transition);
}

.category-link:hover {
  background-color: #ff5252;
  color: white;
}

/* 排行榜样式 */
.ranking-section {
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--box-shadow);
}

.tab-header {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  position: relative;
}

.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

.tab-content {
  position: relative;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ranking-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.ranking-item:hover {
  background-color: #f0f0f0;
}

.rank {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--text-lighter);
  color: white;
  border-radius: 50%;
  margin-right: 15px;
  font-weight: bold;
}

.rank-1 {
  background-color: #FFD700;
}

.rank-2 {
  background-color: #C0C0C0;
}

.rank-3 {
  background-color: #CD7F32;
}

.ranking-item .manga-cover {
  width: 60px;
  height: 80px;
  margin-right: 15px;
}

.manga-stats {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: var(--text-lighter);
}

.views::before {
  content: '👁️ ';
}

.likes::before {
  content: '❤️ ';
}

/* APP下载样式 */
.app-download {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.app-content {
  display: flex;
  align-items: center;
}

.app-info {
  flex: 1;
  padding: 30px;
}

.app-info h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.app-slogan {
  font-size: 18px;
  margin-bottom: 20px;
  opacity: 0.9;
}

.app-features {
  margin-bottom: 30px;
}

.app-features li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.icon-check {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: rgba(255,255,255,0.2);
  border-radius: 50%;
  margin-right: 10px;
  position: relative;
}

.icon-check::before {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
}

.app-download-btns {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.download-btn {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background-color: rgba(255,255,255,0.2);
  border-radius: 25px;
  color: white;
  font-weight: 500;
  transition: var(--transition);
}

.download-btn:hover {
  background-color: rgba(255,255,255,0.3);
  color: white;
}

.icon-android, .icon-apple {
  margin-right: 8px;
}

.qr-code {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-code img {
  width: 100px;
  height: 100px;
  background-color: white;
  padding: 5px;
  border-radius: 5px;
  margin-bottom: 5px;
}

.app-preview {
  flex: 1;
  display: flex;
  justify-content: center;
}

.app-screenshot {
  max-height: 500px;
  transform: perspective(800px) rotateY(-15deg);
  box-shadow: 10px 10px 20px rgba(0,0,0,0.2);
  border-radius: 20px;
}

/* 漫画资讯样式 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 30px;
}

.news-card {
  display: flex;
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-image {
  width: 200px;
  flex-shrink: 0;
}

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

.news-content {
  flex-grow: 1;
  padding: 20px;
}

.news-content h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.news-excerpt {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-lighter);
}

/* 页脚样式 */
.footer {
  background-color: var(--bg-dark);
  color: white;
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-column h3 {
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
}

.about-us p {
  margin-bottom: 20px;
  opacity: 0.8;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--primary-color);
  color: white;
}

.quick-links ul li {
  margin-bottom: 10px;
}

.quick-links a {
  color: rgba(255,255,255,0.8);
  transition: var(--transition);
}

.quick-links a:hover {
  color: white;
  padding-left: 5px;
}

.contact-info ul li {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  opacity: 0.8;
}

.contact-info i {
  margin-right: 10px;
  opacity: 0.6;
}

.footer-column.app-download .download-qr {
  margin-bottom: 15px;
}

.footer-column.app-download .download-links {
  display: flex;
  gap: 10px;
}

.footer-column.app-download .download-btn {
  background-color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
}

.copyright {
  text-align: center;
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 20px;
}

.friendly-links {
  margin-top: 20px;
}

.friendly-links h4 {
  font-size: 16px;
  margin-bottom: 10px;
}

.friendly-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.friendly-links a {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  transition: var(--transition);
}

.friendly-links a:hover {
  color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .app-content {
    flex-direction: column;
  }
  
  .app-preview {
    margin-top: 30px;
  }
  
  .app-screenshot {
    transform: none;
    max-width: 80%;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
  }
  
  .logo {
    margin-bottom: 15px;
  }
  
  .main-nav {
    margin: 15px 0;
    width: 100%;
    overflow-x: auto;
  }
  
  .main-nav ul {
    width: max-content;
  }
  
  .search-box {
    width: 100%;
    margin-top: 15px;
  }
  
  .search-box input {
    flex-grow: 1;
  }
  
  .slider-wrapper {
    height: 300px;
  }
  
  .manga-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  
  .manga-cover {
    height: 200px;
  }
  
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  
  .news-card {
    flex-direction: column;
  }
  
  .news-image {
    width: 100%;
    height: 200px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 30px 0;
  }
  
  .slider-wrapper {
    height: 200px;
  }
  
  .slide-info h2 {
    font-size: 18px;
  }
  
  .manga-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .manga-list {
    grid-template-columns: 1fr;
  }
  
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .app-download-btns {
    flex-direction: column;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.manga-card, .manga-item, .category-card, .news-card {
  animation: fadeIn 0.5s ease forwards;
}

.manga-card:nth-child(2) { animation-delay: 0.1s; }
.manga-card:nth-child(3) { animation-delay: 0.2s; }
.manga-card:nth-child(4) { animation-delay: 0.3s; }
.manga-card:nth-child(5) { animation-delay: 0.4s; }
.manga-card:nth-child(6) { animation-delay: 0.5s; }

/* 图标样式 */
.icon-weibo, .icon-wechat, .icon-qq, .icon-douyin {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.icon-weibo::before { content: '微'; }
.icon-wechat::before { content: '微'; }
.icon-qq::before { content: 'Q'; }
.icon-douyin::before { content: '抖'; }

.icon-email::before { content: '✉'; margin-right: 5px; }
.icon-phone::before { content: '☎'; margin-right: 5px; }
.icon-location::before { content: '⌖'; margin-right: 5px; }
.icon-time::before { content: '⏱'; margin-right: 5px; }

/* 透明轮播背景 */
.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
  z-index: -1;
}

/* 页面半透明装饰元素 */
.main-content::before {
  content: '';
  position: fixed;
  top: 20%;
  right: -150px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.1), transparent 70%);
  z-index: -1;
}

.main-content::after {
  content: '';
  position: fixed;
  bottom: 10%;
  left: -150px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.1), transparent 70%);
  z-index: -1;
}
