/* ===== 动漫周边 - 二次元文化社区样式 ===== */
/* 主色调: 橙色 #ff5722 (快讯风格强调色) */

:root {
  --accent-color: #ff5722;
  --accent-hover: #e64a19;
  --primary-dark: #1a1a2e;
  --secondary-dark: #16213e;
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #999;
  --bg-white: #fff;
  --bg-light: #f5f5f5;
  --border-color: #e0e0e0;
  --live-color: #4caf50;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-light);
}

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

ul {
  list-style: none;
}

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

/* ===== Header ===== */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-color), #ff8a65);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}

.nav {
  display: flex;
  gap: 30px;
}

.nav a {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.3s;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-color);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-light);
  border-radius: 20px;
  padding: 6px 16px;
  width: 200px;
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  width: 100%;
}

.search-box button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-light);
}

/* ===== News Ticker ===== */
.ticker {
  background: var(--primary-dark);
  color: #fff;
  padding: 10px 0;
  overflow: hidden;
}

.ticker-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.ticker-label {
  background: var(--accent-color);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.ticker-content {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-text {
  display: inline-block;
  animation: ticker 20s linear infinite;
}

@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.ticker-item {
  display: inline-block;
  margin-right: 40px;
  opacity: 0.9;
}

.ticker-item:hover {
  opacity: 1;
  color: var(--accent-color);
}

/* ===== Main Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ===== Hero Section ===== */
.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.hero-main {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-image {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.hero-content {
  padding: 20px;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.hero-title:hover {
  color: var(--accent-color);
}

.hero-meta {
  display: flex;
  gap: 15px;
  color: var(--text-light);
  font-size: 13px;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ===== News List ===== */
.news-list {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.news-list-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.news-item:last-child {
  border-bottom: none;
}

.news-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  margin-top: 6px;
  flex-shrink: 0;
}

.news-indicator.live {
  background: var(--live-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.news-info {
  flex: 1;
}

.news-item-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-title:hover {
  color: var(--accent-color);
}

.news-time {
  font-size: 12px;
  color: var(--text-light);
}

/* ===== Section Grid ===== */
.section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.section-card {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.section-title {
  font-size: 16px;
  font-weight: 700;
}

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

.section-more:hover {
  color: var(--accent-color);
}

.article-link {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-link:last-child {
  border-bottom: none;
}

.article-link:hover {
  color: var(--accent-color);
}

.article-link::before {
  content: "•";
  color: var(--accent-color);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  background: var(--bg-white);
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-color);
}

.breadcrumb span {
  margin: 0 8px;
  color: var(--text-light);
}

.breadcrumb strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ===== Category Header ===== */
.category-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
  color: #fff;
  padding: 40px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.category-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.category-desc {
  font-size: 14px;
  opacity: 0.8;
}

/* ===== Filter Tabs ===== */
.filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  background: var(--bg-white);
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.filter-tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-light);
  color: var(--text-secondary);
  transition: all 0.3s;
}

.filter-tab:hover,
.filter-tab.active {
  background: var(--accent-color);
  color: #fff;
}

/* ===== Article List (Category Page) ===== */
.article-list {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.article-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s;
}

.article-item:hover {
  background: var(--bg-light);
}

.article-item:last-child {
  border-bottom: none;
}

.article-thumb {
  width: 180px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-title:hover {
  color: var(--accent-color);
}

.article-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.article-meta {
  display: flex;
  gap: 15px;
  font-size: 13px;
  color: var(--text-light);
  margin-top: auto;
}

.article-tag {
  background: var(--accent-color);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 30px 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 500;
}

.pagination a:hover {
  background: var(--accent-color);
  color: #fff;
}

.pagination .current {
  background: var(--accent-color);
  color: #fff;
}

/* ===== Article Detail ===== */
.article-detail {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 20px;
}

.article-header {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.article-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--live-color);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 15px;
}

.article-live-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.article-detail-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 15px;
}

.article-detail-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.article-featured-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 25px;
}

.article-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 20px;
}

.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 30px 0 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 25px 0 12px;
}

.article-body img {
  border-radius: 8px;
  margin: 20px 0;
}

/* ===== Live Updates ===== */
.live-updates {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 20px;
  margin: 25px 0;
}

.live-updates-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.update-item:last-child {
  border-bottom: none;
}

.update-time {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
  white-space: nowrap;
  min-width: 50px;
}

.update-content {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
}

.update-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-color);
  margin-top: 4px;
  flex-shrink: 0;
}

.update-indicator.new {
  background: var(--live-color);
}

/* ===== Related Articles ===== */
.related-section {
  margin-top: 30px;
}

.related-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.related-card {
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.related-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.related-card-title {
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Footer ===== */
.footer {
  background: var(--primary-dark);
  color: #fff;
  padding: 40px 0 20px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.footer-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.footer-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.footer-links a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  padding: 5px 0;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ===== 404 Page ===== */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-content {
  max-width: 500px;
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 20px;
}

.error-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
}

.error-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.error-btn {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.3s;
}

.error-btn:hover {
  background: var(--accent-hover);
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .section-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 15px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    gap: 20px;
  }

  .search-box {
    width: 150px;
  }

  .ticker {
    display: none;
  }

  .hero-image {
    height: 200px;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .article-item {
    flex-direction: column;
  }

  .article-thumb {
    width: 100%;
    height: 180px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .error-code {
    font-size: 80px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
  }

  .hero-content {
    padding: 15px;
  }

  .hero-title {
    font-size: 18px;
  }

  .article-detail {
    padding: 20px;
  }

  .article-detail-title {
    font-size: 22px;
  }

  .filter-tabs {
    flex-wrap: wrap;
  }

  .pagination a,
  .pagination span {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
  }
}
