/* =========================================================
   BYTEKENO — GREEN TERMINAL / MODERN KENO STYLE
========================================================= */

:root {
  --bg: #101210;
  --surface: #171a17;
  --surface-2: #1d211d;
  --surface-3: #242824;

  --line: #303530;
  --line-light: #3a403a;

  --green: #8ee36b;
  --green-bright: #a0ed7d;
  --green-dark: #5da847;
  --green-soft: rgba(142, 227, 107, 0.08);

  --text: #f2f4ef;
  --text-soft: #b1b7ae;
  --text-muted: #777e75;
  --text-dim: #5e655d;

  --danger: #e47777;

  --heading: "DM Sans", sans-serif;
  --display: "DM Sans", sans-serif;
  --mono: "JetBrains Mono", monospace;

  --radius: 10px;
}


/* =========================================================
   BASE
========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;

  background: var(--bg);
  color: var(--text);

  font-family: "DM Sans", sans-serif;
}


/* =========================================================
   BACKGROUND
========================================================= */

body::before {
  content: "";

  position: fixed;
  inset: 0;

  pointer-events: none;
  z-index: -2;

  background:
    radial-gradient(
      circle at 50% -20%,
      rgba(142, 227, 107, 0.09),
      transparent 45%
    );
}


/* Subtle grid */

body::after {
  content: "";

  position: fixed;
  inset: 0;

  pointer-events: none;
  z-index: -3;

  opacity: 0.18;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px
    );

  background-size: 48px 48px;

  mask-image:
    linear-gradient(
      to bottom,
      black,
      transparent 80%
    );
}


/* =========================================================
   APP
========================================================= */

.keno-app {
  width: min(1080px, calc(100% - 32px));

  margin: 0 auto;

  padding: 30px 0 70px;
}


/* =========================================================
   BACK BUTTON
========================================================= */

.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,
    transform 0.2s ease;
}

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

  transform: translateX(-2px);
}


/* =========================================================
   HERO
========================================================= */

.keno-hero {
  max-width: 650px;

  margin: 0 auto 38px;

  text-align: center;
}

.keno-badge {
  display: inline-flex;
  align-items: center;

  gap: 8px;

  padding: 6px 10px;

  border: 1px solid var(--line);
  border-radius: 999px;

  background: var(--surface);

  color: var(--text-muted);

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 0.7px;
}

.badge-dot {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: var(--green);

  box-shadow:
    0 0 10px rgba(142, 227, 107, 0.45);

  animation: dotPulse 1.8s ease-in-out infinite;
}

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

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

.keno-hero h1 {
  margin: 17px 0 12px;

  color: var(--text);

  font-size: clamp(48px, 8vw, 78px);

  line-height: 0.95;

  font-weight: 800;

  letter-spacing: -4px;
}

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

.keno-hero p {
  max-width: 500px;

  margin: 0 auto;

  color: var(--text-muted);

  font-size: 14px;

  line-height: 1.6;
}


/* =========================================================
   KENO MACHINE
========================================================= */

.keno-machine {
  position: relative;

  overflow: hidden;

  border: 1px solid var(--line);

  border-radius: 12px;

  background: var(--surface);

  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.25);

  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.keno-machine:hover {
  border-color: var(--line-light);
}


/* =========================================================
   MACHINE TOP BAR
========================================================= */

.keno-topbar {
  display: flex;

  align-items: center;
  justify-content: space-between;

  min-height: 48px;

  padding: 0 17px;

  border-bottom: 1px solid var(--line);

  background: #141714;
}

.system-name {
  color: var(--text);

  font-size: 12px;

  font-weight: 800;

  letter-spacing: 0.5px;
}

.system-status {
  display: flex;

  align-items: center;

  gap: 7px;

  color: var(--text-muted);

  font-size: 10px;

  font-weight: 600;
}

.status-light {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: var(--green);

  box-shadow:
    0 0 8px rgba(142, 227, 107, 0.55);

  animation: statusPulse 1.8s ease-in-out infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}


/* =========================================================
   GAME INFO
========================================================= */

.game-info {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  margin-top: 9px;

  border-bottom: 1px solid var(--line);
}

.info-box {
  padding: 14px 16px;

  text-align: center;

  border-right: 1px solid var(--line);
}

.info-box:last-child {
  border-right: 0;
}

