/* =========================================================
   BYTEDNA — GENETIC RANDOMIZER
   Complete UI Stylesheet
========================================================= */

:root {
  --dna-red: #ff304f;
  --dna-red-bright: #ff1744;
  --dna-red-dark: #8f1029;
  --dna-orange: #ff6338;

  --dna-red-soft: rgba(255, 48, 79, 0.12);
  --dna-red-glow: rgba(255, 48, 79, 0.35);

  --dna-bg: #070708;
  --dna-panel: #101012;
  --dna-panel-2: #151518;

  --dna-border: rgba(255, 255, 255, 0.08);
  --dna-border-red: rgba(255, 48, 79, 0.3);

  --dna-text: #f5f5f5;
  --dna-muted: #85858d;
  --dna-soft: #b3b3ba;
}


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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  margin: 0;

  background:
    radial-gradient(
      circle at 50% -20%,
      rgba(255, 48, 79, 0.08),
      transparent 40%
    ),
    var(--dna-bg);

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

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(255, 48, 79, 0.3);
  color: #fff;
}


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

.dna-background {
  position: fixed;
  inset: 0;
  z-index: -2;

  overflow: hidden;

  pointer-events: none;
}

.red-glow {
  position: absolute;

  width: 500px;
  height: 500px;

  border-radius: 50%;

  filter: blur(130px);
  opacity: 0.12;
}

.glow-left {
  top: 15%;
  left: -300px;

  background: var(--dna-red);
}

.glow-right {
  right: -300px;
  bottom: 5%;

  background: var(--dna-orange);
}

.grid-overlay {
  position: absolute;
  inset: 0;

  opacity: 0.08;

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

  background-size: 50px 50px;

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


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

.dna-app {
  width: min(1120px, calc(100% - 40px));

  margin: 0 auto;

  padding:
    28px 0
    100px;
}


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

.dna-hero {
  text-align: center;

  padding:
    45px 0
    38px;
}

.dna-status-badge {
  display: inline-flex;

  align-items: center;
  gap: 9px;

  padding: 7px 13px;

  border: 1px solid var(--dna-border-red);

  background: rgba(255, 48, 79, 0.07);

  color: #ff657b;

  border-radius: 5px;

  font-family:
    "JetBrains Mono",
    monospace;

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

  letter-spacing: 1.5px;
}

.live-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--dna-red);

  box-shadow:
    0 0 0 4px rgba(255, 48, 79, 0.12),
    0 0 15px var(--dna-red);

  animation:
    livePulse 1.5s ease-in-out infinite;
}

.dna-hero h1 {
  margin:
    18px 0
    10px;

  font-family:
    "Chakra Petch",
    sans-serif;

  font-size:
    clamp(54px, 9vw, 92px);

  line-height: 0.9;

  letter-spacing: -3px;

  font-weight: 700;
}

.dna-hero h1 span {
  color: var(--dna-red);

  text-shadow:
    0 0 35px
    rgba(255, 48, 79, 0.2);
}

.dna-hero p {
  max-width: 530px;

  margin:
    22px auto
    0;

  color: var(--dna-muted);

  font-family:
    "Space Grotesk",
    sans-serif;

  font-size: 15px;

  line-height: 1.65;
}


/* =========================================================
   DNA MACHINE
========================================================= */

.dna-machine {
  position: relative;

  overflow: hidden;

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

  background: #0d0d0f;

  box-shadow:
    0 30px 100px
    rgba(0, 0, 0, 0.5);
}


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

.machine-top {
  display: flex;

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

  padding:
    15px 20px;

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

  background:
    linear-gradient(
      180deg,
      #171719,
      #101012
    );
}

.machine-title {
  display: flex;

  align-items: center;

  gap: 12px;
}

.machine-icon {
  display: flex;

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

  width: 34px;
  height: 34px;

  border:
    1px solid var(--dna-border-red);

  background:
    var(--dna-red-soft);

  font-size: 17px;
}

.machine-title strong {
  display: block;

  font-family:
    "Chakra Petch",
    sans-serif;

  font-size: 13px;

  letter-spacing: 1px;
}

.machine-title small {
  display: block;

  margin-top: 3px;

  color: var(--dna-muted);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 8px;

  letter-spacing: 1px;
}

