.historiesFeed {
  max-width: 760px;
  width: 100%;

  display: flex;
  flex-direction: column;
  gap: 20px;
}

.viewSwitcher {
  display: flex;
  gap: 12px;

  margin: var(--space-sm) 0;
}

.viewBtn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);

  padding: var(--space-sm) var(--space-md);
  border-radius: 999px;

  cursor: pointer;
  transition: 0.2s;
}

.viewBtn.active {
  background: var(--primary);
  color: #000;
  font-weight: 600;
  border-color: var(--primary);
}

.flashcardsView,
.tableView {
  display: none;
}

.activeView {
  display: block;
}

.flashCardContainer {
  width: 100%;
  height: 450px;
  perspective: 1000px;
  position: relative;
}

.flashCard {
  width: 100%;
  height: 100%;

  border: 1px solid var(--border);

  border-radius: var(--radius-lg);

  padding: 28px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  position: relative;
  overflow: hidden;

  background:
    radial-gradient(
      circle at top right,
      rgba(0, 255, 170, 0.08),
      transparent 30%
    ),
    var(--card-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}
.flashCard:hover {
  transform: translateY(-4px);

  border-color: rgba(0, 255, 170, 0.25);
}

.cardTop,
.cardBottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.yearBadge,
.categoryBadge {
  padding: 8px 14px;
  border-radius: 999px;

  font-size: 14px;
  font-weight: 600;

  border: 1px solid var(--border);
}

.yearBadge {
  color: var(--primary-light);
}

.historyTitle {
  font-size: 42px;
  line-height: 1.1;

  max-width: 600px;
}

.historyFact {
  margin-top: 20px;

  font-size: 18px;
  line-height: 1.7;

  color: var(--muted);

  max-width: 600px;
}

.cardActions {
  display: flex;
  gap: 10px;
}

.cardActions button {
  width: 44px;
  height: 44px;

  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 1.1rem;
  background: transparent;
  color: var(--text-primary);

  cursor: pointer;
}
.cardActions button:hover {
  background: var(--hover-bg);
}
/*TABLE*/
.tableView {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}
.tableView::-webkit-scrollbar {
  width: var(--space-sm);
  height: var(--space-sm);
  border-radius: var(--radius-sm);
}
.tableView::-webkit-scrollbar-track {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
}
.tableView::-webkit-scrollbar-thumb:hover {
  background: #555; /* slightly brighter primary */
}

.historyTable {
  width: 100%;
  border-collapse: collapse;
}
.historyTable thead {
  background: rgba(255, 255, 255, 0.03);
}
.historyTable th {
  padding: 18px 24px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.02);
}
.historyTable tr {
  border-top: 1px solid var(--border);
}
.historyTable td {
  padding: 20px 24px;

  font-size: 15px;

  color: var(--text-primary);
}
.historyTable tbody tr {
  transition: background 0.2s ease;
}

.historyTable tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}
.historyTable td:first-child {
  color: var(--primary-light);

  font-weight: 700;

  width: 90px;
}
.historyTable td:nth-child(2) {
  font-weight: 600;
}
.categoryChip {
  padding: 6px 12px;

  border-radius: 999px;

  background: rgba(168, 85, 247, 0.12);

  color: #c084fc;

  font-size: 13px;

  font-weight: 600;
}
.historyTable th,
.historyTable td {
  padding: 18px 22px;

  text-align: left;
}
