/* Bossword Design System */

:root {
  /* Palette */
  --ink: #0A0A0A;
  --paper: #FAFAFA;
  --base: #F2F2F2;
  --green: #37B718;
  --red: #FF2D00;
  --yellow: #FFC900;
  --neutral200: #E5E5E5;
  --neutral500: #777777;
  --neutral700: #404040;
  --white: #FFFFFF;
  --overlay: rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--ink);
  background-color: var(--base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Page layout — centered column, mobile-first */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.container {
  width: 100%;
  max-width: 380px;
}

/* Logo */
.logo {
  display: block;
  margin: 0 auto 50px;
  width: 260px;
  height: auto;
}

/* Typography */
.text-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.text-body {
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
}

.text-caption {
  font-size: 12px;
  font-weight: 400;
  color: var(--neutral500);
}

.text-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--neutral700);
}

.text-center {
  text-align: center;
}

/* Card */
.card {
  background: var(--paper);
  padding: 30px 25px;
}

/* League preview card — ink background, white text */
.league-card {
  background: var(--ink);
  padding: 15px;
  text-align: center;
}

.league-card .league-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--paper);
}

.league-card .league-detail {
  font-size: 13px;
  color: var(--paper);
  margin-top: 2px;
}

/* Buttons — double-border frame */
.btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  background: var(--green);
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  /* Double-border frame: 2px colored outline + 2px white inner */
  outline: 2px solid var(--green);
  outline-offset: 2px;
  box-shadow: inset 0 0 0 2px var(--white);
}

.btn:hover {
  opacity: 0.9;
}

.btn:active {
  opacity: 0.8;
}

.btn:disabled,
.btn.inactive {
  background: var(--neutral500);
  outline-color: var(--neutral500);
  cursor: default;
  opacity: 1;
}

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

/* Text button — no frame, just colored text */
.text-btn {
  display: inline-block;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.text-btn:hover {
  opacity: 0.8;
}

.text-btn.text-btn-red {
  color: var(--red);
}

.text-btn.text-btn-small {
  font-size: 14px;
}

/* Inputs */
.input {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--neutral500);
  outline: none;
  transition: border-color 0.15s, border-width 0.15s;
}

.input:focus {
  border-color: var(--green);
  border-width: 2px;
  padding: 11px 15px; /* compensate for thicker border */
}

.input::placeholder {
  color: var(--neutral500);
}

/* OTP input row */
.otp-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.otp-input {
  width: 44px;
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Merriweather', Georgia, serif;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--neutral500);
  outline: none;
}

.otp-input:focus {
  border-color: var(--green);
  border-width: 2px;
}

.otp-input.filled {
  border-color: var(--green);
  border-width: 2px;
}

/* Error text */
.error-text {
  color: var(--red);
  font-size: 14px;
  text-align: center;
}

/* Spacing utilities */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-30 { margin-top: 30px; }
.mb-8 { margin-bottom: 8px; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* Step visibility */
.step { display: none; }
.step.active { display: block; }

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--white);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

.spinner-dark {
  border-color: var(--ink);
  border-top-color: transparent;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Links row */
.links-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Success checkmark */
.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--green);
  color: var(--white);
  font-size: 32px;
  font-weight: 700;
}

/* Color squares — the three brand squares from the logo */
.color-squares {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 30px;
}

.color-square {
  width: 24px;
  height: 24px;
}

.color-square.red { background: var(--red); }
.color-square.yellow { background: var(--yellow); }
.color-square.green { background: var(--green); }

/* Legal pages */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px 40px;
}

.legal-logo {
  display: block;
  margin: 0 auto 40px;
  width: 220px;
  height: auto;
}

.legal-page h1 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 6px;
}

.legal-page .effective-date {
  color: var(--neutral500);
  font-size: 14px;
  margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-page h3 {
  font-size: 16px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal-page p, .legal-page li {
  color: var(--neutral700);
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-page a {
  color: var(--green);
  text-decoration: none;
}

.legal-page a:hover {
  text-decoration: underline;
}

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}

.legal-page th, .legal-page td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--neutral200);
  color: var(--neutral700);
}

.legal-page th {
  background: var(--base);
  font-weight: 700;
  color: var(--ink);
}

/* Legal footer */
.legal-footer {
  background: var(--ink);
  padding: 40px 24px;
  text-align: center;
}

.legal-footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 20px;
}

.legal-footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.legal-footer-links a {
  color: var(--neutral500);
  font-size: 14px;
  text-decoration: none;
}

.legal-footer-links a:hover {
  color: var(--white);
}

.legal-footer-copyright {
  color: var(--neutral500);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 420px) {
  .container {
    max-width: 100%;
  }

  .logo {
    width: 220px;
  }
}
