body.dark-theme .date-label,
body.dark-theme .page-indicator {
  color: #9fb4d5;
}

body.dark-theme .tab-pill {
  background: #122033;
  color: #b6c7e3;
  border-color: rgba(91, 145, 209, 0.18);
}

body.dark-theme .tab-pill.active {
  color: #fff;
  background: linear-gradient(135deg, #2788d8, #d95779);
  box-shadow: 0 12px 28px rgba(18, 61, 103, 0.34);
}

body.dark-theme .update-item {
  background: linear-gradient(180deg, #162338, #101b2b);
  border-color: rgba(147, 167, 199, 0.1);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

body.dark-theme .cover-shell {
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.34);
}

body.dark-theme .update-copy span {
  background: rgba(33, 69, 118, 0.65);
  color: #d6e7ff;
}

body.dark-theme .update-copy h3,
body.dark-theme .update-title-link,
body.dark-theme .update-part-link {
  color: #edf4ff;
}

body.dark-theme .update-extra {
  color: #9fb4d5;
}

body.dark-theme .update-flag {
  background: rgba(18, 32, 51, 0.92);
  color: #d6e7ff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

body.dark-theme .update-flag.is-trending {
  background: rgba(87, 42, 22, 0.92);
  color: #ffd7c8;
}

body.dark-theme .update-flag.is-popular {
  background: rgba(24, 75, 56, 0.92);
  color: #cdf3df;
}

body.dark-theme .update-flag.is-top10 {
  background: rgba(99, 73, 17, 0.94);
  color: #ffe7a3;
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 18px;
}

.tab-pill {
  border: 1px solid rgba(59, 167, 248, 0.15);
  background: #fff;
  color: var(--muted);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.1;
  transition: 0.2s ease;
}

.tab-pill small {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.75;
}

.tab-pill.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--rose-500));
  box-shadow: 0 12px 28px rgba(59, 167, 248, 0.2);
}

.date-label {
  text-align: right;
  color: var(--muted);
  margin: 0;
  font-weight: 700;
}

.date-row {
  margin-bottom: 24px;
}

.date-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.date-pagination {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.date-pagination.date-pagination-bottom {
  display: flex;
  width: 100%;
  justify-content: flex-end;
}

.updates-grid {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  justify-content: start;
  align-items: start;
}

.update-item {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
  background: linear-gradient(180deg, #ffffff, #f9fcff);
  border: 1px solid rgba(23, 32, 51, 0.05);
  border-radius: 24px;
  padding: 0px;
  box-shadow: 0 16px 34px rgba(45, 97, 146, 0.08);
}

.update-media-link {
  display: block;
  color: inherit;
}

.cover-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 22px rgba(22, 64, 106, 0.16);
}

.update-copy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.update-pill {
  display: inline-flex;
  align-items: baseline;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--blue-700);
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}

.update-pill .part-accent,
.update-pill .part-accent-prefix,
.update-pill .part-accent-number {
  background: transparent;
}

.update-pill .part-accent-prefix {
  color: var(--blue-700);
}

.update-pill .part-accent-number {
  color: #d4572e;
}

body.dark-theme .update-pill .part-accent,
body.dark-theme .update-pill .part-accent-prefix,
body.dark-theme .update-pill .part-accent-number {
  background: transparent;
}

.update-flags {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 24px);
  pointer-events: none;
  z-index: 1;
}

.update-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(237, 246, 255, 0.94);
  color: var(--blue-700);
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.14);
  backdrop-filter: blur(6px);
}

.update-flag.is-trending {
  background: #fff1ec;
  color: #d4572e;
}

.update-flag.is-popular {
  background: #eefbf2;
  color: #247a4f;
}

.update-flag.is-top10 {
  background: #fff8df;
  color: #9a6b00;
}

.update-part-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

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

.update-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.update-copy h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  min-height: 2.6em;
}

.update-title-link {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.update-extra {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.page-indicator {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 44px;
  text-align: right;
}

@media (max-width: 767.98px) {
  .date-tools {
    justify-content: flex-end;
    flex: 0 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .date-pagination {
    justify-content: flex-end;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .date-pagination .form-select {
    width: auto !important;
    min-width: 76px !important;
    max-width: 84px;
    min-height: 34px;
    padding-left: 0.65rem !important;
    padding-right: 1.65rem !important;
    font-size: 0.82rem;
  }

  .page-indicator {
    min-width: 34px;
    font-size: 0.82rem;
  }
}

@media (max-width: 575.98px) {
  .updates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
