:root { --giveaway-red: #c0202a; --giveaway-line: #242424; }

.giveaway-main { width: min(100% - 32px, 1500px); margin: 28px auto 80px; }
.giveaway-hero { position: relative; display: grid; grid-template-columns: minmax(0, .92fr) minmax(520px, 1.08fr); min-height: 650px; overflow: hidden; border: 1px solid var(--giveaway-line); background: #080808; isolation: isolate; }
.giveaway-hero::after { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #080808 0 39%, rgba(8, 8, 8, .88) 48%, rgba(8, 8, 8, 0) 70%); content: ""; pointer-events: none; }
.giveaway-hero-copy { z-index: 1; align-self: center; padding: 70px 0 120px 54px; }
.giveaway-month { display: block; width: max-content; margin-bottom: 28px; padding: 8px 12px; background: var(--giveaway-red); color: #fff; font: 500 12px "IBM Plex Mono", monospace; letter-spacing: .14em; }
.giveaway-hero h1 { max-width: 760px; margin: 0; font-size: clamp(4.2rem, 7vw, 6rem); font-weight: 600; letter-spacing: -.04em; line-height: .82; text-transform: uppercase; text-wrap: balance; }
.giveaway-hero h1 span { color: #ff4d5b; }
.giveaway-hero-copy p { max-width: 540px; margin: 34px 0 0; color: #d8d8d8; font-size: 20px; line-height: 1.45; }
.giveaway-hero > img { position: absolute; inset: 0 0 0 auto; z-index: -2; width: 76%; height: 100%; object-fit: cover; object-position: right center; }
.giveaway-deadline { position: absolute; right: 0; bottom: 0; left: 0; z-index: 2; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; min-height: 92px; padding: 0 38px 0 54px; border-top: 1px solid var(--giveaway-line); background: rgba(5, 5, 5, .94); }
.giveaway-deadline span,
.giveaway-deadline em { color: #a0a0a0; font: 500 9px "IBM Plex Mono", monospace; font-style: normal; letter-spacing: .08em; text-transform: uppercase; }
.giveaway-deadline strong { font-size: 24px; font-weight: 600; }
.giveaway-deadline em { color: #ff4d5b; font-size: 14px; font-variant-numeric: tabular-nums; }

.ticket-rules { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--giveaway-line); border-top: 0; background: #0e0e0e; }
.ticket-rules article { min-height: 160px; padding: 30px 36px; }
.ticket-rules article + article { border-left: 1px solid var(--giveaway-line); }
.ticket-rules strong { display: block; font-size: 30px; line-height: 1; }
.ticket-rules span { display: block; margin-top: 16px; color: #ff4d5b; font: 500 18px "IBM Plex Mono", monospace; }
.ticket-rules p { margin: 10px 0 0; color: #a0a0a0; font-size: 15px; }

.giveaway-winner { display: grid; place-items: center; min-height: 280px; padding: 44px; border: 1px solid var(--giveaway-red); border-top: 0; background: var(--giveaway-red); text-align: center; }
.giveaway-winner span { font: 500 9px "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.giveaway-winner strong { margin-top: 14px; font-size: clamp(3.25rem, 7vw, 6rem); line-height: .9; text-transform: uppercase; }
.giveaway-winner p { margin: 18px 0 0; font: 500 11px "IBM Plex Mono", monospace; text-transform: uppercase; }

.ticket-board { margin-top: 28px; border: 1px solid var(--giveaway-line); background: #0e0e0e; }
.ticket-board > header { display: flex; align-items: end; justify-content: space-between; min-height: 142px; padding: 30px 40px; border-bottom: 1px solid var(--giveaway-line); }
.ticket-board h2 { margin: 0; font-size: clamp(2.8rem, 6vw, 5.6rem); font-weight: 600; letter-spacing: -.04em; line-height: .86; text-transform: uppercase; }
.ticket-board header p { margin: 12px 0 0; color: #a0a0a0; font: 500 9px "IBM Plex Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.ticket-board header > div:last-child { text-align: right; }
.ticket-board header > div:last-child strong { display: block; color: #ff4d5b; font: 500 clamp(1.1rem, 2vw, 1.55rem) "IBM Plex Mono", monospace; }
.ticket-board header > div:last-child span { color: #a0a0a0; font: 500 9px "IBM Plex Mono", monospace; text-transform: uppercase; }
.ticket-row { display: grid; grid-template-columns: 58px minmax(180px, 1fr) repeat(4, minmax(82px, 120px)); align-items: center; min-height: 72px; border-bottom: 1px solid var(--giveaway-line); }
.ticket-row > span { padding: 0 18px; }
.ticket-row > span:not(:nth-child(2)) { font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; text-align: right; }
.ticket-row > span:nth-child(2) { font-size: 18px; font-weight: 600; }
.ticket-row > span:last-child { color: #ff4d5b; font-size: 16px; font-weight: 500; }
.ticket-head { min-height: 42px; color: #a0a0a0; font: 500 9px "IBM Plex Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.ticket-head > span:nth-child(2) { font: inherit; }
#ticket-list { max-height: 2160px; overflow-y: auto; scrollbar-color: #555 #111; }
.ticket-row:not(.ticket-head):hover { background: #181818; }
.ticket-status { margin: 0; padding: 30px 40px; color: #a0a0a0; font: 500 11px "IBM Plex Mono", monospace; }
.ticket-updated { margin: 0; padding: 14px 40px; color: #777; font: 500 9px "IBM Plex Mono", monospace; text-align: right; text-transform: uppercase; }

.giveaway-admin { margin-top: 28px; border: 1px solid var(--giveaway-line); background: #0e0e0e; }
.giveaway-admin > header { display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 0 40px; border-bottom: 1px solid var(--giveaway-line); }
.giveaway-admin h2 { margin: 0; font-size: 30px; text-transform: uppercase; }
.giveaway-admin header span,
.giveaway-admin label,
.draw-control > span { color: #a0a0a0; font: 500 9px "IBM Plex Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.giveaway-admin-grid { display: grid; }
.giveaway-admin-grid > * { min-height: 210px; padding: 34px 40px; }
.giveaway-admin-grid > * + * { border-left: 1px solid var(--giveaway-line); }
.giveaway-admin button { min-height: 48px; padding: 0 20px; border: 1px solid var(--giveaway-red); border-radius: 2px; background: transparent; color: #ff4d5b; cursor: pointer; font: 500 9px "IBM Plex Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.giveaway-admin button:hover,
.giveaway-admin button:focus-visible { background: var(--giveaway-red); color: #fff; }
.giveaway-admin button:disabled { cursor: not-allowed; opacity: .45; }
.draw-control { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-content: center; }
.draw-control > span { grid-column: 1 / -1; }
#draw-name { position: relative; display: grid; place-items: center; align-self: center; width: min(64vw, 720px); height: 336px; overflow: hidden; border: 1px solid #303030; background: #080808; font-size: 32px; line-height: 1; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
#draw-name::before { position: absolute; inset: 0; z-index: 2; background: linear-gradient(#080808 0, transparent 28%, transparent 72%, #080808 100%); content: ""; pointer-events: none; }
#draw-name::after { position: absolute; top: 144px; right: 0; left: 0; z-index: 3; height: 48px; border-block: 1px solid #c0202a; background: rgba(192, 32, 42, .09); content: ""; pointer-events: none; }
.draw-control.is-spinning #draw-name { color: #fff; }
.draw-control .reel-track { position: absolute; inset: 0 0 auto; display: grid; grid-auto-rows: 48px; animation: reel-step var(--reel-speed) linear both; }
.draw-control .reel-track.reel-finale { animation-name: reel-finale; animation-timing-function: cubic-bezier(.12, .65, .18, 1); }
.draw-control .reel-track > span { display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0 24px; opacity: .72; text-overflow: ellipsis; }
.draw-result { position: relative; display: grid; place-items: center; align-self: center; width: min(64vw, 720px); height: 336px; padding: 42px; background: #c91e2b; color: #fff; text-align: center; }
.draw-result[hidden] { display: none; }
.draw-result > span { color: #fff; font: 500 9px "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.draw-result > strong { font-size: clamp(3.25rem, 7vw, 6rem); line-height: .9; text-transform: uppercase; }
.draw-result > p { margin: 0; font: 500 11px "IBM Plex Mono", monospace; text-transform: uppercase; }
#draw-result-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; padding: 0; border: 1px solid rgba(255, 255, 255, .55); background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
#draw-result-close:hover { background: #fff; color: #c91e2b; }
#admin-status { min-height: 42px; margin: 0; padding: 12px 40px; border-top: 1px solid var(--giveaway-line); color: #a0a0a0; font: 500 10px "IBM Plex Mono", monospace; }

@keyframes reel-step { to { transform: translateY(-48px); } }
@keyframes reel-finale { to { transform: translateY(-192px); } }

@media (max-width: 900px) {
  .giveaway-hero { grid-template-columns: 1fr; min-height: 720px; }
  .giveaway-hero-copy { align-self: start; padding: 46px 34px 0; }
  .giveaway-hero > img { top: 220px; width: 100%; height: 500px; object-position: 70% center; }
  .giveaway-hero::after { background: linear-gradient(180deg, #080808 0 24%, rgba(8, 8, 8, .84) 37%, rgba(8, 8, 8, 0) 68%); }
  .giveaway-hero-copy p { max-width: 470px; margin-top: 24px; font-size: 17px; }
  .ticket-rules { grid-template-columns: 1fr; }
  .ticket-rules article + article { border-top: 1px solid var(--giveaway-line); border-left: 0; }
  .ticket-rules article { min-height: 118px; }
  .giveaway-admin-grid > * + * { border-top: 1px solid var(--giveaway-line); border-left: 0; }
  .ticket-table { overflow-x: auto; }
  .ticket-row { min-width: 780px; }
}

@media (max-width: 640px) {
  .giveaway-main { width: 100%; margin-top: 0; }
  .giveaway-hero { min-height: 680px; border-inline: 0; }
  .giveaway-hero-copy { padding: 34px 18px 0; }
  .giveaway-month { margin-bottom: 18px; }
  .giveaway-hero h1 { font-size: clamp(3.5rem, 17vw, 5rem); }
  .giveaway-hero > img { top: 250px; height: 430px; object-position: 72% center; }
  .giveaway-deadline { grid-template-columns: 1fr auto; gap: 6px 14px; min-height: 88px; padding: 14px 18px; }
  .giveaway-deadline strong { font-size: 18px; }
  .giveaway-deadline em { grid-column: 1 / -1; }
  .ticket-rules,
  .giveaway-winner,
  .ticket-board,
  .giveaway-admin { border-inline: 0; }
  .ticket-board > header { align-items: start; min-height: 0; padding: 26px 18px; }
  .ticket-board h2 { font-size: 38px; }
  .ticket-status,
  .ticket-updated { padding-inline: 18px; }
  .giveaway-admin > header { padding-inline: 18px; }
  .giveaway-admin-grid > * { padding: 28px 18px; }
  .draw-control { grid-template-columns: 1fr; }
  #draw-name, .draw-result { width: 100%; }
  .draw-control > span { grid-column: 1; }
  #admin-status { padding-inline: 18px; }
}
