.raffle-detail-page {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 90px;
}

.raffle-back {
  display: inline-flex;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: color 0.2s ease;
}

.raffle-back:hover {
  color: #fff;
}

.raffle-detail-loading,
.raffle-detail-error {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.raffle-detail-error strong {
  color: #ff555b;
  font-size: 25px;
}

.raffle-detail-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #ff2a2f;
  border-radius: 50%;
  animation: raffleDetailSpin 0.8s linear infinite;
}

.raffle-detail-content {
  display: grid;
  gap: 26px;
}

.raffle-detail-hero-card,
.raffle-wheel-panel,
.raffle-entrants-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 55, 65, 0.38);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 42, 47, 0.06), transparent 48%),
    rgba(7, 5, 9, 0.92);
  box-shadow: 0 26px 75px rgba(0, 0, 0, 0.35);
}

.raffle-detail-hero-card {
  display: grid;
  grid-template-columns: minmax(330px, 0.95fr) minmax(420px, 1.05fr);
}

.raffle-detail-media {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: #0b090c;
}

.raffle-detail-image {
  min-height: 430px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(12px, 2vw, 22px);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 42, 47, 0.08), transparent 62%),
    #0b090c;
}

.raffle-detail-image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 14px;
}

.raffle-detail-description {
  padding: clamp(22px, 3vw, 34px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 42, 47, 0.055), transparent 60%),
    rgba(8, 6, 9, 0.96);
}

.raffle-detail-description p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.raffle-detail-image--fallback span {
  font-size: 150px;
  font-weight: 950;
  text-shadow: 0 0 45px rgba(255, 42, 47, 0.75);
}

.raffle-detail-summary {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(28px, 5vw, 54px);
}

.raffle-detail-status-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.raffle-section-kicker {
  color: #ff373c;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2.6px;
}

.raffle-detail-summary h1 {
  margin: 8px 0 24px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: -4px;
  overflow-wrap: anywhere;
}

.raffle-detail-prize {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: 18px 0;
  border-block: 1px solid rgba(255, 255, 255, 0.09);
}

.raffle-detail-prize span {
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
}

.raffle-detail-prize strong {
  color: #ff3035;
  font-size: clamp(28px, 4vw, 42px);
}

.raffle-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.raffle-detail-metrics > div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.raffle-detail-metrics span,
.raffle-detail-action-card > span,
.raffle-detail-form-grid label,
.raffle-detail-cost span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.47);
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.3px;
}

.raffle-detail-metrics strong {
  font-size: 18px;
}

.raffle-detail-action-card,
.raffle-detail-entry-form {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(83, 252, 24, 0.18);
  border-radius: 14px;
  background: rgba(83, 252, 24, 0.035);
}

.raffle-detail-action-card strong {
  display: block;
  margin-bottom: 14px;
}

.raffle-detail-action-card--closed {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
}

.raffle-detail-form-grid {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.raffle-detail-form-grid label,
.raffle-detail-cost {
  min-height: 68px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.18);
}

.raffle-detail-form-grid input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.raffle-detail-cost strong {
  color: #ff353a;
  font-size: 18px;
}

.raffle-detail-entry-message {
  min-height: 18px;
  margin-top: 10px;
  color: #53fc18;
  font-size: 12px;
  font-weight: 800;
}

.raffle-detail-entry-message.is-error {
  color: #ff6469;
}

.raffle-wheel-panel {
  padding: clamp(24px, 5vw, 54px);
  text-align: center;
}

.raffle-wheel-heading h2,
.raffle-entrants-panel h2 {
  margin: 6px 0 8px;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -2px;
}

.raffle-wheel-heading p,
.raffle-wheel-panel--waiting p {
  color: rgba(255, 255, 255, 0.6);
}

.raffle-wheel-panel--waiting {
  min-height: 300px;
  display: grid;
  place-items: center;
}

