/* ========================================
   动漫周边 - Newsletter 风格样式表
   www.ciyuanshop.cn
   ======================================== */

/* CSS 变量 */
:root {
  --accent-color: #ff6b9d;
  --accent-secondary: #c44569;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-dark: #2d3436;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-light: #b2bec3;
  --border-color: #dfe6e9;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --max-width: 800px;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 重置样式 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

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

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

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

ul, ol {
  list-style: none;
}

/* ========================================
   布局容器
   ======================================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 40px 0;
}

/* ========================================
   页头 Header
   ======================================== */

.site-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.logo span {
  color: var(--text-primary);
}

.header-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ========================================
   Newsletter 头部
   ======================================== */

.newsletter-header {
  text-align: center;
  padding: 48px 0 32px;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-bottom: 3px solid var(--accent-color);
}

.issue-badge {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.newsletter-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.newsletter-greeting {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ========================================
   内容摘要 (In This Issue)
   ======================================== */

.content-summary {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.content-summary h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9375rem;
}

.summary-item::before {
  content: "•";
  color: var(--accent-color);
  font-weight: bold;
}

.summary-item a {
  color: var(--text-primary);
}

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

/* ========================================
   特色故事 (Featured Story)
   ======================================== */

.featured-story {
  background: var(--bg-primary);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.featured-story:hover {
  box-shadow: var(--shadow-hover);
}

.featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.featured-content {
  padding: 28px;
}

.featured-label {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.featured-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.featured-title a {
  color: var(--text-primary);
}

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

.featured-excerpt {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

/* ========================================
   故事列表 (Story List)
   ======================================== */

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

.story-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 16px;
  transition: all 0.2s;
}

.story-item:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow);
}

.story-thumb {
  width: 120px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.story-content {
  flex: 1;
  min-width: 0;
}

.story-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}

.story-title a {
  color: var(--text-primary);
}

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

.story-meta {
  font-size: 0.8125rem;
  color: var(--text-light);
}

/* ========================================
   面包屑导航
   ======================================== */

.breadcrumb {
  padding: 16px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

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

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

.breadcrumb .current {
  color: var(--text-primary);
}

/* ========================================
   分类页面
   ======================================== */

.category-header {
  text-align: center;
  padding: 40px 0 32px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
}

.category-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.category-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 16px;
}

.category-stats {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* 期刊列表 */

.issue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.issue-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.issue-item:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow);
}

.issue-info h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.issue-info h3 a {
  color: var(--text-primary);
}

.issue-info h3 a:hover {
  color: var(--accent-color);
}

.issue-date {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.issue-count {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 4px 12px;
  border-radius: 12px;
}

/* ========================================
   分页
   ======================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.pagination a {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

.pagination .current {
  background: var(--accent-color);
  color: white;
  font-weight: 600;
}

.pagination .prev,
.pagination .next {
  padding: 0 16px;
}

/* ========================================
   文章页面
   ======================================== */

.article-header {
  text-align: center;
  padding: 32px 0;
}

.article-title {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.article-meta .separator {
  color: var(--text-light);
}

.article-featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 32px;
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.article-content {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 40px;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 32px 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 24px 0 12px;
}

.article-content p {
  margin-bottom: 16px;
}

.article-content ul,
.article-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content img {
  border-radius: var(--radius);
  margin: 24px 0;
}

/* 快速链接 */

.quick-links {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 32px;
}

.quick-links h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.quick-links ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.quick-links li {
  margin: 0;
}

.quick-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.quick-links a::before {
  content: "→";
  color: var(--accent-color);
}

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

/* ========================================
   推荐文章区块
   ======================================== */

.recommended-section {
  margin-top: 48px;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .section-grid {
    grid-template-columns: 1fr;
  }
}

.section-block {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 20px;
}

.section-block h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

.section-block ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-block li {
  font-size: 0.875rem;
}

.section-block a {
  color: var(--text-secondary);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* 横向推荐 */

.related-horizontal {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.related-horizontal h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.related-horizontal ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.related-horizontal li {
  font-size: 0.875rem;
}

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

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

/* ========================================
   订阅框
   ======================================== */

.subscribe-box {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-secondary) 100%);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: white;
  margin: 32px 0;
}

.subscribe-box h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.subscribe-box p {
  font-size: 0.9375rem;
  opacity: 0.9;
  margin-bottom: 20px;
}

.subscribe-form {
  display: flex;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.subscribe-form input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
}

.subscribe-form input::placeholder {
  color: var(--text-light);
}

.subscribe-form button {
  padding: 12px 24px;
  background: var(--bg-dark);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.subscribe-form button:hover {
  opacity: 0.9;
}

/* ========================================
   页脚
   ======================================== */

.site-footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 40px 0 24px;
  margin-top: auto;
}

.footer-inner {
  text-align: center;
}

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

.footer-links a {
  color: var(--text-light);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: white;
}

.footer-copyright {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.footer-copyright a {
  color: var(--text-light);
}

/* ========================================
   404 页面
   ======================================== */

.error-page {
  text-align: center;
  padding: 80px 20px;
}

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

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.error-message {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-secondary);
  color: white;
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 640px) {
  :root {
    --max-width: 100%;
  }

  .newsletter-title {
    font-size: 1.5rem;
  }

  .newsletter-greeting {
    font-size: 1rem;
  }

  .featured-content {
    padding: 20px;
  }

  .featured-title {
    font-size: 1.25rem;
  }

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

  .story-thumb {
    width: 100%;
    height: 160px;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .article-content {
    padding: 24px;
    font-size: 1rem;
  }

  .subscribe-form {
    flex-direction: column;
  }

  .error-code {
    font-size: 4rem;
  }

  .issue-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    flex-direction: column;
    gap: 8px;
  }

  .article-meta {
    flex-direction: column;
    gap: 8px;
  }

  .article-meta .separator {
    display: none;
  }
}