.machine-state {
  display: flex;

  align-items: center;

  gap: 8px;

  color: var(--dna-muted);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 10px;

  letter-spacing: 1px;
}

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

  border-radius: 50%;

  background: var(--dna-red);

  box-shadow:
    0 0 10px
    var(--dna-red);
}


/* =========================================================
   DNA STAGE
========================================================= */

.dna-stage {
  position: relative;

  min-height: 500px;

  display: flex;

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

  overflow: hidden;

  background:
    radial-gradient(
      ellipse at center,
      rgba(255, 48, 79, 0.09),
      transparent 45%
    ),
    #080809;
}

.scanner-grid {
  position: absolute;
  inset: 0;

  opacity: 0.16;

  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 38px,
      rgba(255, 255, 255, 0.035) 39px
    );
}

.scan-line {
  position: absolute;

  left: 0;
  right: 0;

  height: 2px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 48, 79, 0.1),
      var(--dna-red),
      rgba(255, 48, 79, 0.1),
      transparent
    );

  box-shadow:
    0 0 25px
    var(--dna-red);

  opacity: 0.55;

  animation:
    scannerMove 3.5s linear infinite;

  pointer-events: none;
}


/* =========================================================
   PARTICLES
========================================================= */

.dna-particles span {
  position: absolute;

  width: 3px;
  height: 3px;

  border-radius: 50%;

  background:
    var(--dna-red);

  box-shadow:
    0 0 10px
    var(--dna-red);

  opacity: 0.5;

  animation:
    particleFloat 4s ease-in-out infinite;
}

.dna-particles span:nth-child(1) {
  top: 20%;
  left: 25%;
}

.dna-particles span:nth-child(2) {
  top: 35%;
  left: 70%;
  animation-delay: 0.7s;
}

.dna-particles span:nth-child(3) {
  top: 70%;
  left: 28%;
  animation-delay: 1.3s;
}

.dna-particles span:nth-child(4) {
  top: 65%;
  left: 76%;
  animation-delay: 2s;
}

.dna-particles span:nth-child(5) {
  top: 15%;
  left: 60%;
  animation-delay: 1s;
}

.dna-particles span:nth-child(6) {
  top: 80%;
  left: 58%;
  animation-delay: 2.5s;
}

.dna-particles span:nth-child(7) {
  top: 45%;
  left: 18%;
  animation-delay: 0.4s;
}

.dna-particles span:nth-child(8) {
  top: 48%;
  left: 82%;
  animation-delay: 1.8s;
}


/* =========================================================
   DNA HELIX
========================================================= */

.dna-helix {
  position: relative;

  width: 210px;
  height: 390px;

  transform-style: preserve-3d;

  animation:
    dnaFloat 5s ease-in-out infinite;
}

.dna-strand {
  position: absolute;

  top: 0;
  bottom: 0;

  width: 5px;

  border-radius: 100px;

  background:
    linear-gradient(
      to bottom,
      #ff1744,
      #ff6a45,
      #ff1744,
      #8f1029,
      #ff304f
    );

  box-shadow:
    0 0 8px rgba(255, 48, 79, 0.7),
    0 0 25px rgba(255, 48, 79, 0.2);
}

.strand-left {
  left: 50%;

  transform:
    translateX(-50%)
    translateX(-60px);

  animation:
    strandLeft 2.2s ease-in-out infinite;
}

.strand-right {
  left: 50%;

  transform:
    translateX(-50%)
    translateX(60px);

  animation:
    strandRight 2.2s ease-in-out infinite;
}


/* =========================================================
   DNA RUNGS
========================================================= */

.dna-rungs {
  position: absolute;
  inset: 0;

  display: flex;

  flex-direction: column;

  justify-content: space-between;
}

.dna-rungs span {
  display: block;

  width: 120px;
  height: 3px;

  margin: 0 auto;

  border-radius: 10px;

  background:
    linear-gradient(
      90deg,
      var(--dna-red-dark),
      var(--dna-red),
      var(--dna-orange),
      var(--dna-red)
    );

  box-shadow:
    0 0 8px
    rgba(255, 48, 79, 0.4);

  opacity: 0.65;

  animation:
    rungPulse 2s ease-in-out infinite;
}

.dna-rungs span:nth-child(1) {
  animation-delay: 0s;
}

.dna-rungs span:nth-child(2) {
  animation-delay: 0.12s;
}

.dna-rungs span:nth-child(3) {
  animation-delay: 0.24s;
}

.dna-rungs span:nth-child(4) {
  animation-delay: 0.36s;
}

