/* Giveaways page (#/giveaways) and the admin "Promo codes & giveaways" section. Classes are prefixed ga- / gaa-. */

.ga { --ga-gold: var(--gold); }
.ga .price { font-variant-numeric: tabular-nums; }
.ga-head { margin-bottom: 16px; }

/* ------------------------------------------------------------------ promo code box */
.ga-promo {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 420px); gap: 18px; align-items: center;
  padding: 16px 20px; margin-bottom: 16px; position: relative; overflow: hidden;
  background: linear-gradient(100deg, rgba(228, 174, 57, .11), transparent 45%), var(--panel);
  border-color: rgba(228, 174, 57, .28);
}
.ga-promo-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: var(--gold);
  background: rgba(228, 174, 57, .12); border: 1px solid rgba(228, 174, 57, .35);
}
.ga-promo-text { min-width: 0; }
.ga-promo-text h2 { font-size: 18px; }
.ga-promo-text p { margin: 2px 0 0; font-size: 13.5px; }
.ga-promo-side { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ga-promo-form { display: flex; gap: 8px; }
.ga-code { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.ga-code::placeholder { text-transform: none; letter-spacing: 0; font-weight: 400; }
.ga-promo-note .btn { width: 100%; }
.ga-promo-msg { font-size: 13.5px; min-height: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ga-promo-msg:empty { display: none; }
.ga-promo-msg.good { color: var(--green); }
.ga-promo-msg.good .price { color: var(--gold); }
.ga-promo-msg.bad { color: var(--red); }

/* ------------------------------------------------------------------ daily hero */
.ga-hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 260px); gap: 26px; align-items: center;
  padding: 24px 28px; position: relative; overflow: hidden; margin-bottom: 8px;
  background:
    radial-gradient(420px 240px at 10% 50%, rgba(228, 174, 57, .16), transparent 70%),
    radial-gradient(600px 260px at 100% 0%, rgba(239, 59, 59, .13), transparent 70%),
    var(--panel);
}
.ga-hero > * { position: relative; min-width: 0; }
.ga-hero-glow {
  position: absolute !important; inset: -40% auto auto -10%; width: 360px; height: 360px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(228, 174, 57, .22), transparent 65%); filter: blur(10px);
}
.ga-hero.live .ga-hero-glow { animation: gaBreathe 4s ease-in-out infinite; }
@keyframes gaBreathe { 50% { transform: scale(1.12); opacity: .7; } }
.ga-kicker {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
}
.ga-kicker svg { width: 16px; height: 16px; }
.ga-hero h2 { margin: 6px 0 8px; }
.ga-hero-amount { font-size: 44px; line-height: 1.05; color: var(--gold); text-shadow: 0 0 28px rgba(228, 174, 57, .4); }
.ga-hero-amount .price { gap: 10px; font-weight: 400; }
.ga-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.ga-hero-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.ga-hero-meta b { color: var(--text); font-variant-numeric: tabular-nums; }
.ga-hero-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ga-hero-cta .ga-join { min-width: 220px; }
.ga-hero .ga-join[data-join] { animation: gaGlow 2.2s ease-in-out infinite; }
@keyframes gaGlow { 50% { box-shadow: 0 6px 30px -4px rgba(239, 59, 59, .85), inset 0 -2px 0 rgba(0, 0, 0, .15); } }
.ga-req { max-width: 460px; margin-bottom: 14px; }
.ga-req-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.ga-req-top b { font-variant-numeric: tabular-nums; }
.ga-meter { height: 8px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line2); overflow: hidden; }
.ga-meter > i {
  display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #b8860b, var(--gold));
  box-shadow: 0 0 12px rgba(228, 174, 57, .55); transition: width .8s cubic-bezier(.2, .8, .2, 1);
}
.ga-req-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.ga-req-links a { font-weight: 600; }
.ga-reason { font-size: 13px; }

.ga-last {
  display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; align-self: stretch; justify-content: center;
  background: rgba(0, 0, 0, .25); border: 1px solid var(--line); font-size: 13px;
}
.ga-last small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ga-last-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ga-last-row .avatar { width: 28px; height: 28px; font-size: 12px; flex: none; }
.ga-last-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 700; }
.ga-last-row .price { color: var(--gold); }
.ga-last .btn { align-self: flex-start; }

