:root {
  --primary: #7c5cfc;
  --primary-light: #ede9fe;
  --primary-dark: #5b3fd4;
  --text: #1a1a2e;
  --text-secondary: #8b8b9a;
  --border: #f0f0f5;
  --bg: #f5f5fa;
  --white: #ffffff;
  --shadow: 0 2px 12px rgba(124, 92, 252, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, #7c5cfc 0%, #5b3fd4 100%);
  color: var(--white);
  padding: 16px 20px 24px;
  position: relative;
  overflow: hidden;
}

.app-header::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.app-header::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: 30%;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo .icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.header-logo h1 {
  font-size: 18px;
  font-weight: 600;
}

.header-subtitle {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

/* Container */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Card Section */
.section-card {
  background: var(--white);
  border-radius: 16px;
  margin: -12px 16px 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 12px 10px;
}

.list-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  background: #f4f1ff;
  border-radius: 999px;
}

.list-tab {
  flex: 0 1 auto;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: #8a84a8;
  white-space: nowrap;
  padding: 7px 12px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.list-tab:active {
  transform: scale(0.98);
}

.list-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #7c5cfc 0%, #5b3fd4 100%);
  box-shadow: 0 4px 10px rgba(124, 92, 252, 0.32);
}

a.article-item {
  color: inherit;
}

.live-badge {
  color: #e53935 !important;
  background: #fdecea !important;
}

/* Article List */
.article-list {
  list-style: none;
}

.article-item {
  display: flex;
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  cursor: pointer;
  position: relative;
}

.article-item:last-child {
  border-bottom: none;
}

.article-item:active {
  background: #fafafe;
}

.article-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 12px;
}

.article-icon svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.article-icon img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.article-content {
  flex: 1;
  min-width: 0;
}

.article-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.article-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.article-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--primary);
}

.stat-item svg {
  width: 14px;
  height: 14px;
}

.article-arrow {
  color: #ccc;
  font-size: 18px;
  margin-left: 8px;
  flex-shrink: 0;
  align-self: center;
}

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  padding: 10px 12px 14px;
  overflow: hidden;
}

.page-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--primary);
  background: var(--primary-light);
  border: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.page-btn.disabled {
  color: #c5c5d0;
  background: #f3f3f7;
}

.page-status {
  flex: 0 0 auto;
  min-width: 36px;
  padding: 0 2px;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.page-jump {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
  flex: 0 0 auto;
}

.page-input {
  width: 36px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text);
  background: var(--white);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.page-input[type="number"] {
  -moz-appearance: textfield;
}

.page-input::-webkit-outer-spin-button,
.page-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.page-go {
  padding: 0 8px;
}

@media (min-width: 768px) {
  .pagination {
    justify-content: center;
    padding-bottom: 18px;
    gap: 6px;
  }
}

/* Detail Page */
.detail-header {
  background: var(--white);
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 16px;
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}

.detail-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.detail-info .stat-item {
  font-size: 13px;
}

.detail-body {
  background: var(--white);
  padding: 20px 16px;
  min-height: 300px;
}

.detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.detail-body p {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.8;
}

.detail-body ul, .detail-body ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.detail-body li {
  margin-bottom: 6px;
  font-size: 15px;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 4px;
}

.game-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Daily digest cards */
.digest-page .detail-title {
  color: #e74c5c;
}

.digest-page .game-tags {
  display: none;
}

.digest-page .detail-body {
  background: #f7f8fb;
}

.digest-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.digest-card {
  display: block;
  background: var(--white);
  border-radius: 14px;
  padding: 16px 18px 14px;
  box-shadow: 0 6px 18px rgba(28, 36, 56, 0.06);
  color: inherit;
}

.digest-title {
  font-size: 16px;
  font-weight: 700;
  color: #4d7cff;
  line-height: 1.45;
  margin-bottom: 8px;
}

.digest-desc {
  font-size: 14px;
  color: #8a8f9c;
  line-height: 1.75;
}

a.digest-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: #4d7cff;
  font-weight: 500;
  text-decoration: none;
}

a.digest-more:hover,
a.digest-more:active {
  text-decoration: underline;
}

.notice-linkonly .notice-origin-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 8px;
}

.notice-linkonly .notice-origin-time {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* PC responsive */
@media (min-width: 768px) {
  .container {
    max-width: 800px;
    padding: 0 24px;
  }

  .section-card {
    margin: -12px auto 24px;
    max-width: 800px;
  }

  .app-header {
    padding: 24px 0 32px;
  }

  .header-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
  }

  .header-logo h1 {
    font-size: 22px;
  }

  .list-tab {
    font-size: 14px;
    padding: 8px 16px;
  }

  .article-item {
    padding: 18px 20px;
  }

  .article-item:hover {
    background: #fafafe;
  }

  .detail-wrap {
    max-width: 800px;
    margin: 24px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }
}