.dna-rungs span:nth-child(5) {
  animation-delay: 0.48s;
}

.dna-rungs span:nth-child(6) {
  animation-delay: 0.60s;
}

.dna-rungs span:nth-child(7) {
  animation-delay: 0.72s;
}

.dna-rungs span:nth-child(8) {
  animation-delay: 0.84s;
}

.dna-rungs span:nth-child(9) {
  animation-delay: 0.96s;
}

.dna-rungs span:nth-child(10) {
  animation-delay: 1.08s;
}

.dna-rungs span:nth-child(11) {
  animation-delay: 1.20s;
}

.dna-rungs span:nth-child(12) {
  animation-delay: 1.32s;
}


/* =========================================================
   SCANNER
========================================================= */

.dna-scanner {
  position: absolute;

  width: 300px;
  height: 300px;

  display: flex;

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

  pointer-events: none;
}

.scanner-ring {
  position: absolute;

  border-radius: 50%;

  border:
    1px solid
    rgba(255, 48, 79, 0.2);
}

.ring-one {
  width: 145px;
  height: 145px;

  border-color:
    rgba(255, 48, 79, 0.45);

  animation:
    rotateRing 12s linear infinite;
}

.ring-two {
  width: 205px;
  height: 205px;

  border-style: dashed;

  border-color:
    rgba(255, 99, 56, 0.25);

  animation:
    rotateReverse 18s linear infinite;
}

.ring-three {
  width: 270px;
  height: 270px;

  border-color:
    rgba(255, 48, 79, 0.12);

  animation:
    rotateRing 25s linear infinite;
}


/* =========================================================
   CROSSHAIR
========================================================= */

.scanner-cross {
  position: absolute;

  background:
    rgba(255, 48, 79, 0.18);
}

.scanner-cross.horizontal {
  width: 270px;
  height: 1px;
}

.scanner-cross.vertical {
  width: 1px;
  height: 270px;
}


/* =========================================================
   SCANNER CORE
========================================================= */

.scanner-core {
  position: relative;

  width: 70px;
  height: 70px;

  display: flex;

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

  border:
    1px solid
    rgba(255, 48, 79, 0.65);

  border-radius: 50%;

  background:
    rgba(255, 48, 79, 0.07);

  box-shadow:
    0 0 20px
    rgba(255, 48, 79, 0.2),

    inset 0 0 20px
    rgba(255, 48, 79, 0.08);
}

.core-inner {
  width: 45px;
  height: 45px;

  display: flex;

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

  border:
    1px solid
    var(--dna-red);

  border-radius: 50%;

  color:
    #ff7185;

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 10px;

  font-weight: 800;

  letter-spacing: 1px;

  box-shadow:
    0 0 15px
    rgba(255, 48, 79, 0.25);
}


/* =========================================================
   SEQUENCE LABEL
========================================================= */

.sequence-label {
  position: absolute;

  bottom: 25px;
  left: 50%;

  transform:
    translateX(-50%);

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 4px;

  color:
    var(--dna-muted);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 8px;

  letter-spacing: 1.5px;
}

.sequence-label strong {
  color:
    var(--dna-red);

  font-size: 11px;
}


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

.winner-reveal {
  position: absolute;
  z-index: 20;

  width:
    min(450px, 85%);

  padding: 30px;

  text-align: center;

  border:
    1px solid
    rgba(255, 48, 79, 0.5);

  background:
    rgba(12, 12, 14, 0.97);

  box-shadow:
    0 30px 80px
    rgba(0, 0, 0, 0.7),

    0 0 60px
    rgba(255, 48, 79, 0.12);

  animation:
    winnerAppear 0.5s ease forwards;
}

.winner-top {
  display: flex;

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

  gap: 10px;
}

.winner-dna {
  font-size: 25px;
}

.winner-label {
  color:
    var(--dna-red);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 10px;

  font-weight: 800;

  letter-spacing: 2px;
}

.winner-divider {
  width: 60px;
  height: 2px;

  margin:
    18px auto;

  background:
    var(--dna-red);

  box-shadow:
    0 0 12px
    var(--dna-red);
}

.winner-caption {
  color:
    var(--dna-muted);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 9px;

  letter-spacing: 1.5px;
}

