:root {
  --bg: #000000;
  --bg-card: #050509;
  --bg-input: #070710;
  --bg-input-border: #18181b;
  --text: #ffffff;
  --muted: #c4c4c4;
  --muted-soft: #a3a3a3;
  --accent: #a855f7;
  --accent-dark: #302b36;
  --button-bg: #262433;
  --error: #f97373;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

/* BACKGROUND */
body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background-color: #000;
  background-image: url("assets/background.png");
  background-repeat: repeat;
  background-size: auto;
  background-position: top left;
}

/* MAIN LAYOUT */
.app {
  width: 100%;
  max-width: 1100px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 56px;
}

/* LEFT COLUMN */
.left-side {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.header .logo {
  height: 32px;
}

/* MAIN TEXT */
.main-text .tagline {
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
  color: #9ca3af;
}

.main-text h1 {
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  font-size: 64px;
  line-height: 1.02;
}

/* FAQ */
.faq {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.faq-item h2 {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 4px;
}

.faq-item p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* RIGHT COLUMN */
.right-side {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

/* PANEL */
.panel {
  width: 420px;
  background-color: var(--bg-card);
  border-radius: 16px;
  padding: 24px 28px 28px;
  border: 1px solid #18181b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}

/* PANEL TITLES */
.panel-title {
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  font-size: 16px;
  letter-spacing: 0.2em;
  margin-bottom: 8px;
}

.panel-subtitle {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.panel-subtitle.small {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #e5e7eb;
  margin-bottom: 10px;
}

/* LABELS ABOVE INPUTS */
.row-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9ca3af;
  margin-bottom: 6px;
}

.row-labels label {
  flex: 1;
}

/* INPUTS */
.row-inputs {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.row-inputs input {
  flex: 1;
  min-width: 0;
  background-color: var(--bg-input);
  border-radius: 12px;
  border: 1px solid var(--bg-input-border);
  padding: 14px 8px;
  height: 60px;
  text-align: center;
  font-size: 26px;
  color: var(--text);
  outline: none;
  -moz-appearance: textfield;
}

.row-inputs input::-webkit-outer-spin-button,
.row-inputs input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* TOGGLE */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  display: none;
}

.toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background-color: #18181b;
  padding: 3px;
  display: flex;
  align-items: center;
}

.toggle-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background-color: #6b7280;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.toggle input:checked + .toggle-track {
  background-color: var(--accent-dark);
}

.toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(18px);
  background-color: var(--accent);
}

.toggle-text {
  font-size: 13px;
  color: var(--muted-soft);
}

/* MESSAGES */
.error-message {
  min-height: 18px;
  margin: 4px 0 14px;
  font-size: 12px;
  color: var(--error);
}

.status-message {
  min-height: 18px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

/* BUTTONS */
.primary-button {
  width: 100%;
  height: 56px;
  border-radius: 999px;
  border: none;
  background-color: var(--button-bg);
  color: #f9fafb;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    transform 0.05s ease,
    opacity 0.1s ease;
}

.primary-button:hover:not(:disabled) {
  background-color: #302d3f;
}

.primary-button:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.secondary {
  margin-top: 24px;
}

.icon-arrow {
  font-size: 16px;
  margin-top: -1px;
}

.icon-reload {
  font-size: 16px;
}

/* BACK BUTTON */
.back-button {
  margin-top: 8px;
  border: none;
  background: none;
  color: var(--muted-soft);
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  display: block;
  width: 100%;
}

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

/* RESULT NUMBERS */
.result-numbers {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.drawn-number {
  font-family: "Space Grotesk", sans-serif;
  font-size: 40px;
  color: var(--accent);
  opacity: 0;
  transform: translateY(10px);
  animation: appear 0.3s ease forwards;
}

.hidden {
  display: none;
}

@keyframes appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .app {
    flex-direction: column;
    padding: 32px 24px 40px;
    gap: 40px;
  }

  .main-text h1 {
    font-size: 52px;
  }

  .right-side {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .app {
    padding-inline: 16px;
  }

  .main-text h1 {
    font-size: 42px;
  }

  .panel {
    width: 100%;
  }
}