.raffle-wheel-stage {
  position: relative;
  width: min(640px, 88vw);
  margin: 40px auto 20px;
  aspect-ratio: 1;
}

.raffle-wheel-pointer {
  position: absolute;
  z-index: 8;
  top: 50%;
  right: -9px;
  width: 72px;
  height: 62px;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #ff6469, #a70f15);
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
}

.raffle-wheel {
  --final-rotation: 0deg;
  position: relative;
  width: 100%;
  height: 100%;
  border: 12px solid #161018;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px #ff3035,
    0 0 75px rgba(255, 42, 47, 0.26),
    0 30px 70px rgba(0, 0, 0, 0.55);
  transform: rotate(0deg);
}

.raffle-wheel::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.raffle-wheel.is-spinning {
  animation: raffleWinnerSpin 5.2s cubic-bezier(0.12, 0.72, 0.06, 1) forwards;
}

.raffle-wheel-avatar {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: clamp(34px, 6vw, 58px);
  height: clamp(34px, 6vw, 58px);
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #130e14;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.45);
  transform:
    translate(-50%, -50%)
    rotate(var(--wheel-angle))
    translateX(clamp(150px, 36vw, 260px))
    rotate(calc(var(--wheel-angle) * -1));
}

.raffle-wheel-avatar img,
.raffle-wheel-avatar .raffle-avatar-fallback,
.raffle-winner-avatar img,
.raffle-winner-avatar .raffle-avatar-fallback,
.raffle-entrant-avatar img,
.raffle-entrant-avatar .raffle-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  object-fit: cover;
}

.raffle-avatar-fallback {
  color: #fff;
  background: linear-gradient(135deg, #ff3035, #5b1014);
  font-weight: 950;
}

.raffle-wheel-center {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 24%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 5px solid #201820;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #252027, #09070a 70%);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px rgba(255, 48, 53, 0.85);
}

.raffle-wheel-center img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.raffle-winner-card {
  max-width: 520px;
  margin: 38px auto 0;
  padding: 30px;
  border: 1px solid rgba(83, 252, 24, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0, rgba(83, 252, 24, 0.12), transparent 55%),
    rgba(8, 12, 8, 0.9);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
}

.raffle-winner-card.is-visible {
  animation: raffleWinnerReveal 0.65s ease forwards;
}

.raffle-winner-kicker {
  color: #53fc18;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 3px;
}

.raffle-winner-avatar {
  width: 110px;
  height: 110px;
  margin: 18px auto;
  overflow: hidden;
  border: 4px solid #53fc18;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(83, 252, 24, 0.28);
}

.raffle-winner-card h2 {
  margin: 0;
  font-size: 40px;
}

.raffle-winner-card p {
  color: rgba(255, 255, 255, 0.62);
}

.raffle-entrants-panel {
  padding: clamp(24px, 4vw, 42px);
}

.raffle-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 20px;
}

.raffle-panel-heading > strong {
  color: #ff363b;
}

.raffle-entrants-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.raffle-entrant-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.raffle-entrant-user {
  display: flex;
  min-width: 0;
  gap: 11px;
  align-items: center;
}

.raffle-entrant-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  overflow: hidden;
  border-radius: 50%;
}

.raffle-entrant-user strong,
.raffle-entrant-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raffle-entrant-user span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}

.raffle-entrant-count {
  text-align: right;
}

.raffle-entrant-count strong,
.raffle-entrant-count span {
  display: block;
}

.raffle-entrant-count strong {
  color: #ff3439;
  font-size: 20px;
}

.raffle-entrant-count span {
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
  text-transform: uppercase;
}