.info-box span {
  display: block;

  margin-bottom: 5px;

  color: var(--text-muted);

  font-size: 9px;

  font-weight: 700;

  letter-spacing: 0.8px;

  text-transform: uppercase;
}

.info-box strong {
  color: var(--text);

  font-size: 17px;

  font-weight: 700;
}

.info-box.highlight strong {
  color: var(--green);
}


/* =========================================================
   TILE STAGE
========================================================= */

.tile-stage {
  position: relative;

  min-height: 400px;

  padding: 20px;

  overflow: hidden;

  background:
    radial-gradient(
      circle at center,
      rgba(142, 227, 107, 0.035),
      transparent 60%
    ),
    #111411;
}


/* =========================================================
   SCAN BEAM
========================================================= */

.scan-beam {
  position: absolute;

  left: 0;
  top: 0;

  width: 100%;
  height: 2px;

  opacity: 0;

  pointer-events: none;

  background: var(--green);

  box-shadow:
    0 0 12px rgba(142, 227, 107, 0.6);
}

.keno-machine.drawing .scan-beam {
  opacity: 0.5;

  animation:
    scanBeam 1.2s linear infinite;
}

@keyframes scanBeam {
  0% {
    top: 0;
  }

  100% {
    top: 100%;
  }
}


/* =========================================================
   TILE BOARD
========================================================= */

.tile-board {
  position: relative;

  z-index: 2;

  display: grid;

  grid-template-columns:
    repeat(5, 1fr);

  gap: 8px;
}


/* =========================================================
   KENO TILE
========================================================= */

.keno-tile {
  position: relative;

  min-height: 68px;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 20px 9px 8px;

  overflow: hidden;

  border: 1px solid var(--line);

  border-radius: 8px;

  background: var(--surface-2);

  cursor: default;

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.keno-tile:hover {
  border-color: var(--line-light);

  background: var(--surface-3);

  transform: translateY(-1px);
}

.tile-number {
  position: absolute;

  top: 6px;
  left: 8px;

  color: var(--text-muted);

  font-size: 8px;

  font-weight: 700;
}

.tile-name {
  max-width: 100%;

  overflow: hidden;

  color: var(--text-soft);

  font-size: 11px;

  font-weight: 600;

  text-overflow: ellipsis;

  white-space: nowrap;
}


/* =========================================================
   DRAWING STATE
========================================================= */

.keno-machine.drawing .keno-tile {
  animation:
    tileMove 1.1s ease-in-out infinite;
}

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

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


/* =========================================================
   SCANNING TILE
========================================================= */

.keno-tile.scanning {
  z-index: 20;

  transform: scale(1.06);

  border-color: var(--green);

  background:
    rgba(142, 227, 107, 0.12);

  box-shadow:
    0 0 0 3px rgba(142, 227, 107, 0.05),
    0 0 22px rgba(142, 227, 107, 0.08);
}

.keno-tile.scanning .tile-number {
  color: var(--green);
}

.keno-tile.scanning .tile-name {
  color: var(--text);
}


/* =========================================================
   WINNER TILE
========================================================= */

.keno-tile.winner {
  z-index: 30;

  transform: scale(1.06);

  border-color: var(--green);

  background: var(--green);

  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.3),
    0 0 25px rgba(142, 227, 107, 0.12);

  animation:
    winnerPop 0.45s ease;
}

.keno-tile.winner .tile-number,
.keno-tile.winner .tile-name {
  color: #14200f;
}

.keno-tile.winner .tile-name {
  font-weight: 800;
}

.keno-tile.winner::after {
  content: "★";

  position: absolute;

  top: 5px;
  right: 7px;

  color: #14200f;

  font-size: 9px;
}

@keyframes winnerPop {
  0% {
    transform: scale(0.95);
  }

  65% {
    transform: scale(1.09);
  }

  100% {
    transform: scale(1.06);
  }
}


/* =========================================================
   USED TILE
========================================================= */

.keno-tile.used {
  opacity: 0.35;

  background: #151815;

  transform: scale(0.98);
}

.keno-tile.used .tile-name {
  color: var(--text-muted);
}


/* =========================================================
   EMPTY BOARD
========================================================= */

.board-empty {
  grid-column: 1 / -1;

  min-height: 360px;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  text-align: center;
}

.empty-symbol {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 58px;
  height: 58px;

  margin-bottom: 14px;

  border: 1px solid var(--line);

  border-radius: 50%;

  color: var(--text-muted);

  background: var(--surface-2);

  font-size: 22px;
}

