:root {
  --bg: #050503;
  --black: #050504;
  --deep: #0a0f0d;
  --device: #d7d0bd;
  --device-dark: #9f947f;
  --device-edge: #f4efdf;
  --screen: #0d2624;
  --screen-2: #061514;
  --paper: #f5efdf;
  --paper-soft: #ded6c3;
  --ink: #11100d;
  --muted: #766f62;
  --green: #19ff63;
  --green-dark: #087a31;
  --green-glow: rgba(25, 255, 99, 0.28);
  --shadow: rgba(0, 0, 0, 0.62);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  min-height: 100%;
  background: var(--bg);
}

body {
  width: 100%;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(25, 255, 99, 0.24), transparent 18rem),
    radial-gradient(circle at 88% 16%, rgba(25, 255, 99, 0.12), transparent 16rem),
    linear-gradient(180deg, #050503 0%, #080706 100%);
  color: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: none;
  cursor: pointer;
}

.betlab-page {
  width: 100%;
  min-height: 100vh;
  padding: 22px 16px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

/* HERO */

.hero-brand {
  width: min(100%, 430px);
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.34em;
  color: rgba(245, 239, 223, 0.24);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.hero-row h1 {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: clamp(58px, 18vw, 92px);
  line-height: 0.74;
  letter-spacing: -0.09em;
  text-transform: uppercase;
  color: rgba(245, 239, 223, 0.9);
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.version-pill {
  flex-shrink: 0;
  margin-top: 2px;
  border: 1.5px solid rgba(25, 255, 99, 0.5);
  background:
    radial-gradient(circle at 50% 0%, rgba(25, 255, 99, 0.18), transparent 60%),
    rgba(0, 0, 0, 0.28);
  color: var(--green);
  border-radius: 999px;
  padding: 14px 18px;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 34px rgba(25, 255, 99, 0.15);
}

/* CALCULATOR DEVICE */

.calculator-device {
  width: min(100%, 430px);
  position: relative;
  isolation: isolate;
  border-radius: 34px;
  padding: 24px 22px 26px;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.8), transparent 10rem),
    linear-gradient(145deg, #eee7d4 0%, #cfc6b0 48%, #91866f 100%);
  color: var(--ink);
  box-shadow:
    0 32px 90px var(--shadow),
    inset 0 2px 0 rgba(255, 255, 255, 0.92),
    inset 0 -9px 0 rgba(0, 0, 0, 0.18),
    inset 0 0 0 2px rgba(255, 255, 255, 0.32);
  transform: perspective(900px) rotateX(0.8deg);
}

.calculator-device::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 27px;
  border: 1px solid rgba(17, 16, 13, 0.13);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    inset 0 -14px 26px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  z-index: -1;
}

.calculator-device::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 34px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.22), transparent 18%, transparent 78%, rgba(0, 0, 0, 0.1)),
    repeating-linear-gradient(
      90deg,
      rgba(17, 16, 13, 0.025) 0,
      rgba(17, 16, 13, 0.025) 1px,
      transparent 1px,
      transparent 5px
    );
  mix-blend-mode: multiply;
  pointer-events: none;
}

.device-screw {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, #8d6731 0%, #e7c47e 42%, #5a3b1c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 2px 5px rgba(0, 0, 0, 0.32);
  z-index: 3;
}

.device-screw::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 2px;
  left: 2px;
  top: 6px;
  border-radius: 2px;
  background: rgba(40, 22, 8, 0.82);
  transform: rotate(-32deg);
}

.screw-top-left {
  left: 14px;
  top: 14px;
}

.screw-top-right {
  right: 14px;
  top: 14px;
}

.screw-bottom-left {
  left: 14px;
  bottom: 14px;
}

.screw-bottom-right {
  right: 14px;
  bottom: 14px;
}

/* OUTPUT SCREEN */

.output-screen {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 23px 22px 24px;
  margin-bottom: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.14), transparent 12rem),
    linear-gradient(180deg, #183331 0%, var(--screen-2) 100%);
  color: var(--paper);
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.7),
    inset 0 -2px 0 rgba(255, 255, 255, 0.06),
    0 10px 0 rgba(96, 86, 67, 0.38),
    0 18px 32px rgba(0, 0, 0, 0.32);
}

.output-glass {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.15), transparent 25%, transparent 70%, rgba(255, 255, 255, 0.06)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 4px
    );
  pointer-events: none;
}

.output-topline {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.23em;
  text-transform: uppercase;
  color: rgba(245, 239, 223, 0.72);
}

.ready-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
}

.ready-status i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(25, 255, 99, 0.85);
}

.output-divider {
  position: relative;
  height: 1px;
  margin: 17px 0 22px;
  background: rgba(245, 239, 223, 0.28);
}

