:root {
  --bg-primary: #f5f5f0;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #2c2c2c;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #e0e0d8;
  --accent-color: #ff7f50;
  --accent-hover: #e67348;
  --header-bg: #fffbf5;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  
  /* 兼容变量 */
  --card-bg: var(--bg-card);
  --text: var(--text-primary);
  --primary: var(--accent-color);
  
  /* StyleManager 兼容变量 */
  --cream: #f5f5f0;
  --cream-dark: #e8e8e0;
  --surface-white: #ffffff;
  --tech-gradient: linear-gradient(135deg, #ff7f50 0%, #7B68EE 100%);
  --shadow-accent: 0 8px 30px rgba(255, 127, 80, 0.15);
}

[data-theme="dark"] {
  --bg-primary: #1a1a18;
  --bg-secondary: #2a2a28;
  --bg-card: #333330;
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --border-color: #3a3a38;
  --accent-color: #ff9a76;
  --accent-hover: #ffb399;
  --header-bg: #252523;
  --shadow: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.3);
  
  /* 兼容变量 */
  --card-bg: var(--bg-card);
  --text: var(--text-primary);
  --primary: var(--accent-color);
  --cream: var(--bg-primary);
  --cream-dark: var(--bg-secondary);
  --surface-white: var(--bg-card);
  --tech-gradient: linear-gradient(135deg, #ff9a76 0%, #9B7BF0 100%);
}

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

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

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

/* Header */
header {
  background: linear-gradient(135deg, var(--surface-white, var(--bg-card)) 0%, var(--cream, var(--bg-primary)) 100%);
  border-bottom: 1px solid rgba(255, 107, 53, 0.1);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  transition: background 0.3s ease;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-home {
  font-size: 20px;
  text-decoration: none;
  opacity: 0.7;
  transition: all 0.2s;
}

.logo-home:hover {
  opacity: 1;
  transform: scale(1.1);
}

.logo-icon {
  font-size: 28px;
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 700;
  background: var(--tech-gradient, linear-gradient(135deg, var(--accent-color) 0%, #7B68EE 100%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text span {
  font-size: 12px;
  color: var(--text-secondary);
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-tab {
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.2s;
}

.nav-tab:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.nav-tab.active {
  background: var(--accent-color);
  color: white;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--bg-primary);
}

/* Main Content */
main {
  padding: 24px 0;
}

/* Article Cards */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid var(--border-color);
}

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

.article-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.4;
}

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

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-source {
  color: var(--accent-color);
  font-weight: 500;
}

.rating-display {
  display: flex;
  align-items: center;
  gap: 4px;
}

.shrimp-icon {
  font-size: 14px;
}

/* Article Detail */
.article-detail {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow);
}

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

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

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

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

.article-content h1,
.article-content h2,
.article-content h3 {
  margin: 24px 0 12px;
  color: var(--text-primary);
}

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

.article-content a {
  color: var(--accent-color);
  text-decoration: none;
}

.article-content a:hover {
  text-decoration: underline;
}

.article-content pre,
.article-content code {
  background: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 14px;
}

.article-content pre {
  padding: 16px;
  overflow-x: auto;
  margin: 16px 0;
}

.article-content pre code {
  padding: 0;
  background: none;
}

/* 响应式图片 - 防止溢出 */
.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 16px auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* 文章概要样式 */
.article-summary-box {
  background: linear-gradient(135deg, var(--bg-primary), var(--border-color));
  border-left: 4px solid var(--accent-color);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin-bottom: 24px;
  position: relative;
}

.article-summary-box::before {
  content: "📝 内容概要";
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.article-summary-box p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.article-content-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
}

/* Rating Section */
.rating-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.rating-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.rating-stars {
  display: flex;
  gap: 8px;
  font-size: 28px;
}

.rating-star {
  cursor: pointer;
  opacity: 0.4;
  transition: all 0.2s;
}

.rating-star:hover,
.rating-star.active {
  opacity: 1;
  transform: scale(1.1);
}

.rating-avg {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-color);
  margin-top: 8px;
}

/* Back Button */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-primary);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  transition: all 0.2s;
}

.back-link:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

/* Loading State */
.loading {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 32px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-state-text {
  font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  
  .article-detail {
    padding: 20px;
  }
  
  .article-detail-title {
    font-size: 22px;
  }
  
  .article-detail-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* 导航筛选按钮 */
.filter-tabs {
  display: flex;
  gap: 8px;
}

.filter-tab {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.filter-tab:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--primary);
  color: white;
}

/* 虾选标识 */
.shrimp-badge {
  background: linear-gradient(135deg, #ff6b6b, #ffa500);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  display: inline-block;
}