.board-empty p {
  margin: 0;

  color: var(--text-muted);

  font-size: 12px;
}


/* =========================================================
   MACHINE DISPLAY
========================================================= */

.machine-display {
  padding: 14px 20px;

  text-align: center;

  border-top: 1px solid var(--line);

  background: #141714;
}

.display-label {
  margin-bottom: 4px;

  color: var(--text-muted);

  font-size: 8px;

  font-weight: 700;

  letter-spacing: 1px;

  text-transform: uppercase;
}

#machineMessage {
  color: var(--green);

  font-size: 12px;

  font-weight: 700;

  transition:
    color 0.2s ease;
}


/* =========================================================
   WINNER REVEAL
========================================================= */

.winner-reveal {
  position: absolute;

  z-index: 100;

  top: 50%;
  left: 50%;

  width: min(380px, calc(100% - 30px));

  padding: 28px 22px;

  text-align: center;

  border: 1px solid var(--line-light);

  border-radius: 12px;

  background:
    radial-gradient(
      circle at 50% 0,
      rgba(142, 227, 107, 0.08),
      transparent 55%
    ),
    #1b201b;

  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(142, 227, 107, 0.04);

  transform:
    translate(-50%, -50%);

  animation:
    reveal 0.35s ease;
}

.winner-star {
  margin-bottom: 8px;

  color: var(--green);

  font-size: 24px;

  animation:
    winnerStar 1.8s ease-in-out infinite;
}

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

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

.winner-label {
  color: var(--text-muted);

  font-size: 9px;

  font-weight: 800;

  letter-spacing: 1.2px;
}

.winner-reveal h2 {
  margin: 9px 0 5px;

  overflow-wrap: anywhere;

  color: var(--text);

  font-size:
    clamp(26px, 6vw, 42px);

  line-height: 1;

  font-weight: 800;
}

.winner-reveal p {
  margin: 0;

  color: var(--text-muted);

  font-size: 12px;
}

@keyframes reveal {
  from {
    opacity: 0;

    transform:
      translate(-50%, -50%)
      scale(0.92);
  }

  to {
    opacity: 1;

    transform:
      translate(-50%, -50%)
      scale(1);
  }
}


/* =========================================================
   DASHBOARD
========================================================= */

.dashboard {
  display: grid;

  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(280px, 0.8fr);

  gap: 14px;

  margin-top: 14px;

  align-items: start;
}


/* =========================================================
   PANELS
========================================================= */

.panel {
  min-width: 0;

  padding: 20px;

  border: 1px solid var(--line);

  border-radius: 10px;

  background: var(--surface);

  transition:
    border-color 0.2s ease;
}

.panel:hover {
  border-color: var(--line-light);
}

.panel-title {
  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 12px;

  margin-bottom: 22px;
}

.panel-title h2 {
  margin: 0 0 4px;

  color: var(--text);

  font-size: 19px;

  font-weight: 750;

  letter-spacing: -0.4px;
}

.panel-title p {
  margin: 0;

  color: var(--text-muted);

  font-size: 11px;

  line-height: 1.5;
}


/* =========================================================
   PANEL ICON
========================================================= */

.panel-icon {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;

  flex: 0 0 auto;

  border: 1px solid var(--line);

  border-radius: 7px;

  color: var(--green);

  background: var(--surface-2);

  font-size: 13px;
}


/* =========================================================
   FORM
========================================================= */

.field {
  margin-bottom: 17px;
}

.field label {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 10px;

  margin-bottom: 7px;

  color: var(--text-soft);

  font-size: 11px;

  font-weight: 700;
}

.counter {
  color: var(--text-muted);

  font-size: 9px;

  font-weight: 600;

  white-space: nowrap;
}


/* =========================================================
   INPUTS
========================================================= */

