:root {
  --gold: #ffd43b;
  --gold-light: #ffe88a;
  --orange: #ff7043;
  --green: #65e69a;
  --bg: #08070b;
  --surface: #111016;
  --surface-2: #17151d;
  --surface-3: #0c0b10;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --text: #fff;
  --muted: #9994a4;
  --muted-2: #686472;
  --heading: "Space Grotesk", sans-serif;
  --display: "Chakra Petch", sans-serif;
  --mono: "JetBrains Mono", monospace;
}

body {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: -2;
  opacity: 0.08;
}

.ambient-one {
  top: -180px;
  left: 35%;
  background: var(--gold);
}

.ambient-two {
  top: 700px;
  right: -180px;
  background: var(--orange);
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.app {
  width: min(1080px, calc(100% - 32px));
  margin: 30px auto 80px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  margin-bottom: 35px;

  color: var(--text-muted);

  font-size: 13px;
  font-weight: 500;

  text-decoration: none;

  transition: color 0.2s ease;
}

.back-button:hover {
  color: var(--text);
}


.hero {
  text-align: center;
  margin-bottom: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  margin-bottom: 16px;
  color: var(--gold);
  background: rgba(255, 212, 59, 0.07);
  border: 1px solid rgba(255, 212, 59, 0.22);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(101, 230, 154, 0.7);
  animation: dotPulse 1.7s ease-in-out infinite;
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.hero h1 {
  margin: 0;
  font-family: var(--heading);
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -2.5px;
}

.hero h1 span {
  color: var(--gold);
}

.subtitle {
  max-width: 520px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.machine-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 42px;
}

.machine {
  position: relative;
  width: min(700px, calc(100% - 45px));
  padding: 16px;
  background: linear-gradient(145deg, #211c27, #0e0c12);
  border: 1px solid #3a3044;
  border-radius: 20px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px rgba(255, 255, 255, 0.08);
  animation: machineFloat 5s ease-in-out infinite;
}

@keyframes machineFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.machine-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  background: #0a090d;
  border: 1px solid #302738;
  border-radius: 10px;
}

.machine-title {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--display);
  letter-spacing: 2px;
}

.machine-title .mini-label {
  color: #77717f;
  font-size: 0.7rem;
}

.machine-title strong {
  color: var(--gold);
  font-size: 1.2rem;
}

.machine-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 1px;
}

.status-light {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px rgba(101, 230, 154, 0.7);
}

.machine-lights {
  display: flex;
  justify-content: space-between;
  padding: 10px 8px;
}

.machine-lights i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.35;
  box-shadow: 0 0 8px rgba(255, 212, 59, 0.5);
  animation: lightBlink 1.4s ease-in-out infinite;
}

.machine-lights i:nth-child(2n) {
  animation-delay: 0.2s;
}

.machine-lights i:nth-child(3n) {
  animation-delay: 0.4s;
}

@keyframes lightBlink {
  0%,
  100% {
    opacity: 0.25;
  }

  50% {
    opacity: 1;
  }
}

.machine-screen {
  padding: 10px;
  background: #050407;
  border: 2px solid #2d2435;
  border-radius: 13px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
}

.screen-top {
  display: flex;
  justify-content: space-between;
  padding: 3px 5px 9px;
  color: #625d69;
  font-family: var(--mono);
  font-size: 0.48rem;
  letter-spacing: 1.2px;
}

.reels-frame {
  position: relative;
  padding: 7px;
  background: #020203;
  border: 1px solid #28212e;
  border-radius: 9px;
}

.reels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.reel-window {
  position: relative;
  height: 120px;
  overflow: hidden;
  background: linear-gradient(180deg, #f5f5f5, #d7d7d7);
  border-radius: 7px;
  box-shadow:
    inset 0 8px 14px rgba(0, 0, 0, 0.24),
    inset 0 -8px 14px rgba(0, 0, 0, 0.24);
}

.reel-window::before,
.reel-window::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 25px;
  z-index: 2;
  pointer-events: none;
}

.reel-window::before {
  top: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent);
}

.reel-window::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.35), transparent);
}