.raffle-detail-empty {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

@keyframes raffleDetailSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes raffleWinnerSpin {
  to {
    transform: rotate(var(--final-rotation));
  }
}

@keyframes raffleWinnerReveal {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .raffle-detail-hero-card {
    grid-template-columns: 1fr;
  }

  .raffle-detail-image {
    min-height: 350px;
    max-height: 500px;
  }
}

@media (max-width: 650px) {
  .raffle-detail-page {
    width: min(100% - 24px, 1240px);
    padding-top: 28px;
  }

  .raffle-detail-summary {
    padding: 24px 18px;
  }

  .raffle-detail-status-row,
  .raffle-panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .raffle-detail-metrics,
  .raffle-detail-form-grid,
  .raffle-entrants-list {
    grid-template-columns: 1fr;
  }

  .raffle-wheel-panel {
    padding-inline: 12px;
  }

  .raffle-wheel-pointer {
    width: 50px;
    height: 44px;
  }
}

@media (max-width: 900px) {
  .raffle-detail-hero-card {
    grid-template-columns: 1fr;
  }

  .raffle-detail-media {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .raffle-detail-image {
    min-height: 340px;
  }
}

/* Horizontal winner draw */
.raffle-horizontal-draw {
  overflow: hidden;
}

.raffle-reel-stage {
  position: relative;
  width: min(100%, 980px);
  margin: 38px auto 12px;
  padding: 18px 0;
}

.raffle-reel-window {
  overflow: hidden;
  border: 1px solid rgba(255, 65, 75, 0.42);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(5, 4, 7, 0.96), transparent 16%, transparent 84%, rgba(5, 4, 7, 0.96)),
    rgba(6, 5, 8, 0.94);
  box-shadow:
    inset 0 0 38px rgba(0, 0, 0, 0.7),
    0 22px 55px rgba(0, 0, 0, 0.36);
}

.raffle-reel-marker {
  position: absolute;
  z-index: 6;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, #ff3339 14%, #ff3339 86%, transparent);
  box-shadow: 0 0 20px rgba(255, 42, 47, 0.9);
  pointer-events: none;
}

.raffle-reel-marker::before,
.raffle-reel-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-inline: 11px solid transparent;
}

.raffle-reel-marker::before {
  top: 0;
  border-top: 14px solid #ff3d43;
}

.raffle-reel-marker::after {
  bottom: 0;
  border-bottom: 14px solid #ff3d43;
}

.raffle-reel-track {
  --reel-final-x: 0px;
  display: flex;
  width: max-content;
  gap: 12px;
  padding: 18px calc(50% - 74px);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.raffle-reel-track.is-spinning {
  transform: translate3d(var(--reel-final-x), 0, 0);
  transition: transform 7s cubic-bezier(0.08, 0.72, 0.08, 1);
}

.raffle-reel-item {
  width: 136px;
  min-width: 136px;
  padding: 13px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 42, 47, 0.12), transparent 60%),
    rgba(255, 255, 255, 0.035);
  text-align: center;
  opacity: 0.72;
  transition: opacity 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.raffle-reel-item.is-target {
  border-color: rgba(255, 62, 69, 0.72);
}

.raffle-reel-stage.is-complete .raffle-reel-item.is-target {
  opacity: 1;
  transform: scale(1.045);
  box-shadow: 0 0 30px rgba(255, 42, 47, 0.3);
}

.raffle-reel-avatar {
  width: 78px;
  height: 78px;
  margin: 0 auto 10px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: #171219;
}

.raffle-reel-avatar img,
.raffle-reel-avatar .raffle-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  object-fit: cover;
  color: #fff;
  font-size: 26px;
  font-weight: 950;
}

.raffle-reel-item strong,
.raffle-reel-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raffle-reel-item strong {
  color: #fff;
  font-size: 13px;
}

.raffle-reel-item span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

.raffle-winner-only-panel {
  min-height: 390px;
  display: grid;
  place-items: center;
}

.raffle-winner-only-panel .raffle-winner-card {
  margin-top: 0;
}

@media (max-width: 640px) {
  .raffle-reel-item {
    width: 112px;
    min-width: 112px;
  }

  .raffle-reel-track {
    padding-inline: calc(50% - 62px);
  }

  .raffle-reel-avatar {
    width: 64px;
    height: 64px;
  }
}