/* ------------------------------------------------------------------ prize visuals */
.ga-prize { position: relative; display: grid; place-items: center; flex: none; border-radius: 14px; }
.ga-prize.lg { width: 170px; height: 150px; }
.ga-prize.md { width: 100%; height: 120px; }
.ga-prize.sm { width: 64px; height: 48px; border-radius: 10px; }
.ga-prize-item { background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--c) 35%, transparent), transparent 70%); }
.ga-prize-item img { max-width: 92%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5)); }
.ga-prize-coins { background: radial-gradient(circle at 50% 60%, rgba(228, 174, 57, .3), transparent 70%); }
.ga-coinstack { position: relative; display: block; width: 1em; height: 1em; font-size: 46px; }
.ga-coinstack .coin { position: absolute; width: 1em; height: 1em; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.ga-coinstack .coin:nth-child(1) { left: -.42em; top: .18em; }
.ga-coinstack .coin:nth-child(2) { left: .42em; top: .18em; }
.ga-coinstack .coin:nth-child(3) { left: 0; top: -.2em; }
.ga-prize.lg .ga-coinstack { font-size: 64px; }
.ga-prize.sm .ga-coinstack { font-size: 20px; }
.ga-hero.live .ga-prize.lg { animation: gaFloat 3.2s ease-in-out infinite; }
@keyframes gaFloat { 50% { transform: translateY(-6px); } }

/* ------------------------------------------------------------------ active giveaway cards */
.ga-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ga-card {
  display: flex; flex-direction: column; overflow: hidden; min-width: 0; position: relative;
  transition: transform .15s, border-color .2s, box-shadow .2s;
}
.ga-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.ga-card.joined { border-color: rgba(52, 211, 153, .45); }
.ga-card-top {
  position: relative; padding: 14px 14px 10px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, var(--panel2)), var(--panel));
}
.ga-card-top::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--c), transparent); opacity: .8;
}
.ga-card-value { position: absolute; left: 12px; top: 10px; font-size: 14px; color: var(--gold); padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, .45); }
.ga-card-timer {
  position: absolute; right: 12px; top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 8px;
  background: rgba(0, 0, 0, .45); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.ga-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.ga-card-body h3 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-card-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: -6px; }
.ga-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ga-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 7px; font-size: 12px; font-weight: 600;
  background: var(--bg2); border: 1px solid var(--line2); color: var(--muted);
}
.ga-chip svg { width: 12px; height: 12px; }
.ga-chip.ok { color: var(--green); border-color: rgba(52, 211, 153, .35); }
.ga-chip.no { color: var(--red); border-color: rgba(240, 82, 82, .35); }
.ga-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin-top: auto; }
.ga-entries, .ga-hash { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.ga-hash { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; overflow: hidden; white-space: nowrap; }
.ga-hash svg { flex: none; color: var(--green); }
.ga-card .ga-join { width: 100%; }
.ga-state { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.ga-state.joined { color: var(--green); background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); }
.ga-state.drawing { color: var(--gold); background: rgba(228, 174, 57, .08); border: 1px dashed rgba(228, 174, 57, .4); }
.ga-hero .ga-state { padding: 0 18px; height: 50px; }
.ga-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(228, 174, 57, .3); border-top-color: var(--gold); animation: spin .8s linear infinite; }
.ga-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 18px; text-align: center; grid-column: 1 / -1; }
.ga-empty svg { color: var(--gold); width: 30px; height: 30px; }
.ga-empty .btn { margin-top: 8px; }

