/* ============================================================
   VOTE WIDGET — PDP
   ============================================================ */
.rm-vote {
  background: #fff;
  border: 2px solid var(--rm-border, #e4e7ef);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.rm-vote--compact {
  padding: 12px 14px;
  gap: 8px;
}
.rm-vote__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rm-vote__label {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--rm-text-muted, #6b7280);
  text-transform: uppercase;
  font-weight: 800;
}
.rm-vote--compact .rm-vote__label { font-size: 0.55rem; }

.rm-vote__score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rm-bg-alt, #f7f8fa);
  border: 1px solid var(--rm-border, #e4e7ef);
  border-radius: 6px;
  padding: 3px 8px;
}
.rm-vote__score-label {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--rm-text-muted, #6b7280);
  text-transform: uppercase;
  font-weight: 700;
}
.rm-vote--compact .rm-vote__score-label { display: none; }
.rm-vote__score-value {
  font-family: 'Press Start 2P', 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--rm-text, #1a1d2e);
  font-variant-numeric: tabular-nums;
}

.rm-vote__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rm-vote__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  overflow: visible;
  background: #fff;
  border: 2px solid var(--rm-border, #e4e7ef);
  border-radius: 8px;
  padding: 9px 10px;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--rm-text, #1a1d2e);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.rm-vote--compact .rm-vote__btn {
  padding: 8px 8px;
  font-size: 0.78rem;
  gap: 5px;
}

/* UP — GREEN */
.rm-vote__btn--up {
  background: var(--rm-green, #04aa6d);
  border-color: var(--rm-green-dark, #038755);
  color: #fff;
  box-shadow: 0 6px 14px rgba(4,170,109,0.16);
}
.rm-vote__btn--up:hover {
  background: var(--rm-green-dark, #038755);
  border-color: var(--rm-green-dark, #038755);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(4,170,109,0.24);
}
.rm-vote__btn--up.is-active {
  background: var(--rm-green-dark, #038755);
  border-color: var(--rm-green-dark, #038755);
  color: #fff;
}

/* DOWN — RED */
.rm-vote__btn--down {
  background: var(--rm-red, #d33a3a);
  border-color: #ba2f2f;
  color: #fff;
  box-shadow: 0 6px 14px rgba(211,58,58,0.14);
}
.rm-vote__btn--down:hover {
  background: #ba2f2f;
  border-color: #ba2f2f;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(211,58,58,0.22);
}
.rm-vote__btn--down.is-active {
  background: #ba2f2f;
  border-color: #ba2f2f;
  color: #fff;
}

.rm-vote__btn-icon { font-size: 0.95rem; }
.rm-vote__btn-text {
  font-size: inherit;
}
.rm-vote--compact .rm-vote__btn-text { display: none; }
.rm-vote__btn-count {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: rgba(255,255,255,0.94);
}
.rm-vote--compact .rm-vote__btn-count { margin-left: 0; }
.rm-vote__btn.is-active .rm-vote__btn-count,
.rm-vote__btn:hover .rm-vote__btn-count { color: inherit; }

.rm-vote__btn--pulse { animation: rm-vote-pulse 0.35s ease; }
@keyframes rm-vote-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.rm-vote__float {
  position: absolute;
  top: 4px;
  right: 12px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: inherit;
  pointer-events: none;
  animation: rm-vote-float 0.9s ease-out forwards;
}
@keyframes rm-vote-float {
  0%   { transform: translateY(0) scale(0.7); opacity: 0; }
  25%  { transform: translateY(-8px) scale(1.1); opacity: 1; }
  100% { transform: translateY(-40px) scale(1); opacity: 0; }
}

.rm-vote__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  border-top: 1px dashed var(--rm-border, #e4e7ef);
  margin-top: 2px;
  padding-top: 10px;
}
.rm-vote--compact .rm-vote__links { font-size: 0.74rem; gap: 3px; padding-top: 8px; }
.rm-vote__link {
  color: var(--rm-blue, #3c65c7);
  text-decoration: none;
  font-weight: 700;
}
.rm-vote__link:hover { color: var(--rm-orange, #f47e1e); }

.rm-vote__status {
  min-height: 1em;
  font-size: 0.78rem;
  font-weight: 700;
}
.rm-vote__status--success { color: var(--rm-green, #04aa6d); }
.rm-vote__status--info    { color: var(--rm-text-muted, #6b7280); }
.rm-vote__status--error   { color: var(--rm-red, #d33a3a); }

.rm-vote.is-loading .rm-vote__btn { pointer-events: none; opacity: 0.7; }

.rm-vote--best {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  gap: 6px;
  min-width: 178px;
}
.rm-vote--best .rm-vote__buttons {
  gap: 6px;
}
.rm-vote--best .rm-vote__btn {
  min-height: 42px;
  border-radius: 10px;
}
.rm-vote--best .rm-vote__status {
  font-size: 0.68rem;
  min-height: 0.9rem;
  text-align: right;
}

@media (prefers-reduced-motion: reduce) {
  .rm-vote__btn--pulse,
  .rm-vote__float { animation: none; }
}

/* ============================================================
   BEST PAGE — HERO
   ============================================================ */
.rm-best-hero {
  background: linear-gradient(135deg, #0d0f1a 0%, #1a1d2e 100%);
  color: #fff;
  padding: 48px 0 56px;
  border-bottom: 4px solid var(--rm-orange, #f47e1e);
  position: relative;
  overflow: hidden;
}
.rm-best-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.rm-best-hero__inner { position: relative; z-index: 1; text-align: center; }
.rm-best-hero__kicker {
  display: inline-block;
  background: var(--rm-orange, #f47e1e);
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.rm-best-hero__title {
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: #fff;
}
.rm-best-hero__sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.78);
  max-width: 640px;
  margin: 0 auto 18px;
  line-height: 1.55;
}
.rm-best-hero__stats {
  display: inline-flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  padding: 12px 20px;
}
.rm-best-hero__stat {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.06em;
}
.rm-best-hero__stat strong {
  color: var(--rm-orange, #f47e1e);
  font-family: inherit;
  margin-right: 6px;
}

/* ============================================================
   BEST PAGE — RANKED LIST
   ============================================================ */
.rm-best-list {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 72px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rm-best-row {
  display: grid;
  grid-template-columns: 72px 90px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 2px solid var(--rm-border, #e4e7ef);
  border-radius: 10px;
  padding: 14px 16px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  color: inherit;
}
.rm-best-row:hover {
  transform: translateY(-2px);
  border-color: var(--rm-orange, #f47e1e);
  box-shadow: 0 6px 18px rgba(18,33,63,0.10);
}
.rm-best-row__rank {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.1rem;
  color: var(--rm-text-muted, #6b7280);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.rm-best-row--gold   { border-color: #e6b325; background: linear-gradient(90deg, rgba(230,179,37,0.10) 0%, #fff 45%); }
.rm-best-row--silver { border-color: #c0c7d1; background: linear-gradient(90deg, rgba(192,199,209,0.12) 0%, #fff 45%); }
.rm-best-row--bronze { border-color: #cd7f32; background: linear-gradient(90deg, rgba(205,127,50,0.12) 0%, #fff 45%); }
.rm-best-row--gold   .rm-best-row__rank { color: #b8860b; }
.rm-best-row--silver .rm-best-row__rank { color: #6b7280; }
.rm-best-row--bronze .rm-best-row__rank { color: #8b4513; }

.rm-best-row__cover {
  position: relative;
  width: 90px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: var(--rm-bg-alt, #f7f8fa);
  display: block;
}
.rm-best-row__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rm-best-row__info { min-width: 0; }
.rm-best-row__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--rm-text, #1a1d2e);
  margin: 0 0 4px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}
.rm-best-row__title:hover { color: var(--rm-blue, #3c65c7); }
.rm-best-row__meta {
  font-size: 0.82rem;
  color: var(--rm-text-muted, #6b7280);
}
.rm-best-row__meta span + span::before { content: ' · '; opacity: 0.5; }

.rm-best-row__score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.rm-best-row__score-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.88rem;
  color: var(--rm-green, #04aa6d);
  font-variant-numeric: tabular-nums;
}
.rm-best-row__score-value--neg { color: var(--rm-red, #d33a3a); }
.rm-best-row__score-breakdown {
  font-size: 0.72rem;
  color: var(--rm-text-muted, #6b7280);
  font-variant-numeric: tabular-nums;
}
.rm-best-row__vote {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.rm-best-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--rm-text-muted, #6b7280);
  background: #fff;
  border: 2px dashed var(--rm-border, #e4e7ef);
  border-radius: 10px;
  max-width: 640px;
  margin: 32px auto;
}
.rm-best-empty strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--rm-text, #1a1d2e);
}

/* ============================================================
   BEST PAGE — RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .rm-best-row {
    grid-template-columns: 46px 68px 1fr;
    grid-template-areas:
      "rank cover info"
      "rank cover score"
      "vote vote vote";
    gap: 10px;
  }
  .rm-best-row__rank  { grid-area: rank; font-size: 0.9rem; }
  .rm-best-row__cover { grid-area: cover; width: 68px; }
  .rm-best-row__info  { grid-area: info; }
  .rm-best-row__score { grid-area: score; align-items: flex-start; flex-direction: row; gap: 10px; align-items: center; }
  .rm-best-row__vote  { grid-area: vote; justify-content: stretch; }
  .rm-vote--best { width: 100%; min-width: 0; }
  .rm-best-row__title { font-size: 0.92rem; }
}
