/* =========================
   RESET & BASE (MOBILE FIRST)
========================= */

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

html {
  font-size: 16px; /* critical for iOS */
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f4f4f4;
  line-height: 1.5;
  color: #111;
}

/* Prevent iOS zoom */
input,
select,
textarea {
  font-size: 16px;
}

/* =========================
   PAGE LAYOUT
========================= */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================
   HERO
========================= */

.hero {
  background: #000;
  color: #fff;
  padding: 48px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 2.2rem;
  margin: 0;
}

.subtitle {
  font-size: 1.1rem;
  margin-top: 10px;
}

.counter {
  margin-top: 24px;
  font-size: 1rem;
}

.progress {
  width: 100%;
  max-width: 280px;
  height: 8px;
  background: #444;
  margin: 10px auto 0;
  border-radius: 4px;
}

.progress div {
  height: 100%;
  width: 0%;
  background: #00c853;
  border-radius: 4px;
}

/* =========================
   INVITE
========================= */

.invite {
  background: #fff;
  padding: 32px 20px;
  text-align: center;
}

.invite h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.invite p {
  font-size: 1rem;
}

.invite-actions {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 20px;
}

.invite-icon {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #111;
}

.invite-icon svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  display: block;
}

/* =========================
   FORM
========================= */

.form-section {
  background: #fff;
  padding: 32px 20px 48px;
  text-align: center;
}

.form-section h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

form {
  max-width: 420px;
  margin: 0 auto;
}

input {
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

button {
  width: 100%;
  padding: 16px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.05rem;
  cursor: pointer;
}

.note {
  font-size: 0.85rem;
  color: #666;
  margin-top: 12px;
}

/* =========================
   TOAST
========================= */
#toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
}

.toast {
  min-width: 260px;
  margin-top: 10px;
  padding: 14px 18px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border-left: 4px solid #000;
  animation:
    slideUp 0.3s ease,
    fadeDown 0.3s ease 2.7s;
}

/* Variants */
.toast.success {
  border-left-color: #000;
}

.toast.error {
  border-left-color: #d32f2f;
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeDown {
  to {
    transform: translateY(40px);
    opacity: 0;
  }
}


/* =========================
   DESKTOP ENHANCEMENT
========================= */

@media (min-width: 768px) {
  .hero h1 {
    font-size: 2.6rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .invite h2,
  .form-section h2 {
    font-size: 1.7rem;
  }
}

/* =========================
   UTILS
========================= */

.hidden {
  display: none;
}
