:root {
  --primary-color: #e74c3c;
  --secondary-color: #2c3e50;
  --accent-color: #f39c12;
  --background-color: #f8f9fa;
  --card-background: #ffffff;
  --text-color: #2c3e50;
  --text-muted: #7f8c8d;
  --border-color: #ecf0f1;
  --font-sans: 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Georgia', serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

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

.magazine-header {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #1a252f 100%);
  color: white;
  padding: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.issue-date {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.7);
}

.site-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.site-title a {
  color: white;
  text-decoration: none;
}

.tagline {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.7);
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.nav-item {
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.magazine-main {
  padding: 3rem 0;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
  justify-content: center;
}

.category-tag {
  background: white;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.85rem;
  font-weight: 500;
  border: 2px solid var(--border-color);
  transition: all 0.2s;
}

.category-tag:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.category-tag.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.post-card {
  background: var(--card-background);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.post-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.post-content {
  padding: 1.5rem;
}

.post-content h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

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

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

.post-content .excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.meta a {
  color: var(--primary-color);
}

.post-detail {
  max-width: 900px;
  margin: 0 auto;
}

.post-detail h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
}

.post-detail .meta {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.post-detail img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.post-detail .content {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--text-color);
}

.post-detail .content h1,
.post-detail .content h2,
.post-detail .content h3 {
  font-family: var(--font-serif);
  margin: 2rem 0 1rem;
  color: var(--secondary-color);
}

.post-detail .content p {
  margin-bottom: 1.5rem;
}

.post-detail .content code {
  background: #f4f4f4;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
}

.post-detail .content pre {
  background: var(--secondary-color);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-detail .content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.magazine-footer {
  background: var(--secondary-color);
  color: white;
  padding: 3rem 0;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  font-size: 1.5rem;
  letter-spacing: 0.1em;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
}

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

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
}

.pagination a {
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: all 0.2s;
}

.pagination a:hover,
.pagination a.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}