textarea,
input[type="text"],
input[type="number"] {
  width: 100%;

  outline: none;

  border: 1px solid var(--line);

  border-radius: 7px;

  background: #121512;

  color: var(--text);

  font-family: "DM Sans", sans-serif;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

textarea {
  min-height: 150px;

  padding: 12px;

  resize: vertical;

  font-size: 12px;

  line-height: 1.6;
}

input[type="text"],
input[type="number"] {
  height: 42px;

  padding: 0 12px;

  font-size: 12px;
}

textarea::placeholder,
input::placeholder {
  color: var(--text-dim);
}

textarea:focus,
input:focus {
  border-color: var(--green-dark);

  background: #151915;

  box-shadow:
    0 0 0 3px rgba(142, 227, 107, 0.04);
}

.field small {
  display: block;

  margin-top: 7px;

  color: var(--text-muted);

  font-size: 9px;

  line-height: 1.4;
}


/* =========================================================
   ENTRY SOURCE
========================================================= */

.entry-source-section {
  margin-bottom: 4px;
}

.source-buttons {
  display: grid;

  grid-template-columns:
    repeat(2, 1fr);

  gap: 8px;

  margin-top: 9px;
}


/* =========================================================
   SOURCE BUTTON
========================================================= */

.source-btn {
  display: flex;

  align-items: center;

  gap: 10px;

  min-height: 68px;

  padding: 11px;

  border: 1px solid var(--line);

  border-radius: 8px;

  background: var(--surface-2);

  color: var(--text);

  cursor: pointer;

  text-align: left;

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.source-btn:hover {
  border-color: var(--line-light);

  background: var(--surface-3);

  transform: translateY(-1px);
}

.source-btn.active {
  border-color: var(--green-dark);

  background:
    linear-gradient(
      135deg,
      rgba(142, 227, 107, 0.10),
      rgba(142, 227, 107, 0.025)
    );

  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.12);
}

.source-icon {
  display: flex;

  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 31px;
  height: 31px;

  border: 1px solid var(--line);

  border-radius: 7px;

  color: var(--text-muted);

  background: var(--surface-3);

  font-size: 13px;

  font-weight: 800;

  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.source-btn.active .source-icon {
  border-color: transparent;

  background: var(--green);

  color: #16200f;

  box-shadow:
    0 5px 15px rgba(142, 227, 107, 0.12);
}

.source-btn strong {
  display: block;

  margin-bottom: 3px;

  font-size: 11px;
}

.source-btn small {
  display: block;

  color: var(--text-muted);

  font-size: 9px;

  line-height: 1.4;
}


/* =========================================================
   GIVEAWAY / MANUAL SOURCE
========================================================= */

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


/* =========================================================
   GIVEAWAY ID
========================================================= */

.giveaway-id-row {
  display: grid;

  grid-template-columns:
    1fr auto;

  gap: 7px;
}


/* =========================================================
   GIVEAWAY INFO
========================================================= */

.giveaway-info {
  margin-top: 12px;

  padding: 13px;

  border: 1px solid var(--line);

  border-radius: 8px;

  background: var(--surface-2);
}


/* =========================================================
   EMPTY GIVEAWAY
========================================================= */

.giveaway-empty {
  padding: 25px 10px;

  text-align: center;
}

.empty-giveaway-icon {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;

  margin: 0 auto 10px;

  border: 1px solid var(--line);

  border-radius: 50%;

  color: var(--text-muted);

  background: var(--surface-2);
}

.giveaway-empty strong {
  display: block;

  margin-bottom: 4px;

  font-size: 12px;
}

.giveaway-empty p {
  max-width: 290px;

  margin: 0 auto;

  color: var(--text-muted);

  font-size: 9px;

  line-height: 1.5;
}


/* =========================================================
   LOADED GIVEAWAY
========================================================= */

.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(--line);
}

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

.loaded-badge {
  display: inline-flex;

  padding: 3px 7px;

  margin-bottom: 5px;

  border: 1px solid rgba(142, 227, 107, 0.18);

  border-radius: 5px;

  color: var(--green);

  background:
    rgba(142, 227, 107, 0.06);

  font-size: 8px;

  font-weight: 800;

  letter-spacing: 0.8px;
}

.loaded-giveaway-header strong {
  display: block;

  font-size: 13px;

  overflow-wrap: anywhere;
}

.loaded-check {
  display: flex;

  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  width: 25px;
  height: 25px;

  color: var(--green);

  background:
    rgba(142, 227, 107, 0.08);

  border: 1px solid
    rgba(142, 227, 107, 0.12);

  border-radius: 50%;

  font-size: 11px;
}


/* =========================================================
   GIVEAWAY STATS
========================================================= */

.giveaway-stats {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 7px;
}

.giveaway-stat {
  padding: 10px;

  border: 1px solid var(--line);

  border-radius: 7px;

  background: var(--surface-2);
}

.giveaway-stat span {
  display: block;

  margin-bottom: 4px;

  color: var(--text-muted);

  font-size: 8px;

  text-transform: uppercase;
}

.giveaway-stat strong {
  display: block;

  color: var(--text);

  font-size: 10px;

  overflow-wrap: anywhere;
}


/* =========================================================
   GIVEAWAY CLOSING
========================================================= */

.giveaway-closing {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 10px;

  padding: 10px;

  border-radius: 7px;

  background: var(--surface-2);
}

.giveaway-closing span {
  color: var(--text-muted);

  font-size: 8px;
}

.giveaway-closing strong {
  color: var(--text-soft);

  font-size: 9px;

  text-align: right;
}


/* =========================================================
   DESCRIPTION
========================================================= */

.loaded-description {
  padding: 10px;

  border: 1px solid
    rgba(142, 227, 107, 0.10);

  border-radius: 7px;

  background:
    rgba(142, 227, 107, 0.025);
}

.loaded-description > span {
  display: block;

  margin-bottom: 4px;

  color: var(--green);

  font-size: 8px;

  font-weight: 800;

  letter-spacing: 0.8px;
}

.loaded-description p {
  margin: 0;

  color: var(--text-muted);

  font-size: 9px;

  line-height: 1.5;
}


/* =========================================================
   PARTICIPANTS
========================================================= */

.participants-preview {
  padding-top: 12px;

  border-top: 1px solid var(--line);
}

.participants-header {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 8px;
}

.participants-header strong {
  display: block;

  font-size: 11px;
}

.participants-header small {
  display: block;

  margin-top: 2px;

  color: var(--text-muted);

  font-size: 8px;
}

.participant-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;

  border: 1px solid var(--line);

  border-radius: 7px;

  background: var(--surface-2);

  font-size: 10px;
}