.reel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 8px;
  color: #111;
  font-family: var(--heading);
  font-size: clamp(0.8rem, 2vw, 1.1rem);
  font-weight: 700;
  text-align: center;
  overflow-wrap: anywhere;
}

.reel.spinning {
  animation: reelShake 0.08s linear infinite alternate;
}

@keyframes reelShake {
  from {
    transform: translateY(-4px);
  }

  to {
    transform: translateY(4px);
  }
}

.payline {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 112, 67, 0.75);
  box-shadow: 0 0 8px rgba(255, 112, 67, 0.3);
  transform: translateY(-50%);
  pointer-events: none;
}

.machine-message {
  margin-top: 8px;
  padding: 9px;
  color: var(--gold);
  background: #08070a;
  border: 1px solid #29212f;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-align: center;
}

.machine-footer {
  display: flex;
  justify-content: space-between;
  padding: 11px 5px 1px;
  color: #5f5967;
  font-family: var(--mono);
  font-size: 0.45rem;
  letter-spacing: 1px;
}

.lever-area {
  position: absolute;
  top: 50%;
  right: -40px;
  transform: translateY(-50%);
}

.lever {
  position: relative;
  width: 32px;
  height: 140px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.lever-track {
  position: absolute;
  top: 22px;
  left: 7px;
  width: 10px;
  height: 98px;
  background: #151018;
  border: 2px solid #3a3044;
  border-radius: 8px;
}

.lever-arm {
  position: absolute;
  bottom: 39px;
  left: 10px;
  width: 5px;
  height: 70px;
  background: linear-gradient(90deg, #777, #fff, #777);
  border-radius: 5px;
  transform-origin: bottom center;
  transition: transform 0.2s ease;
}

.lever-ball {
  position: absolute;
  top: 8px;
  left: 0;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff9b78, #a62f0d);
  box-shadow: 0 0 14px rgba(255, 112, 67, 0.35);
  transition: transform 0.2s ease;
}

.lever:active .lever-arm {
  transform: rotateX(40deg) scaleY(0.7);
}

.lever:active .lever-ball {
  transform: translateY(58px);
}

.winner-section {
  margin-bottom: 38px;
}

.winner-section.hidden {
  display: none;
}

.winner-card {
  position: relative;
  overflow: hidden;
  padding: 34px 20px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 212, 59, 0.14), transparent 55%),
    #121016;
  border: 1px solid rgba(255, 212, 59, 0.35);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: winnerIn 0.5s ease both;
}

@keyframes winnerIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.winner-tag {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 2px;
}

.winner-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 10px auto;
  color: var(--gold);
  background: rgba(255, 212, 59, 0.1);
  border: 1px solid rgba(255, 212, 59, 0.25);
  border-radius: 50%;
  font-size: 1.5rem;
  animation: winnerStar 1.8s ease-in-out infinite;
}

@keyframes winnerStar {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08) rotate(4deg);
  }
}

.winner-card h2 {
  margin: 4px 0 7px;
  font-family: var(--heading);
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  overflow-wrap: anywhere;
}

.winner-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.panel {
  min-width: 0;
  padding: 22px;
  background: rgba(17, 16, 22, 0.9);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(12px);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 23px;
}

.section-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 1.3px;
}

.panel-header h2 {
  margin: 0 0 5px;
  font-family: var(--heading);
  font-size: 1.25rem;
}

.panel-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.field {
  margin-bottom: 17px;
}

.field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 0.76rem;
  font-weight: 700;
}

input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  color: #fff;
  background: #09080d;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  font-family: inherit;
  font-size: 0.82rem;
  transition: 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: rgba(255, 212, 59, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 212, 59, 0.05);
}

input::placeholder,
textarea::placeholder {
  color: #5e5a67;
}

textarea {
  min-height: 145px;
  resize: vertical;
}

.field-help {
  margin: 7px 1px 0;
  color: var(--muted-2);
  font-size: 0.66rem;
  line-height: 1.5;
}

.source-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 9px;
}

.source-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  transition: 0.2s ease;
}

.source-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-light);
}

.source-btn.active {
  background: rgba(255, 212, 59, 0.07);
  border-color: rgba(255, 212, 59, 0.28);
}