.output-body {
  position: relative;
}

.output-label {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(245, 239, 223, 0.58);
  margin-bottom: 9px;
}

.output-body h2 {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: clamp(34px, 10.5vw, 52px);
  line-height: 0.95;
  letter-spacing: -0.065em;
  color: var(--paper);
  margin-bottom: 12px;
}

.output-body p {
  max-width: 92%;
  font-size: 17px;
  line-height: 1.32;
  color: rgba(245, 239, 223, 0.75);
}

/* PAD */

.calculator-pad {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

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

.calc-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-control span {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(17, 16, 13, 0.62);
  padding-left: 5px;
}

.calc-control input,
.calc-control select {
  width: 100%;
  height: 62px;
  border: 1px solid rgba(17, 16, 13, 0.08);
  border-radius: 15px;
  background:
    linear-gradient(180deg, #fffaf0 0%, #e4dcc9 100%);
  color: #191711;
  padding: 0 18px;
  outline: none;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.85),
    inset 0 -4px 0 rgba(0, 0, 0, 0.12),
    0 7px 0 rgba(95, 86, 69, 0.42),
    0 13px 18px rgba(0, 0, 0, 0.16);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease;
}

.calc-control select {
  appearance: auto;
}

.calc-control input::placeholder {
  color: rgba(17, 16, 13, 0.35);
}

.calc-control input:focus,
.calc-control select:focus {
  background: #fffdf6;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.9),
    inset 0 -4px 0 rgba(0, 0, 0, 0.1),
    0 7px 0 rgba(95, 86, 69, 0.38),
    0 0 0 4px rgba(25, 255, 99, 0.19),
    0 13px 18px rgba(0, 0, 0, 0.16);
}

.calc-control input:active,
.calc-control select:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.85),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12),
    0 3px 0 rgba(95, 86, 69, 0.42),
    0 8px 14px rgba(0, 0, 0, 0.14);
}

.run-button {
  width: 100%;
  min-height: 68px;
  margin-top: 5px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.28), transparent 22%),
    linear-gradient(180deg, #37ff81 0%, #14df56 50%, #078f32 100%);
  color: #051308;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -9px 0 rgba(0, 89, 32, 0.72),
    0 8px 0 #065f26,
    0 18px 26px rgba(0, 0, 0, 0.28),
    0 0 36px rgba(25, 255, 99, 0.22);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.run-button:active {
  transform: translateY(6px);
  filter: brightness(0.94);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -3px 0 rgba(0, 89, 32, 0.78),
    0 2px 0 #065f26,
    0 9px 16px rgba(0, 0, 0, 0.24);
}

/* NAV BUTTONS OUTSIDE DEVICE */

.device-buttons {
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 15px;
  padding: 4px 4px 0;
}

.device-buttons button {
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 2px solid rgba(245, 239, 223, 0.18);
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.22), transparent 20%),
    radial-gradient(circle at 66% 82%, rgba(25, 255, 99, 0.11), transparent 27%),
    linear-gradient(145deg, #242119 0%, #080806 100%);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.1),
    inset 0 -7px 0 rgba(0, 0, 0, 0.45),
    0 12px 24px rgba(0, 0, 0, 0.46);
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease;
}

.device-buttons button span {
  color: var(--green);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-shadow: 0 0 14px rgba(25, 255, 99, 0.6);
}

.device-buttons button:active {
  transform: scale(0.93);
}

.device-buttons button:hover {
  border-color: rgba(25, 255, 99, 0.54);
  color: var(--green);
}

.system-note {
  width: min(100%, 430px);
  color: rgba(245, 239, 223, 0.5);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  padding: 0 5px;
}

/* MOBILE */

@media (max-width: 390px) {
  .betlab-page {
    padding: 18px 12px 28px;
    gap: 18px;
  }

  .hero-row h1 {
    font-size: 62px;
  }

  .version-pill {
    padding: 12px 15px;
    font-size: 11px;
  }

  .calculator-device {
    padding: 22px 18px 24px;
    border-radius: 31px;
  }

  .output-screen {
    padding: 21px 18px 22px;
  }

  .output-topline {
    font-size: 12px;
    letter-spacing: 0.19em;
  }

  .output-body h2 {
    font-size: 36px;
  }

  .output-body p {
    font-size: 16px;
  }

  .calc-control input,
  .calc-control select {
    height: 58px;
    font-size: 20px;
    padding: 0 15px;
  }

  .run-button {
    min-height: 64px;
    font-size: 16px;
  }

  .device-buttons {
    gap: 15px 12px;
  }

  .device-buttons button {
    font-size: 10px;
  }
}

@media (max-width: 340px) {
  .hero-row h1 {
    font-size: 54px;
  }

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

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