:root {
  --red: #e10600;
  --border: #e5e7eb;
  --muted: #6b7280;
  --radius: 12px;
  --text: #111;
  --bg: #fafafa;
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

/* Layout */
.wrap {
  width: min(800px, 92%);
  margin: 0 auto;
  padding: 16px 0 40px;
}

/* LOGIN CARD */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

h1,
h2 {
  margin: 0 0 10px;
  line-height: 1.2;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

/* FORM */
.grid {
  display: grid;
  gap: 12px;
}

.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
}

.btn {
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  padding: 12px 16px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  background: #c60000;
}

.btn-outline {
  background: #fff;
  color: var(--red);
}

.btn-outline:hover {
  background: #ffeaea;
}

/* TOPBAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 0;
}

.topbar h2 {
  font-size: 20px;
  margin: 0;
}

/* LIST of games */
.list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.item-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.date {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.title {
  font-size: 17px;
  font-weight: 600;
}

.meta {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

.right {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.slot {
  min-width: 110px;
  border: 1px dashed var(--border);
  border-radius: 999px;
  background: #fdfdfd;
  padding: 5px 10px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* MEDIA QUERIES */
@media (max-width: 640px) {
  .wrap {
    width: 94%;
  }

  .input {
    font-size: 15px;
  }

  .btn {
    font-size: 15px;
    padding: 10px 14px;
  }

  .item-header {
    grid-template-columns: 1fr;
  }

  .right {
    justify-items: start;
  }

  .slots {
    justify-content: flex-start;
  }

  .slot {
    min-width: 90px;
    font-size: 13px;
  }
}