/* ------------------------------------------------------------------ ended list */
.ga-rows { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.ga-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 110px minmax(0, 200px) 96px; gap: 14px; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--line);
}
.ga-row:first-child { border-top: 0; }
.ga-row.mine { background: linear-gradient(90deg, rgba(228, 174, 57, .12), transparent 70%); }
.ga-row-main { display: flex; flex-direction: column; min-width: 0; }
.ga-row-main b, .ga-row-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-row-main span { font-size: 12.5px; }
.ga-row-value { color: var(--gold); text-align: right; }
.ga-winner { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ga-winner .avatar { width: 26px; height: 26px; font-size: 11px; flex: none; }
.ga-winner a { color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ga-winner a:hover { color: var(--accent-hi); }
.ga-row-act { text-align: right; }

/* ------------------------------------------------------------------ verify dialog */
.ga-verify p { margin: 4px 0 12px; }
.ga-verdict { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; font-weight: 700; margin-bottom: 12px; }
.ga-verdict.good { color: var(--green); background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); }
.ga-verdict.bad { color: var(--red); background: rgba(240, 82, 82, .1); border: 1px solid rgba(240, 82, 82, .3); }
.ga-checks { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ga-checks li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.ga-checks li > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.ga-tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ga-checks li.good .ga-tick { color: var(--green); background: rgba(52, 211, 153, .14); }
.ga-checks li.bad .ga-tick { color: var(--red); background: rgba(240, 82, 82, .14); }
.ga-verify code, .ga-kv code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.ga-kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; margin: 0 0 12px; font-size: 13px; }
.ga-kv dt { color: var(--muted); font-weight: 600; }
.ga-kv dd { margin: 0; min-width: 0; }
.ga-entrants { font-size: 13px; margin-bottom: 10px; }
.ga-entrants summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.ga-entrants code { display: block; max-height: 140px; overflow: auto; margin-top: 6px; padding: 8px; border-radius: 8px; background: var(--bg2); }
.ga-verify-foot { font-size: 13px; }

/* ------------------------------------------------------------------ admin section */
.gaa { display: flex; flex-direction: column; gap: 18px; }
.gaa h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.gaa-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.gaa-form label, .gaa-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; min-width: 0; }
.gaa-form .input, .gaa-form .select { width: 100%; }
.gaa-form .gaa-wide { grid-column: span 2; }
.gaa-form .gaa-full { grid-column: 1 / -1; }
.gaa-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gaa-actions .toggle { text-transform: none; letter-spacing: 0; font-size: 14px; flex-direction: row; }
.gaa-seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; height: 40px; }
.gaa-seg button { border: 0; background: transparent; padding: 0 14px; cursor: pointer; color: var(--muted); font-weight: 600; }
.gaa-seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.gaa-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; max-height: 260px; overflow: auto; }
.gaa-result {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg2);
  cursor: pointer; text-align: left; min-width: 0; font-size: 12.5px;
}
.gaa-result:hover { border-color: var(--dim); }
.gaa-result[aria-pressed="true"] { border-color: var(--gold); background: rgba(228, 174, 57, .1); }
.gaa-result img { width: 44px; height: 33px; object-fit: contain; flex: none; }
.gaa-result span { display: flex; flex-direction: column; min-width: 0; }
.gaa-result b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.gaa-table td, .gaa-table th { padding: 8px 10px; font-size: 13.5px; }
.gaa-table .gaa-num { text-align: right; white-space: nowrap; }
.gaa-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; }
.gaa-muted-row td { opacity: .55; }
.gaa-status { white-space: nowrap; }
.gaa-recent { font-size: 12px; color: var(--muted); }
.gaa-help { font-size: 13px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .ga-hero { grid-template-columns: auto minmax(0, 1fr); }
  .ga-last { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .ga-last-row { flex: 1 1 200px; }
  .gaa-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ga-promo { grid-template-columns: auto minmax(0, 1fr); }
  .ga-promo-side { grid-column: 1 / -1; }
  .ga-row { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: 'p m v' 'p w a'; row-gap: 6px; }
  .ga-row-prize { grid-area: p; }
  .ga-row-main { grid-area: m; }
  .ga-row-value { grid-area: v; }
  .ga-row-winner { grid-area: w; min-width: 0; }
  .ga-row-act { grid-area: a; }
  .ga-prize.sm { width: 56px; }
}
@media (max-width: 640px) {
  .ga-promo { padding: 14px; gap: 12px; }
  .ga-promo-icon { width: 38px; height: 38px; }
  .ga-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 20px 16px; gap: 14px; }
  .ga-hero-main { width: 100%; display: flex; flex-direction: column; align-items: center; }
  .ga-hero-meta, .ga-hero-cta, .ga-req-links { justify-content: center; }
  .ga-req { width: 100%; text-align: left; }
  .ga-hero-cta { width: 100%; }
  .ga-hero-cta .ga-join, .ga-hero .ga-state { width: 100%; min-width: 0; }
  .ga-hero-amount { font-size: 38px; }
  .ga-prize.lg { width: 140px; height: 110px; }
  .ga-prize.lg .ga-coinstack { font-size: 52px; }
  .ga-last { width: 100%; text-align: left; }
  .ga-grid { grid-template-columns: minmax(0, 1fr); }
  .ga-row { padding: 10px 12px; column-gap: 10px; }
  .ga-kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ga-kv dd { margin-bottom: 6px; }
  .gaa-form { grid-template-columns: minmax(0, 1fr); }
  .gaa-form .gaa-wide { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ga-hero.live .ga-hero-glow, .ga-hero .ga-join[data-join], .ga-hero.live .ga-prize.lg, .ga-spinner { animation: none; }
  .ga-card, .ga-meter > i { transition: none; }
  .ga-card:hover { transform: none; }
}