.source-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  color: var(--gold);
  background: rgba(255, 212, 59, 0.08);
  border-radius: 7px;
  font-size: 0.85rem;
}

.source-btn strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.73rem;
}

.source-btn small {
  display: block;
  color: var(--muted);
  font-size: 0.61rem;
}

.giveaway-source,
.manual-source {
  margin-top: 15px;
}

.id-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.giveaway-info {
  margin-top: 12px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.giveaway-loading-empty {
  padding: 25px 10px;
  text-align: center;
}

.empty-giveaway-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  color: var(--gold);
  background: rgba(255, 212, 59, 0.08);
  border-radius: 50%;
}

.giveaway-loading-empty strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
}

.giveaway-loading-empty p {
  max-width: 290px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.loaded-giveaway {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.loaded-giveaway-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.loaded-giveaway-header > div {
  min-width: 0;
}

.loaded-badge {
  display: inline-flex;
  padding: 3px 7px;
  margin-bottom: 5px;
  color: var(--green);
  background: rgba(101, 230, 154, 0.07);
  border: 1px solid rgba(101, 230, 154, 0.2);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.loaded-giveaway-header strong {
  display: block;
  font-family: var(--heading);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.loaded-check {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  color: var(--green);
  background: rgba(101, 230, 154, 0.08);
  border-radius: 50%;
  font-size: 0.7rem;
}

.giveaway-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.giveaway-stat {
  padding: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 7px;
}

.stat-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.52rem;
  text-transform: uppercase;
}

.giveaway-stat strong {
  display: block;
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.loaded-description {
  padding: 10px;
  background: rgba(255, 212, 59, 0.03);
  border: 1px solid rgba(255, 212, 59, 0.09);
  border-radius: 7px;
}

.description-title {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 0.6rem;
  font-weight: 700;
}

.loaded-description p {
  margin: 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.5;
}

.participants-preview {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.participants-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.participants-header span {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
}

.participants-header small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.59rem;
}

/* Actions */

.participant-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.participant-action {
  border: 1px solid var(--border);
  background: var(--surface, #fff);
  color: var(--text, #111);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 0.62rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease;
}

.participant-action:hover {
  border-color: var(--accent);
  background: var(--accent-soft, rgba(0, 0, 0, 0.03));
}

.participant-action:active {
  transform: scale(0.97);
}

.selected-count {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 0.6rem;
}

/* Participant list */

.participant-list {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface, #fff);
}

/* Individual participant */

.participant-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease;
}

.participant-item:last-child {
  border-bottom: none;
}

.participant-item:hover {
  background: var(--accent-soft, rgba(0, 0, 0, 0.025));
}

.participant-item.selected {
  background: var(--accent-soft, rgba(0, 0, 0, 0.04));
}

/* Number */

.participant-number {
  width: 27px;
  flex-shrink: 0;
  color: var(--muted-2);
  font-size: 0.58rem;
  font-weight: 700;
  text-align: right;
}

/* Checkbox */

.participant-checkbox {
  width: 13px;
  height: 13px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

/* Username */

.participant-username {
  flex: 1;
  min-width: 0;
  color: var(--text, #111);
  font-size: 0.68rem;
  font-weight: 600;

  /* Makes username easy to select/copy */
  user-select: text;
  cursor: text;
}

/* Empty */

.empty-state {
  padding: 22px 12px;
  text-align: center;
  color: var(--muted-2);
  font-size: 0.64rem;
}

/* Scrollbar */

.participant-list::-webkit-scrollbar {
  width: 5px;
}

.participant-list::-webkit-scrollbar-track {
  background: transparent;
}

.participant-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.participant-list::-webkit-scrollbar-thumb:hover {
  background: var(--muted-2);
}
.counter-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.58rem;
  white-space: nowrap;
}

.participant-list,
.winner-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 220px;
  overflow-y: auto;
}

.participant-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  font-size: 0.68rem;
}

.participant-number {
  min-width: 24px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.57rem;
}

.participant-username {
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.draw-settings {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--border);
}

.settings-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
  margin-bottom: 13px;
}

.settings-heading h3 {
  margin: 0;
  font-family: var(--heading);
  font-size: 0.92rem;
}

.settings-note {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.54rem;
}

.field-lock {
  margin-left: auto;
  font-size: 0.62rem;
  opacity: 0.75;
}

.locked-input {
  color: #c7c3cc !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  cursor: not-allowed;
  opacity: 0.8;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 7px;
  margin-top: 20px;
}

.primary-btn,
.secondary-btn {
  min-height: 42px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--heading);
  font-weight: 700;
  transition: 0.2s ease;
}

.primary-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  color: #151008;
  background: linear-gradient(135deg, var(--gold), #ffb82e);
  border: 0;
  font-size: 0.78rem;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 212, 59, 0.15);
}

.button-arrow {
  font-size: 1rem;
}

.secondary-btn {
  padding: 10px 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  font-size: 0.68rem;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-light);
}