.winner-reveal h2 {
  margin:
    8px 0;

  color: #fff;

  font-family:
    "Chakra Petch",
    sans-serif;

  font-size:
    clamp(28px, 5vw, 44px);

  overflow-wrap:
    anywhere;
}

.winner-reveal p {
  margin: 0;

  color:
    var(--dna-soft);

  font-family:
    "Space Grotesk",
    sans-serif;

  font-size: 13px;
}

.hidden {
  display: none !important;
}


/* =========================================================
   MACHINE STATS
========================================================= */

.machine-stats {
  display: grid;

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

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

  background:
    #111113;
}

.machine-stat {
  padding: 16px;

  text-align: center;
}

.machine-stat + .machine-stat {
  border-left:
    1px solid var(--dna-border);
}

.machine-stat span {
  display: block;

  color:
    var(--dna-muted);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 8px;

  letter-spacing: 1.5px;
}

.machine-stat strong {
  display: block;

  margin-top: 5px;

  color:
    var(--dna-red);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 14px;
}


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

.dna-dashboard {
  display: grid;

  grid-template-columns:
    1.1fr 0.9fr;

  gap: 18px;

  margin-top: 18px;
}

.dna-panel {
  padding: 24px;

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

  background:
    var(--dna-panel);

  box-shadow:
    0 15px 45px
    rgba(0, 0, 0, 0.18);
}


/* =========================================================
   PANEL HEADING
========================================================= */

.panel-heading {
  display: flex;

  align-items: flex-start;

  gap: 12px;

  margin-bottom: 24px;
}

.panel-number {
  display: flex;

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

  width: 32px;
  height: 32px;

  flex-shrink: 0;

  border:
    1px solid
    var(--dna-border-red);

  background:
    var(--dna-red-soft);

  color:
    var(--dna-red);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 10px;

  font-weight: 800;
}

.panel-heading h2 {
  margin: 0;

  font-family:
    "Chakra Petch",
    sans-serif;

  font-size: 19px;
}

.panel-heading p {
  margin:
    4px 0 0;

  color:
    var(--dna-muted);

  font-family:
    "Space Grotesk",
    sans-serif;

  font-size: 12px;
}

.progress-counter {
  margin-left: auto;

  flex-shrink: 0;

  white-space: nowrap;

  padding:
    5px 9px;

  border:
    1px solid
    var(--dna-border-red);

  color:
    var(--dna-red);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 9px;
}


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

.field {
  margin-bottom: 18px;
}

.field label {
  display: flex;

  justify-content: space-between;

  margin-bottom: 8px;

  color:
    var(--dna-soft);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 9px;

  font-weight: 700;

  letter-spacing: 1px;
}

.entry-counter {
  color:
    var(--dna-red);
}

textarea,
input {
  width: 100%;

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

  outline: none;

  background:
    #080809;

  color:
    #fff;

  font-family:
    "JetBrains Mono",
    monospace;

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

textarea {
  min-height: 165px;

  padding: 14px;

  resize: vertical;

  line-height: 1.6;

  font-size: 12px;
}

input {
  height: 44px;

  padding:
    0 13px;

  font-size: 12px;
}

textarea::placeholder,
input::placeholder {
  color:
    #4e4e55;
}

textarea:focus,
input:focus {
  border-color:
    var(--dna-red);

  box-shadow:
    0 0 0 3px
    rgba(255, 48, 79, 0.07);
}

.field-hint {
  margin-top: 6px;

  color:
    #55555d;

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 9px;
}


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

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

.source-buttons {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 10px;
}

.source-btn {
  width: 100%;

  min-height: 68px;

  display: flex;

  align-items: center;

  gap: 12px;

  padding:
    12px 14px;

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

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.035),
      rgba(255, 255, 255, 0.015)
    );

  color:
    var(--dna-text);

  text-align: left;

  cursor: pointer;

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

.source-btn:hover {
  border-color:
    rgba(255, 48, 79, 0.35);

  background:
    rgba(255, 48, 79, 0.045);

  transform:
    translateY(-1px);
}

.source-btn.active {
  border-color:
    var(--dna-border-red);

  background:
    linear-gradient(
      135deg,
      rgba(255, 48, 79, 0.12),
      rgba(255, 48, 79, 0.035)
    );

  box-shadow:
    inset 3px 0 0
    var(--dna-red),

    0 8px 25px
    rgba(0, 0, 0, 0.18);
}

