.replay-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.replay-drop {
  border: 2px dashed rgba(140, 160, 220, 0.4);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  margin: 2rem auto;
  max-width: 640px;
  transition: border-color 0.15s, background 0.15s;
}

.replay-drop.is-dragover {
  border-color: #4da3ff;
  background: rgba(77, 163, 255, 0.08);
}

.replay-drop__note {
  font-size: 0.85rem;
  opacity: 0.7;
  max-width: 46ch;
  margin: 0.5rem auto;
}

.replay-file-btn {
  display: inline-block;
  cursor: pointer;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  background: #2b62a8;
  color: #fff;
  border: none;
  font: inherit;
}

.replay-file-btn:hover {
  background: #3a76c4;
}

.replay-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.replay-summary__teams {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.75rem;
}

.replay-team-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.replay-team-level {
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.replay-vs {
  opacity: 0.6;
  font-size: 0.9rem;
  align-self: center;
}

.replay-talents {
  margin-top: 1rem;
}

.replay-talents h2 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

.talent-table {
  border-collapse: collapse;
  font-size: 0.8rem;
}

.talent-table thead th {
  opacity: 0.6;
  font-weight: 600;
  padding: 0.15rem 0.3rem;
  text-align: center;
}

.talent-table tbody th {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.5rem 0.2rem 0;
  font-weight: 400;
  white-space: nowrap;
  border-left: 3px solid var(--team-color, transparent);
  padding-left: 0.4rem;
}

.talent-table tbody:first-of-type {
  border-bottom: 1px solid rgba(140, 160, 220, 0.25);
}

.talent-table td {
  padding: 0.15rem 0.3rem;
  text-align: center;
}

.talent-icon {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  display: block;
  margin: 0 auto;
}

.talent-text {
  font-size: 0.7rem;
  opacity: 0.85;
}

.talent-hero {
  font-size: 0.8rem;
}

.replay-team {
  display: flex;
  align-items: center;
  gap: 4px;
}

.replay-portrait {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 8px;
  border: 2px solid var(--team-color, #888);
  overflow: hidden;
  cursor: pointer;
  background: #0a0e1a;
}

.replay-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.replay-portrait.is-selected {
  outline: 3px solid #fff;
}

.replay-summary__map {
  font-size: 0.9rem;
  opacity: 0.8;
}

.replay-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 1000px) {
  .replay-layout {
    grid-template-columns: 1fr;
  }
}

.replay-canvas {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #0a0a0c;
  cursor: pointer;
}

.replay-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.replay-controls [data-play] {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid rgba(140, 160, 220, 0.4);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
}

.replay-controls input[type='range'] {
  flex: 1;
}

.replay-time {
  font-variant-numeric: tabular-nums;
  min-width: 3.5rem;
  text-align: right;
}

.replay-controls select {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(140, 160, 220, 0.4);
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
}

.replay-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  margin-top: 0.4rem;
  opacity: 0.9;
}

.replay-note {
  font-size: 0.78rem;
  opacity: 0.6;
  margin-top: 0.5rem;
  max-width: 70ch;
}

.replay-feed-pane {
  border: 1px solid rgba(140, 160, 220, 0.25);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 78vh;
}

.replay-feed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(140, 160, 220, 0.25);
  font-weight: 600;
  font-size: 0.9rem;
}

.replay-feed-head button {
  font-size: 0.75rem;
  background: transparent;
  border: 1px solid rgba(140, 160, 220, 0.4);
  color: inherit;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  cursor: pointer;
}

.replay-feed {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  overflow-y: auto;
  flex: 1;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
  opacity: 0.45;
  border-left: 3px solid transparent;
}

.feed-item.is-past {
  opacity: 0.85;
}

.feed-item.is-current {
  opacity: 1;
  background: rgba(77, 163, 255, 0.12);
  border-left-color: #4da3ff;
}

.feed-item:hover {
  background: rgba(140, 160, 220, 0.12);
}

.feed-time {
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
  min-width: 2.9rem;
}

.feed-portrait {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #888;
  object-fit: cover;
  flex-shrink: 0;
}

.feed-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.feed-item.is-heroic .feed-icon {
  outline: 1px solid gold;
}

.feed-item.is-death {
  color: #ff9c9c;
}

.feed-item.is-talent {
  color: #ffd97a;
}

.feed-item.is-camp,
.feed-item.is-level {
  opacity: 0.7;
}
