@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

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

:root {
  --ink: #0f1020;
  --card: #1a1a2e;
  --card2: #141427;
  --edge: #000;
  --chalk: #ffffff;
  --muted: rgba(255,255,255,0.5);
  --accent: #e83a3a;
  --teal: #ff9e9e;
  --yellow: #ffd43b;
  --green: #51cf66;
}

html {
  background: var(--ink);
  color: var(--chalk);
}

body {
  font-family: "Press Start 2P", monospace;
  background: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: none;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 6px;

  padding: 12px 18px;

  border: 2px solid var(--edge);
  box-shadow: 3px 3px 0 var(--edge);

  font-family: inherit;
  font-size: 10px;

  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;

  transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--edge);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #ff4a4a;
}

.btn-outline {
  background: transparent;
  color: var(--chalk);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-teal {
  background: var(--teal);
  color: #0f0e13;
}


.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 9px;
  color: var(--muted);
}

.field input,
.field textarea {
  background: var(--card2);
  border: 2px solid var(--edge);

  padding: 12px 14px;

  color: var(--chalk);
  font-family: inherit;
  font-size: 10px;

  outline: none;
  transition: border-color 0.15s;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--chalk);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255,255,255,0.3);
  font-size: 9px;
}

.divider {
  text-align: center;
  color: var(--muted);
  font-size: 9px;
  padding: 10px 0;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--card);
  border: 3px solid var(--edge);
  box-shadow: 6px 6px 0 var(--edge);

  padding: 28px;
  width: 100%;
  max-width: 420px;
}


#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);

  background: var(--card2);
  color: var(--chalk);

  padding: 10px 18px;

  font-size: 10px;

  border: 2px solid var(--edge);
  box-shadow: 4px 4px 0 var(--edge);

  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#toast.error {
  border-color: var(--accent);
}

#toast.success {
  border-color: var(--green);
}


#pageLoader {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 9999;

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

  transition: opacity 0.4s;
}

#pageLoader.hide {
  opacity: 0;
  pointer-events: none;
}

.loader-ring {
  width: 60px;
  aspect-ratio: 4;

  background:
    #e83a3a;

  box-shadow:
    0 0 0 0 #e83a3a,
    22px 0 0 0 #e83a3a,
    44px 0 0 0 #e83a3a;

  animation: l1 1s steps(4) infinite;
}

@keyframes l1 {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 -34% 0 0);
  }
}


.fade-up {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.5s ease forwards;
}

.fade-up.delay-1 {
  animation-delay: 0.1s;
}

.fade-up.delay-2 {
  animation-delay: 0.2s;
}

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