.source-icon {
  width: 32px;
  height: 32px;

  flex-shrink: 0;

  display: flex;

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

  border:
    1px solid
    var(--dna-border-red);

  background:
    var(--dna-red-soft);

  color:
    var(--dna-red);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 13px;
}

.source-btn strong {
  display: block;

  color: #fff;

  font-family:
    "Chakra Petch",
    sans-serif;

  font-size: 12px;
}

.source-btn small {
  display: block;

  margin-top: 4px;

  color:
    var(--dna-muted);

  font-family:
    "Space Grotesk",
    sans-serif;

  font-size: 10px;

  line-height: 1.4;
}


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

.giveaway-id-row {
  display: grid;

  grid-template-columns:
    1fr 100px;

  gap: 8px;
}

.giveaway-id-row .secondary-btn {
  height: 44px;
}


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

.giveaway-info {
  margin-top: 14px;
}

.giveaway-empty,
.loaded-giveaway {
  border:
    1px solid
    var(--dna-border);

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.025),
      rgba(255, 255, 255, 0.012)
    );
}


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

.giveaway-empty {
  min-height: 145px;

  display: flex;

  flex-direction: column;

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

  padding: 24px;

  text-align: center;
}

.empty-giveaway-icon {
  width: 42px;
  height: 42px;

  display: flex;

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

  margin-bottom: 10px;

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

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

  color:
    var(--dna-red);

  font-size: 15px;
}

.giveaway-empty strong {
  color:
    #92929a;

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 9px;

  letter-spacing: 1.3px;
}

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

  margin:
    7px 0 0;

  color:
    #55555d;

  font-family:
    "Space Grotesk",
    sans-serif;

  font-size: 11px;

  line-height: 1.5;
}


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

.loaded-giveaway {
  overflow: hidden;
}

.loaded-giveaway-header {
  display: flex;

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

  gap: 12px;

  padding:
    15px 16px;

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

  background:
    linear-gradient(
      135deg,
      rgba(255, 48, 79, 0.08),
      rgba(255, 255, 255, 0.015)
    );
}

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

.loaded-badge {
  display: inline-block;

  margin-right: 8px;

  padding:
    4px 7px;

  border:
    1px solid
    var(--dna-border-red);

  background:
    var(--dna-red-soft);

  color:
    var(--dna-red);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 7px;

  font-weight: 800;

  letter-spacing: 1px;
}

.loaded-giveaway-header strong {
  color:
    #fff;

  font-family:
    "Chakra Petch",
    sans-serif;

  font-size: 14px;

  overflow-wrap:
    anywhere;
}

.loaded-check {
  width: 28px;
  height: 28px;

  flex-shrink: 0;

  display: flex;

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

  border:
    1px solid
    var(--dna-border-red);

  background:
    rgba(255, 48, 79, 0.08);

  color:
    var(--dna-red);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 12px;
}


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

.giveaway-stats {
  display: grid;

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

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

.giveaway-stat {
  min-width: 0;

  padding:
    14px 12px;
}

.giveaway-stat + .giveaway-stat {
  border-left:
    1px solid
    var(--dna-border);
}

.giveaway-stat span,
.giveaway-closing > span,
.loaded-description > span {
  display: block;

  margin-bottom: 5px;

  color:
    var(--dna-muted);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 7px;

  font-weight: 700;

  letter-spacing: 1px;
}

.giveaway-stat strong {
  display: block;

  color:
    var(--dna-red);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 11px;

  overflow-wrap:
    anywhere;
}


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

.giveaway-closing {
  display: flex;

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

  gap: 15px;

  padding:
    12px 14px;

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

  background:
    rgba(255, 255, 255, 0.015);
}

.giveaway-closing > span {
  margin: 0;
}

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

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 9px;

  text-align: right;
}


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