.primary-btn:active,
.secondary-btn:active {
  transform: scale(0.98);
}

.primary-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.status {
  min-height: 17px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
}

.progress-pill {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.58rem;
}

.winner-list {
  max-height: 390px;
}

.empty-state {
  padding: 40px 15px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  display: block;
  margin-bottom: 8px;
  color: #5f5a67;
  font-size: 1.5rem;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: #d4d0d9;
  font-size: 0.75rem;
}

.empty-state p {
  margin: 0;
  font-size: 0.66rem;
  line-height: 1.5;
}

.winner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  animation: rowIn 0.3s ease both;
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateX(8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.winner-row .name {
  min-width: 0;
  font-size: 0.73rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.winner-row .prize-tag {
  flex: 0 0 auto;
  max-width: 45%;
  color: var(--gold);
  font-size: 0.6rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.hidden {
  display: none !important;
}



@media (max-width: 900px) {
  .app {
    width: min(760px, calc(100% - 28px));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .lever-area {
    display: none;
  }
}

@media (max-width: 650px) {
  .app {
    width: calc(100% - 22px);
    margin-top: 20px;
  }

  .hero {
    margin-bottom: 32px;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 11vw, 3.5rem);
    letter-spacing: -1.5px;
  }

  .subtitle {
    font-size: 0.8rem;
  }

  .machine {
    width: 100%;
    padding: 11px;
    border-radius: 15px;
  }

  .machine-header {
    min-height: 42px;
  }

  .machine-lights {
    padding: 8px 4px;
  }

  .machine-screen {
    padding: 7px;
  }

  .reel-window {
    height: 92px;
  }

  .reel {
    font-size: 0.7rem;
  }

  .panel {
    padding: 17px;
  }

  .source-buttons {
    grid-template-columns: 1fr;
  }

  .giveaway-stats {
    grid-template-columns: 1fr 1fr;
  }

  .giveaway-stat:last-child {
    grid-column: 1 / -1;
  }

  .settings-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .actions {
    grid-template-columns: 1fr 1fr;
  }

  .primary-btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  .app {
    width: calc(100% - 16px);
  }

  .back-button {
    margin-bottom: 22px;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .machine-header {
    padding: 0 10px;
  }

  .machine-status {
    font-size: 0.48rem;
  }

  .machine-title strong {
    font-size: 1rem;
  }

  .screen-top {
    font-size: 0.42rem;
  }

  .reels {
    gap: 4px;
  }

  .reels-frame {
    padding: 5px;
  }

  .reel-window {
    height: 75px;
  }

  .reel {
    padding: 4px;
    font-size: 0.6rem;
  }

  .panel {
    padding: 14px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .giveaway-stats {
    grid-template-columns: 1fr;
  }

  .giveaway-stat:last-child {
    grid-column: auto;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .primary-btn {
    grid-column: auto;
  }

  .secondary-btn {
    width: 100%;
  }

  .id-input {
    grid-template-columns: 1fr;
  }

  .winner-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .winner-row .prize-tag {
    max-width: 100%;
    text-align: left;
  }
}

@media (max-width: 330px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .machine {
    padding: 8px;
  }

  .reel-window {
    height: 67px;
  }

  .reel {
    font-size: 0.54rem;
  }

  .panel {
    padding: 12px;
  }
}