:root {
  color-scheme: dark;
  --case-bg: #2b2440;
  --case-bg-dark: #1c1730;
  --accent: #ff5fa2;
  --accent-2: #35e0c8;
  --screen-bg: #0a1f0f;
  --screen-fg: #52ff8a;
  --metal: #cfc9dd;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #4a3d6b 0%, #14101f 70%);
  font-family: "Courier New", ui-monospace, monospace;
  color: var(--metal);
  padding: 2rem 1rem;
}

.machine {
  position: relative;
  width: 380px;
  background: linear-gradient(180deg, var(--case-bg) 0%, var(--case-bg-dark) 100%);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow:
    0 0 0 4px #0d0a17,
    0 0 40px rgba(255, 95, 162, 0.25),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.marquee {
  text-align: center;
  font-weight: bold;
  letter-spacing: 0.1em;
  font-size: 1.1rem;
  color: var(--accent-2);
  text-shadow: 0 0 8px var(--accent-2), 0 0 2px #fff;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.screen {
  position: relative;
  background: var(--screen-bg);
  border-radius: 8px;
  padding: 1rem;
  min-height: 90px;
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.9), 0 0 0 3px #000;
  margin-bottom: 1rem;
}

.crt-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}

.screen-content {
  position: relative;
  color: var(--screen-fg);
  font-size: 0.85rem;
  line-height: 1.5;
  text-shadow: 0 0 6px var(--screen-fg);
}

.hidden { display: none !important; }

.field-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--metal);
  margin-bottom: 0.25rem;
}

.field-input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.75rem;
  background: #0d0a17;
  border: 2px solid #443a63;
  border-radius: 6px;
  color: var(--metal);
  font-family: inherit;
  font-size: 0.9rem;
}

.field-input:focus {
  outline: none;
  border-color: var(--accent-2);
}

.turnstile-slot {
  margin-bottom: 0.9rem;
  display: flex;
  justify-content: center;
}

.payment-slot {
  background: #0d0a17;
  border: 2px solid #443a63;
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.9rem;
}

.big-button {
  position: relative;
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--accent) 0%, #c73d7a 100%);
  color: #fff;
  font-family: inherit;
  font-weight: bold;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 0 #8a2a58, 0 6px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.05s ease;
}

.big-button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #8a2a58, 0 2px 6px rgba(0, 0, 0, 0.4);
}

.big-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.big-button.secondary {
  background: linear-gradient(180deg, var(--accent-2) 0%, #1c9f8c 100%);
  box-shadow: 0 4px 0 #0f6e60, 0 6px 12px rgba(0, 0, 0, 0.4);
}

.error-text {
  color: #ff8080;
  font-size: 0.8rem;
  min-height: 1.2em;
  margin-top: 0.5rem;
}

.dial-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.dial {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
  animation: pulse 1.2s infinite ease-in-out;
}

.dial:nth-child(2) { animation-delay: 0.2s; }
.dial:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
  0%, 100% { transform: scale(0.6); opacity: 0.4; }
  50% { transform: scale(1); opacity: 1; }
}

.working-text {
  text-align: center;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.tray {
  background: #0d0a17;
  border: 2px dashed #443a63;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  margin-bottom: 0.9rem;
}

.tray-label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  margin-bottom: 0.4rem;
}

.tray-domain {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--metal);
  word-break: break-all;
}

.tray-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
}

.tray-note {
  font-size: 0.7rem;
  color: #8f88a8;
  margin-top: 0.6rem;
}

.fail-text {
  text-align: center;
  font-weight: bold;
  color: #ff8080;
  margin-bottom: 0.25rem;
}

.fail-subtext {
  text-align: center;
  font-size: 0.8rem;
  color: #8f88a8;
  margin-bottom: 0.9rem;
}

.coin-slot {
  width: 60px;
  height: 8px;
  background: #000;
  border-radius: 4px;
  margin: 1rem auto 0;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.8);
}

.vent-grille {
  width: 80%;
  height: 14px;
  margin: 0.6rem auto 0;
  background: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 8px);
  opacity: 0.5;
}