.participant-number {
  min-width: 24px;

  color: var(--green);

  font-size: 8px;

  font-family: var(--mono);
}

.participant-username {
  min-width: 0;

  color: var(--text-soft);

  font-weight: 600;

  overflow-wrap: anywhere;
}


/* =========================================================
   SETTINGS
========================================================= */

.settings {
  display: grid;

  grid-template-columns:
    repeat(2, 1fr);

  gap: 12px;

  margin-top: 20px;

  padding-top: 17px;

  border-top: 1px solid var(--line);
}

.field-lock {
  margin-left: auto;

  color: var(--text-muted);

  font-size: 9px;

  opacity: 0.75;
}

.locked-input {
  color: var(--text-soft) !important;

  background:
    rgba(255, 255, 255, 0.025) !important;

  border-color:
    var(--line) !important;

  cursor: not-allowed;

  opacity: 0.7;
}


/* =========================================================
   BUTTONS
========================================================= */

.draw-button,
.secondary-button {
  height: 43px;

  border-radius: 7px;

  font-family: "DM Sans", sans-serif;

  font-size: 11px;

  font-weight: 750;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.draw-button {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 8px;

  width: 100%;

  border: 0;

  background: var(--green);

  color: #16200f;

  box-shadow:
    0 7px 20px
      rgba(142, 227, 107, 0.08);
}

.draw-button:hover {
  background: var(--green-bright);

  transform: translateY(-1px);

  box-shadow:
    0 10px 25px
      rgba(142, 227, 107, 0.14);
}

.button-icon {
  font-size: 14px;
}

.secondary-button {
  padding: 0 15px;

  border: 1px solid var(--line);

  background: var(--surface-2);

  color: var(--text-soft);
}

.secondary-button:hover {
  border-color: var(--line-light);

  background: var(--surface-3);

  color: var(--text);
}

.draw-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.draw-button:disabled,
.secondary-button:disabled {
  opacity: 0.4;

  cursor: not-allowed;
}


/* =========================================================
   ACTIONS
========================================================= */

.actions {
  display: grid;

  grid-template-columns:
    1fr auto auto;

  gap: 8px;

  margin-top: 20px;
}


/* =========================================================
   STATUS
========================================================= */

.status {
  min-height: 16px;

  margin-top: 9px;

  color: var(--text-muted);

  font-size: 10px;
}


/* =========================================================
   RESULTS / WINNER BOARD
========================================================= */

.results-panel {
  min-width: 0;
}

.winner-list {
  display: flex;

  flex-direction: column;

  gap: 7px;

  max-height: 320px;

  overflow-y: auto;
}

.winner-row {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 10px;

  padding: 10px 11px;

  border: 1px solid var(--line);

  border-radius: 7px;

  background: var(--surface-2);

  animation:
    rowIn 0.25s ease;

  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.winner-row:hover {
  border-color: var(--line-light);

  background: var(--surface-3);
}

.winner-row .name {
  min-width: 0;

  overflow: hidden;

  color: var(--green);

  font-size: 11px;

  font-weight: 750;

  text-overflow: ellipsis;

  white-space: nowrap;
}

.winner-row .prize-tag {
  flex: 0 0 auto;

  max-width: 120px;

  overflow: hidden;

  padding: 4px 7px;

  border-radius: 5px;

  background: var(--surface-3);

  color: var(--text-muted);

  font-size: 9px;

  text-overflow: ellipsis;

  white-space: nowrap;
}

@keyframes rowIn {
  from {
    opacity: 0;

    transform: translateY(5px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}


/* =========================================================
   SMALL EMPTY STATE
========================================================= */

.board-empty.small {
  min-height: 230px;
}

.board-empty.small .empty-symbol {
  width: 48px;
  height: 48px;

  font-size: 17px;
}


/* =========================================================
   HIDDEN
========================================================= */

.hidden {
  display: none !important;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
  padding: 25px 15px 40px;

  text-align: center;

  color: var(--text-muted);

  font-size: 9px;
}

.footer-content p {
  margin: 0;
}


/* =========================================================
   SCROLLBARS
========================================================= */

.participant-list::-webkit-scrollbar,
.winner-list::-webkit-scrollbar {
  width: 4px;
}

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

.participant-list::-webkit-scrollbar-thumb,
.winner-list::-webkit-scrollbar-thumb {
  background: var(--line-light);

  border-radius: 10px;
}

.participant-list::-webkit-scrollbar-thumb:hover,
.winner-list::-webkit-scrollbar-thumb:hover {
  background: var(--green-dark);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 850px) {

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

  .tile-board {
    grid-template-columns:
      repeat(4, 1fr);
  }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

  .keno-app {
    width: calc(100% - 20px);

    padding-top: 20px;
  }

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

  .keno-hero {
    margin-bottom: 28px;
  }

  .keno-hero h1 {
    font-size: 52px;

    letter-spacing: -3px;
  }

  .keno-hero p {
    padding: 0 8px;

    font-size: 12px;
  }

  .keno-topbar {
    padding: 0 13px;
  }

  .game-info {
    grid-template-columns:
      repeat(3, 1fr);
  }

  .info-box {
    padding: 12px 8px;
  }

  .info-box span {
    font-size: 8px;
  }

  .info-box strong {
    font-size: 15px;
  }

  .tile-stage {
    min-height: 350px;

    padding: 12px;
  }

  .tile-board {
    grid-template-columns:
      repeat(2, 1fr);

    gap: 7px;
  }

  .keno-tile {
    min-height: 66px;
  }

  .tile-name {
    font-size: 10px;
  }

  .dashboard {
    margin-top: 10px;
  }

  .panel {
    padding: 16px;
  }

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

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

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

  .draw-button {
    width: 100%;
  }

  .secondary-button {
    width: 100%;
  }

  .winner-row {
    align-items: flex-start;

    flex-direction: column;
  }

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

  .giveaway-stats {
    grid-template-columns:
      repeat(2, 1fr);
  }
}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 380px) {

  .keno-app {
    width: calc(100% - 16px);
  }

  .keno-hero h1 {
    font-size: 45px;

    letter-spacing: -2.5px;
  }

  .keno-topbar {
    padding: 0 10px;
  }

  .system-name {
    font-size: 11px;
  }

  .system-status {
    font-size: 9px;
  }

  .game-info span {
    font-size: 8px;
  }

  .game-info strong {
    font-size: 14px;
  }

  .tile-stage {
    min-height: 330px;

    padding: 9px;
  }

  .keno-tile {
    min-height: 62px;
  }

  .tile-name {
    font-size: 9px;
  }

  .panel {
    padding: 14px;
  }

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

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


/* =========================================================
   ACCESSIBILITY / FOCUS
========================================================= */

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--green);

  outline-offset: 2px;
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    scroll-behavior: auto !important;

    transition-duration: 0.01ms !important;
  }
}