:root {
  --red: #f6598e;
  --orange: #f09262;
  --yellow: #ede874;
  --lime: #c2e774;
  --green: #91e478;
  --aqua: #83edcf;
  --skye: #86dce9;
  --snow: #83c4e6;
  --blue: #7796df;
  --purple: #8b79e8;
  --violet: #b37fed;
  --pink: #f186ed;
  --cherry: #cc6d91;

  --text: #ced1f0;
  --subtext1: #b6b8de;
  --subtext0: #999ac7;
  --overlay2: #8787b2;
  --overlay1: #6d6d93;
  --overlay0: #545573;
  --surface2: #3c3d53;
  --surface1: #2a2c3b;
  --surface0: #1e1f2a;
  --base: #14161d;
  --mantle: #0e0f15;
  --crust: #090a0f;
}

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

body {
  background: linear-gradient(
    to bottom left,
    var(--green) 0%,
    var(--green) 32.95%,
    var(--base) 33%,
    var(--base) 100%
  );

  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji";

  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;

  min-height: 100vh;
}

#root {
  align-items: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  max-width: 64rem;
  padding-inline: 8rem;
  margin-block: 2rem;
}

@media (max-width: 768px) {
  #root {
    padding-inline: 2rem;
  }
}

@media (max-width: 416px) {
  #root {
    padding-inline: unset;
  }
}

main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.card {
  background: var(--surface0);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 10px var(--crust);
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.hero-subtitle {
  text-align: center;
  margin-top: 0.25rem;
}

.hero-warning {
  color: var(--yellow);
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-size: 0.9rem;
  margin: 1rem 0;
  text-align: center;
}

.hero-warning a {
  color: var(--yellow);
  font-weight: 600;
  text-decoration: underline;
}

.hero-error {
  color: var(--red);
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-size: 0.9rem;
  margin: 0.5rem 0;
  text-align: center;
}

.hero-success {
  color: var(--green);
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-size: 0.9rem;
  margin: 0.5rem 0;
  text-align: center;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input,
.btn {
  background: var(--surface2);
  color: var(--text);
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--surface2);
  border-radius: 4px;
  background-color: var(--surface0);
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
}

input[type="checkbox"]:checked {
  background-color: var(--green);
  border-color: var(--green);
}

.checkbox-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.input:nth-child(1) {
  margin-top: 1rem;
}

.btn.primary {
  background: var(--green);
  color: var(--base);
}

.btn:hover {
  opacity: 0.9;
}

.stats-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat {
  text-align: center;
  padding: 1rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--subtext1);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 0.25rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.users-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .users-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.user-card {
  background: var(--surface0);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 2px 6px var(--crust);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar.placeholder {
  background: var(--overlay0);
  display: inline-block;
}

.user-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.user-handle {
  font-size: 0.85rem;
  color: var(--subtext1);
}

.p-2 {
  padding-bottom: 2rem;
}

.mt-2 {
  margin-top: 2rem;
}

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
  padding-left: 1.25rem;
  color: var(--subtext1);
  line-height: 1.5;
}

.guide-list code,
.invite-code {
  background: var(--surface2);
  color: var(--text);
  padding: 0.1rem 0.4rem;
  border-radius: 0.4rem;
  font-size: 0.9em;
}

.invite-code {
  user-select: all;
  display: inline-block;
  margin-top: 0.25rem;
}