.loaded-description {
  padding: 14px;

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

.loaded-description > span {
  margin-bottom: 7px;
}

.loaded-description p {
  margin: 0;

  color:
    var(--dna-soft);

  font-family:
    "Space Grotesk",
    sans-serif;

  font-size: 11px;

  line-height: 1.55;

  overflow-wrap:
    anywhere;
}


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

.participants-preview {
  padding: 14px;
}

.participants-header {
  display: flex;

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

  gap: 12px;

  margin-bottom: 10px;
}

.participants-header strong {
  display: block;

  color:
    #fff;

  font-family:
    "Chakra Petch",
    sans-serif;

  font-size: 12px;

  letter-spacing: 0.4px;
}

.participants-header small {
  display: block;

  margin-top: 3px;

  color:
    var(--dna-muted);

  font-family:
    "Space Grotesk",
    sans-serif;

  font-size: 9px;
}

.participants-header .entry-counter {
  flex-shrink: 0;

  padding:
    5px 8px;

  border:
    1px solid
    var(--dna-border-red);

  background:
    var(--dna-red-soft);

  color:
    var(--dna-red);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 8px;

  font-weight: 800;
}


/* =========================================================
   PARTICIPANT LIST
========================================================= */

.participant-list {
  display: flex;

  flex-direction: column;

  gap: 6px;

  max-height: 245px;

  overflow-y: auto;

  padding-right: 3px;
}

.participant-card {
  display: flex;

  align-items: center;

  gap: 10px;

  min-height: 42px;

  padding:
    8px 10px;

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

  background:
    rgba(255, 255, 255, 0.022);

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

.participant-card:hover {
  border-color:
    rgba(255, 48, 79, 0.25);

  background:
    rgba(255, 48, 79, 0.035);

  transform:
    translateX(2px);
}

.participant-number {
  width: 25px;
  height: 25px;

  flex-shrink: 0;

  display: flex;

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

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

  background:
    #0b0b0d;

  color:
    #66666e;

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 8px;
}

.participant-avatar {
  width: 27px;
  height: 27px;

  flex-shrink: 0;

  display: flex;

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

  border:
    1px solid
    var(--dna-border-red);

  background:
    var(--dna-red-soft);

  color:
    var(--dna-red);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 9px;

  font-weight: 800;
}

.participant-name {
  min-width: 0;

  color:
    #e8e8eb;

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 10px;

  overflow-wrap:
    anywhere;
}

.participant-card .participant-status {
  margin-left: auto;

  color:
    #55555d;

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 7px;

  letter-spacing: 0.5px;
}


/* =========================================================
   PARTICIPANT SCROLLBAR
========================================================= */

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

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

.participant-list::-webkit-scrollbar-thumb,
.winner-list::-webkit-scrollbar-thumb {
  background:
    #29292e;
}

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


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

.manual-source {
  padding: 14px;

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

  background:
    rgba(255, 255, 255, 0.018);
}

.manual-source textarea {
  background:
    #080809;
}


/* =========================================================
   LOCKED FIELDS
========================================================= */

.field-lock {
  display: inline-flex;

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

  margin-left: 4px;

  font-size: 9px;

  opacity: 0.7;
}


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

.settings-row {
  display: grid;

  grid-template-columns:
    1fr 120px;

  gap: 12px;
}


/* =========================================================
   DRAW BUTTON
========================================================= */

.draw-button {
  position: relative;

  width: 100%;

  min-height: 56px;

  display: flex;

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

  gap: 12px;

  margin-top: 5px;

  border: none;

  cursor: pointer;

  background:
    linear-gradient(
      135deg,
      #ff304f,
      #c81736
    );

  color:
    #fff;

  font-family:
    "Chakra Petch",
    sans-serif;

  font-size: 15px;

  font-weight: 700;

  letter-spacing: 1px;

  box-shadow:
    0 10px 30px
    rgba(255, 48, 79, 0.18);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.draw-button:hover {
  transform:
    translateY(-2px);

  box-shadow:
    0 15px 40px
    rgba(255, 48, 79, 0.3);
}

.draw-button:active {
  transform:
    translateY(0);
}

.draw-button:disabled {
  opacity: 0.45;

  cursor:
    not-allowed;

  transform:
    none;
}

.draw-icon {
  font-size: 18px;
}

.draw-arrow {
  position: absolute;

  right: 18px;

  font-size: 18px;
}


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

.secondary-actions {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 10px;

  margin-top: 10px;
}

.secondary-btn {
  min-height: 40px;

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

  background:
    rgba(255, 255, 255, 0.03);

  color:
    var(--dna-soft);

  cursor:
    pointer;

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 9px;

  font-weight: 700;

  letter-spacing: 1px;

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

.secondary-btn:hover {
  border-color:
    rgba(255, 255, 255, 0.18);

  background:
    rgba(255, 255, 255, 0.06);

  color:
    #fff;
}

.danger-btn:hover {
  border-color:
    rgba(255, 48, 79, 0.4);

  color:
    var(--dna-red);
}


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

.status {
  min-height: 18px;

  margin:
    12px 0 0;

  color:
    var(--dna-muted);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 9px;
}


/* =========================================================
   RESULTS
========================================================= */

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

.results-panel .panel-heading {
  align-items: center;
}

.winner-list {
  display: flex;

  flex-direction: column;

  gap: 8px;

  max-height: 350px;

  overflow-y: auto;

  padding-right: 3px;
}


/* =========================================================
   WINNER CARD
========================================================= */

.winner-item {
  position: relative;

  display: flex;

  align-items: center;

  gap: 12px;

  min-height: 70px;

  padding:
    12px 14px;

  overflow: hidden;

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

  background:
    linear-gradient(
      135deg,
      rgba(255, 48, 79, 0.045),
      rgba(255, 255, 255, 0.018)
    );

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

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

.winner-item::before {
  content: "";

  position: absolute;

  left: 0;
  top: 0;
  bottom: 0;

  width: 3px;

  background:
    var(--dna-red);

  box-shadow:
    0 0 15px
    var(--dna-red);
}

.winner-item:hover {
  border-color:
    rgba(255, 48, 79, 0.3);

  transform:
    translateX(2px);

  box-shadow:
    0 12px 30px
    rgba(0, 0, 0, 0.25);
}

.winner-rank {
  width: 32px;
  height: 32px;

  flex-shrink: 0;

  display: flex;

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

  border:
    1px solid
    var(--dna-border-red);

  background:
    var(--dna-red-soft);

  color:
    var(--dna-red);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 9px;

  font-weight: 800;
}

.winner-content {
  min-width: 0;

  flex: 1;
}

.winner-item strong {
  display: block;

  color:
    #fff;

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 11px;

  overflow-wrap:
    anywhere;
}

.winner-item span {
  display: block;

  margin-top: 4px;

  color:
    var(--dna-muted);

  font-family:
    "Space Grotesk",
    sans-serif;

  font-size: 10px;
}

.winner-badge {
  flex-shrink: 0;

  padding:
    5px 7px;

  border:
    1px solid
    var(--dna-border-red);

  background:
    rgba(255, 48, 79, 0.08);

  color:
    var(--dna-red);

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 7px;

  font-weight: 800;

  letter-spacing: 0.8px;
}


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

.empty-state {
  min-height: 280px;

  display: flex;

  flex-direction: column;

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

  text-align: center;

  color:
    var(--dna-muted);
}

.empty-dna {
  margin-bottom: 12px;

  font-size: 34px;

  opacity: 0.3;

  filter:
    grayscale(1);
}

.empty-state strong {
  color:
    #8a8a91;

  font-family:
    "JetBrains Mono",
    monospace;

  font-size: 10px;

  letter-spacing: 1.5px;
}

.empty-state p {
  max-width: 230px;

  margin:
    7px auto 0;

  color:
    #55555d;

  font-family:
    "Space Grotesk",
    sans-serif;

  font-size: 11px;

  line-height: 1.5;
}


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

.drawing .dna-helix {
  animation:
    dnaFloat 0.5s ease-in-out infinite,
    dnaSpin 1s linear infinite;
}

.drawing .scan-line {
  animation-duration:
    0.45s;

  opacity:
    1;
}

.drawing .scanner-core {
  box-shadow:
    0 0 20px
    var(--dna-red),

    0 0 60px
    rgba(255, 48, 79, 0.4);
}


/* =========================================================
   ANIMATIONS
========================================================= */

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

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

@keyframes strandLeft {
  0%,
  100% {
    transform:
      translateX(-50%)
      translateX(-60px);
  }

  50% {
    transform:
      translateX(-50%)
      translateX(-27px);
  }
}

@keyframes strandRight {
  0%,
  100% {
    transform:
      translateX(-50%)
      translateX(60px);
  }

  50% {
    transform:
      translateX(-50%)
      translateX(27px);
  }
}

@keyframes rungPulse {
  0%,
  100% {
    opacity:
      0.3;
  }

  50% {
    opacity:
      0.9;
  }
}

@keyframes rotateRing {
  from {
    transform:
      rotate(0deg);
  }

  to {
    transform:
      rotate(360deg);
  }
}

@keyframes rotateReverse {
  from {
    transform:
      rotate(360deg);
  }

  to {
    transform:
      rotate(0deg);
  }
}

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

  100% {
    top:
      100%;
  }
}

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

    opacity:
      0.2;
  }

  50% {
    transform:
      translateY(-20px);

    opacity:
      0.8;
  }
}

@keyframes winnerAppear {
  from {
    opacity:
      0;

    transform:
      scale(0.95)
      translateY(10px);
  }

  to {
    opacity:
      1;

    transform:
      scale(1)
      translateY(0);
  }
}

@keyframes livePulse {
  0%,
  100% {
    opacity:
      0.5;
  }

  50% {
    opacity:
      1;
  }
}

@keyframes dnaSpin {
  from {
    transform:
      rotateY(0deg);
  }

  to {
    transform:
      rotateY(360deg);
  }
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 850px) {
  .dna-dashboard {
    grid-template-columns:
      1fr;

    gap: 14px;
  }

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

  .input-panel {
    order: 1;
  }

  .results-panel {
    order: 2;
  }
}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 600px) {
  .dna-app {
    width:
      calc(100% - 24px);

    padding-top:
      20px;
  }

  .dna-hero {
    padding:
      35px 0;
  }

  .dna-hero h1 {
    font-size:
      58px;

    letter-spacing:
      -2px;
  }

  .dna-stage {
    min-height:
      430px;
  }

  .dna-helix {
    transform:
      scale(0.78);
  }

  .dna-scanner {
    transform:
      scale(0.78);
  }

  .machine-top {
    padding:
      12px 14px;
  }

  .machine-title small {
    display:
      none;
  }

  .machine-state {
    font-size:
      8px;
  }

  .machine-stat {
    padding:
      13px 6px;
  }

  .machine-stat span {
    font-size:
      7px;
  }

  .machine-stat strong {
    font-size:
      12px;
  }

  .dna-panel {
    padding:
      18px;
  }

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

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

  .source-buttons {
    gap:
      8px;
  }

  .source-btn {
    min-height:
      62px;

    padding:
      10px 12px;
  }

  .source-btn strong {
    font-size:
      11px;
  }

  .source-btn small {
    font-size:
      9px;
  }

  .giveaway-id-row {
    grid-template-columns:
      1fr 82px;
  }

  .giveaway-id-row .secondary-btn {
    min-height:
      44px;
  }

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

  .giveaway-stat {
    display: flex;

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

    gap: 10px;

    padding:
      11px 13px;
  }

  .giveaway-stat + .giveaway-stat {
    border-left:
      none;

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

  .giveaway-stat span {
    margin:
      0;
  }

  .giveaway-stat strong {
    text-align:
      right;
  }

  .giveaway-closing {
    align-items:
      flex-start;

    flex-direction:
      column;

    gap:
      5px;
  }

  .giveaway-closing strong {
    text-align:
      left;
  }

  .participants-preview {
    padding:
      12px;
  }

  .participant-list {
    max-height:
      220px;
  }

  .participant-card {
    min-height:
      40px;

    padding:
      7px 8px;
  }

  .participant-number {
    width:
      23px;

    height:
      23px;
  }

  .participant-avatar {
    width:
      25px;

    height:
      25px;
  }

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

  .winner-item {
    min-height:
      64px;

    padding:
      10px 11px;
  }

  .winner-rank {
    width:
      29px;

    height:
      29px;
  }

  .winner-item strong {
    font-size:
      10px;
  }

  .winner-item span {
    font-size:
      9px;
  }

  .winner-badge {
    display:
      none;
  }

  .progress-counter {
    font-size:
      8px;

    padding:
      4px 6px;
  }

  .winner-reveal {
    padding:
      25px 18px;
  }
}


/* =========================================================
   RESPONSIVE — SMALL PHONES
========================================================= */

@media (max-width: 400px) {
  .dna-hero h1 {
    font-size:
      50px;
  }

  .dna-stage {
    min-height:
      390px;
  }

  .dna-helix {
    transform:
      scale(0.68);
  }

  .dna-scanner {
    transform:
      scale(0.68);
  }

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

  .giveaway-id-row .secondary-btn {
    width:
      100%;
  }

  .participants-header {
    align-items:
      flex-start;
  }

  .participants-header .entry-counter {
    font-size:
      7px;
  }

  .winner-item {
    gap:
      8px;
  }
}


/* =========================================================
   REDUCE MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration:
      0.01ms !important;

    animation-iteration-count:
      1 !important;

    transition-duration:
      0.01ms !important;
  }
}