/* ============================================================================
   TOP 10 — hero dark scurt, clasament la zi + listă de vot, ultimul top.
   ========================================================================= */

.top-hero {
  position: relative;
  background:
    radial-gradient(900px 380px at 80% -20%, rgba(255, 59, 48, 0.18), transparent 60%),
    linear-gradient(180deg, #3a0d16 0%, #1a0f1c 38%, var(--hero-bg-2) 72%, var(--hero-bg) 100%);
  color: var(--hero-text);
  padding: var(--space-7) 0 var(--space-8);
}
/* Marginea de jos se topește în pagină, nu se taie drept. */
.top-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 56px;
  background: linear-gradient(180deg, transparent, var(--bg-page));
  pointer-events: none;
}
.top-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-stretch: 116%;
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hero-text-dim);
}
.top-hero__title {
  color: var(--hero-text);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 var(--space-3);
}
.top-hero__sub {
  margin: 0;
  color: var(--hero-text-dim);
  max-width: 62ch;
  font-size: var(--fs-md);
}
.top-hero__sub strong {
  color: var(--hero-text);
}
.top-hero__search {
  position: relative;
  display: block;
  max-width: 520px;
  margin: var(--space-5) 0 0;
  color: var(--hero-text-dim);
}
.top-hero__search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.top-hero__search input {
  width: 100%;
  padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-4) + 28px);
  font: inherit;
  font-size: var(--fs-md);
  color: var(--hero-text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  outline: none;
  transition: background var(--trans-fast), border-color var(--trans-fast);
  -webkit-appearance: none;
  appearance: none;
}
.top-hero__search input::placeholder {
  color: var(--hero-text-dim);
}
.top-hero__search input:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--live);
}
.top-hero__grid {
  display: grid;
  gap: var(--space-5);
  align-items: end;
}
.top-hero__ana {
  margin: 0;
  position: relative;
  justify-self: center;
  width: min(60vw, 300px);
}
.top-hero__ana img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  /* Portretul se topește în fundalul hero-ului pe stânga și jos. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 90%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 14%, #000 78%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 90%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 14%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.top-hero__ana figcaption {
  position: absolute;
  left: 50%;
  bottom: var(--space-3);
  transform: translateX(-50%);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  background: rgba(5, 8, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--fs-xs);
  color: var(--hero-text-dim);
  white-space: nowrap;
}
.top-hero__ana figcaption strong {
  color: var(--hero-text);
}
@media (min-width: 900px) {
  .top-hero {
    padding-bottom: 0;
  }
  .top-hero__grid {
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: var(--space-7);
  }
  .top-hero__text {
    padding-bottom: var(--space-8);
  }
  .top-hero__grid {
    align-items: start;
  }
  .top-hero__ana {
    width: 100%;
    justify-self: end;
    align-self: start;
    margin-top: calc(-1 * var(--space-7));
  }
  .top-hero__ana img {
    border-radius: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 88%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 18%, #000 85%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 88%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 18%, #000 85%, transparent 100%);
  }
}
.top-hero__meta {
  margin: var(--space-4) 0 0;
  min-height: 1.4em;
  color: var(--hero-text-dim);
  font-size: var(--fs-sm);
}

.top-layout {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 1040px) {
  .top-layout {
    grid-template-columns: minmax(0, 7fr) minmax(320px, 4fr);
    align-items: start;
  }
  .top-col--mine {
    position: sticky;
    top: var(--space-8);
  }
}
.top-col {
  min-width: 0;
}
.top-col--mine {
  padding: var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.my-top__hint,
.my-top__note {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-sm);
}
.my-top__note {
  margin: var(--space-3) 0 0;
}
.my-top {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.my-top__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-1);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}
.my-top__item.is-dragging {
  border-color: var(--live);
  box-shadow: var(--shadow-lg);
  opacity: 0.92;
}
.my-top__handle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: grab;
  touch-action: none;
}
.my-top__handle:active {
  cursor: grabbing;
}
.my-top__handle:focus-visible,
.my-top__remove:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.my-top__pos {
  flex: 0 0 2ch;
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-lg);
  text-align: right;
  color: var(--live);
}
.my-top__song {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.my-top__title {
  font-weight: var(--fw-semibold);
  overflow-wrap: anywhere;
}
.my-top__artist {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.my-top__points {
  flex: 0 0 auto;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  white-space: nowrap;
}
.my-top__remove {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--fs-xl);
  line-height: 1;
  cursor: pointer;
}
.my-top__remove:hover {
  color: var(--accent-600);
}

.top-bar {
  position: fixed;
  left: var(--space-3);
  right: var(--space-3);
  bottom: 84px;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--hero-bg-2);
  color: var(--hero-text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}
.top-bar[hidden] {
  display: none;
}
.top-bar__count {
  color: var(--hero-text);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
}
@media (min-width: 1040px) {
  .top-bar {
    display: none;
  }
}
.top-chart--live {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.top-chart,
.top-songs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.top-empty {
  padding: var(--space-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.top-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
}
.top-row--podium {
  border-color: var(--live);
}
.top-row__pos {
  flex: 0 0 2ch;
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-xl);
  text-align: right;
  color: var(--text-muted);
}
.top-row--podium .top-row__pos {
  color: var(--live);
}
.top-row__song,
.top-song__info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.top-row__title,
.top-song__title {
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.top-row__artist,
.top-song__artist {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.top-row__votes,
.top-song__votes {
  flex: 0 0 auto;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  white-space: nowrap;
}
.top-row__move {
  flex: 0 0 auto;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  white-space: nowrap;
}
.top-row__move--up {
  color: var(--success-500);
}
.top-row__move--down {
  color: var(--accent-600);
}
.top-row__move--new {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--live);
}

.vote-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
.vote-grid > .top-empty,
.vote-grid > .skeleton {
  grid-column: 1 / -1;
}
.vote-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  padding: var(--space-3);
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: #fff;
  background: linear-gradient(160deg, hsl(var(--hue, 220) 45% 28%), hsl(calc(var(--hue, 220) + 40) 55% 14%));
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast);
}
.vote-card__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vote-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(5, 8, 16, 0.05) 30%, rgba(5, 8, 16, 0.72) 70%, rgba(5, 8, 16, 0.9) 100%);
}
.vote-card:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--live);
  box-shadow: var(--shadow-md);
}
.vote-card:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.vote-card:disabled {
  cursor: default;
}
.vote-card.is-live {
  border-color: var(--live);
}
.vote-card.is-picked {
  border-color: var(--success-500);
  box-shadow: 0 0 0 1px var(--success-500);
}
.vote-card__live {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: rgba(5, 8, 16, 0.7);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.vote-card__title {
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  overflow-wrap: anywhere;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.vote-card__artist {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.82);
  overflow-wrap: anywhere;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.vote-card__foot {
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.vote-card__votes {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}
.vote-card__cta {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-inverse);
  background: var(--accent-600);
  white-space: nowrap;
}
.vote-card.is-picked .vote-card__cta {
  color: #fff;
  background: var(--success-500);
}
.vote-card:disabled:not(.is-picked) .vote-card__cta {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.18);
}
.vote-more {
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-3);
}
.vote-more:empty {
  display: none;
}

/* Coperți */
.top-row__art,
.my-top__art {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--surface-sunken);
}
.top-row__art,
.my-top__art {
  width: 44px;
  height: 44px;
}
.top-row__art--empty,
.my-top__art--empty {
  display: none;
}
