.rail-panel {
  @extend .surface-panel;
  overflow: hidden;
}

.live-match {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--arena-border);
  transition: background 160ms ease;

  &:last-child {
    border-bottom: none;
  }

  &:hover {
    background: rgba(124, 92, 252, 0.06);
  }

  &__meta {
    font-size: 0.62rem;
    color: var(--arena-text-muted);
    font-weight: 600;
    margin-bottom: 4px;
  }

  &__teams {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
  }

  &__score {
    text-align: end;
  }

  &__score-val {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
  }

  &__live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--arena-red);
    text-transform: uppercase;

    &::before {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--arena-red);
      box-shadow: 0 0 8px rgba(255, 59, 87, 0.8);
      animation: live-pulse 1.4s ease-in-out infinite;
    }
  }
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.rank-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 1px solid var(--arena-border);

  &:last-child {
    border-bottom: none;
  }

  &__pos {
    width: 18px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--arena-text-muted);
    text-align: center;
  }

  &__avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--r-full);
    object-fit: cover;
    border: 2px solid var(--arena-border);
  }

  &__name {
    flex: 1;
    min-width: 0;

    .name {
      font-size: 0.78rem;
      font-weight: 700;
      color: #fff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .rank {
      font-size: 0.62rem;
      color: var(--arena-text-muted);
    }
  }

  &__points {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--arena-gold);
  }

  &--1 .rank-row__pos { color: #ffd700; }
  &--1 .rank-row__avatar { border-color: rgba(255, 215, 0, 0.55); }
  &--2 .rank-row__pos { color: #c0c0c0; }
  &--2 .rank-row__avatar { border-color: rgba(192, 192, 192, 0.45); }
  &--3 .rank-row__pos { color: #cd7f32; }
  &--3 .rank-row__avatar { border-color: rgba(205, 127, 50, 0.45); }
}

.community-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(124, 92, 252, 0.3);
  background: linear-gradient(160deg, #1a1430, #0f1117 60%);

  &__art {
    position: absolute;
    inset-inline-end: -10px;
    bottom: -10px;
    width: 140px;
    height: 140px;
    object-fit: contain;
    opacity: 0.9;
    filter: drop-shadow(0 8px 24px rgba(124, 92, 252, 0.45));
    transition: transform 300ms ease;
  }

  &:hover .community-card__art {
    transform: translateY(-4px) scale(1.03);
  }

  &__body {
    position: relative;
    z-index: 1;
    padding: var(--sp-5);
    max-width: 70%;
  }

  &__title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 var(--sp-2);
  }

  &__text {
    font-size: 0.75rem;
    color: var(--arena-text-secondary);
    margin: 0 0 var(--sp-4);
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-match__live::before {
    animation: none;
  }
}
