.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.article-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 260px;
  max-height: 500px;
  overflow: hidden;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  background: linear-gradient(160deg, rgba(13, 21, 35, 0.85) 0%, rgba(8, 14, 24, 0.95) 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.55), 0 0 25px rgba(16, 185, 129, 0.15);
}

.article-card span.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #00ff87;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-card h2,
.article-card h3 {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2vw, 1.4rem);
  line-height: 1.3;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
  font-size: 0.94rem;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-action-btn:hover,
.blog-action-btn.is-liked {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
}

.blog-read-link {
  color: #38bdf8;
  font-weight: 800;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.blog-read-link:hover {
  color: #00ff87;
}

/* Category Filter Chips & Search Bar */
.blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 16px 20px;
  background: rgba(13, 21, 35, 0.7);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(12px);
}

.blog-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 99px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  background: rgba(8, 14, 24, 0.6);
  color: #94a3b8;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-chip:hover,
.blog-chip.active {
  color: #ffffff;
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(56, 189, 248, 0.15));
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.blog-search-box {
  position: relative;
  min-width: 260px;
  flex: 1;
  max-width: 380px;
}

.blog-search-box input {
  width: 100%;
  padding: 10px 16px 10px 38px;
  border-radius: 99px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  background: rgba(8, 14, 24, 0.8);
  color: #ffffff;
  font-size: 0.9rem;
}

.blog-search-box input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.blog-search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #10b981;
  font-size: 0.95rem;
}

/* Leaderboard Sidebar Card */
.leaderboard-card {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  background: linear-gradient(160deg, rgba(20, 25, 40, 0.9) 0%, rgba(10, 15, 26, 0.95) 100%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.leaderboard-rank {
  font-size: 1.1rem;
  font-weight: 900;
  width: 28px;
}

/* Reader Modal View */
.article-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.article-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.article-modal-container {
  background: linear-gradient(165deg, #0b1320 0%, #06090e 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(16, 185, 129, 0.2);
  border-radius: 24px;
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px 32px;
  position: relative;
  color: #f8fafc;
}

.article-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.article-modal-close:hover {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

/* Star Rating Input Styles */
.star-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.star-btn {
  cursor: pointer;
  display: inline-block;
  line-height: 1;
  font-size: 1.25rem;
  color: rgba(166, 180, 201, 0.25);
  padding: 2px 3px;
  user-select: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.star-btn.active {
  color: #2ee878;
  background: linear-gradient(135deg, #2ee878, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 4px rgba(46, 232, 120, 0.6));
}

.star-btn:hover {
  transform: scale(1.25);
}

