/* Base styles */
:root {
  --primary-color: #2563eb;
  --text-color: #1f2937;
  --light-bg: #f9fafb;
  --code-bg: #f3f4f6;
  --border-color: #e5e7eb;
  --link-hover: #1d4ed8;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  color: var(--text-color);
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background-color: white;
  position: relative;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 2rem 0 1rem;
  line-height: 1.3;
  color: #000;
}

h1 {
  font-size: 2rem;
  margin-top: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

p,
ul,
ol {
  margin-bottom: 1.5rem;
}

ul,
ol {
  padding-left: 1.5rem;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Code blocks */
pre,
code {
  font-family: var(--font-mono);
  background-color: var(--code-bg);
  border-radius: 4px;
}

code {
  padding: 0.2em 0.4em;
  font-size: 0.9em;
}

pre {
  padding: 1rem;
  overflow: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

pre code {
  background-color: transparent;
  padding: 0;
  font-size: 0.9rem;
}

/* Article specific */
.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: #6b7280;
  font-size: 0.9rem;
}

.article-source,
.article-comments {
  display: inline-block;
  margin-left: 0.5rem;
}

/* Original title styles */
.original-title {
  color: #6b7280;
  font-style: italic;
  font-weight: normal;
  font-size: 1.2rem;
}

hr {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin: 2rem 0;
}

.content {
  margin-top: 2rem;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--border-color);
  padding-left: 1rem;
  margin-left: 0;
  margin-right: 0;
  font-style: italic;
  color: #4b5563;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.5rem;
}

th,
td {
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  text-align: left;
}

th {
  background-color: var(--light-bg);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Navigation */
.nav-container {
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: var(--light-bg);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.nav-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.nav-list {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 0;
}

.nav-list li {
  margin-bottom: 0.5rem;
}

.nav-list li:last-child {
  margin-bottom: 0;
}

.nav-list a {
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.nav-list a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.nav-list a.active {
  background-color: var(--primary-color);
  color: white;
}

/* Back to index link */
.back-to-index {
  margin-bottom: 2rem;
}

/* Article list */
.article-list {
  margin: 2rem 0;
}

/* Info Card */
.info-card {
  background: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 2rem 0;
  padding: 0.5rem 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-section {
  padding: 0.5rem 0;
}

.info-section p {
  margin: 0.5rem 0;
}

.info-section p:last-child {
  margin-bottom: 0;
}

.info-section h2 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1.5rem;
}

.info-section a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

.info-section a:hover {
  text-decoration: underline;
}

/* Article summary styles */
.article-summary {
  margin-top: 1rem;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.article-summary-box {
  background-color: #f0f9ff;
  border-left: 4px solid #3b82f6;
  border-radius: 4px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #1e3a8a;
}

/* Article Cards */
.article-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background-color: white;
  transition: background-color 0.2s;
  position: relative;
}

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

.article-card h2 {
  margin-top: 0;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.article-card .article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: #6b7280;
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.article-card .original-title {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
  font-style: italic;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-card .article-source {
  font-size: 0.85rem;
}

.article-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.article-header h2 {
  margin: 0;
  flex: 1;
}

.mark-read-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #6b7280;
  transition: all 0.2s;
  width: 125px;
}

.mark-read-btn:hover {
  background: var(--light-bg);
  border-color: #8f939b;
}

.article-card.read {
  opacity: 0.6;
  background: var(--light-bg);
}

.article-card.read h2 a {
  color: #6b7280;
}

.article-card .mark-unread-text {
  display: none;
}

.article-card.read .mark-read-text {
  display: none;
}

.article-card.read .mark-unread-text {
  display: inline;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--primary-color);
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
  opacity: 1;
  color: white;
  text-decoration: none;
}

/* Footer */
.footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: #6b7280;
  font-size: 0.9rem;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  html {
    font-size: 14px;
  }

  body {
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* Read All Button */
.read-all-container {
  text-align: center;
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.read-all-btn,
.filter-read-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.read-all-btn:hover,
.filter-read-btn:hover {
  border-color: #8f939b;
}

.read-all-btn:active,
.filter-read-btn:active {
  background-color: rgba(0, 0, 0, 0.05);
}

.filter-read-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.article-card.filtered {
  display: none;
}

/* History page styles */
.weeks-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.week-entry {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.week-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.week-entry.read {
  opacity: 0.6;
  background: var(--light-bg);
}

.week-entry.read h2 {
  color: #6b7280;
}

.week-entry.filtered {
  display: none;
}

.week-link {
  text-decoration: none;
  color: inherit;
}

.week-entry h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--primary-color);
}

.week-entry:hover h2 {
  color: var(--link-hover);
}

/* Remove old styles */
.content-description,
.content-description p {
  margin-bottom: 1rem;
}

.content-description p {
  margin-bottom: 1rem;
}

/* We're using read-all-container and read-all-btn classes instead */
