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

body {
  background: #0f0f1a;
  min-height: 100vh;
  font-family: 'Segoe UI', sans-serif;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  gap: 32px;
}

h1 {
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #666;
}

/* NAV */
nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
nav a, nav button {
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
  border: 1px solid #2a2a40;
  color: #888;
  background: #1a1a2e;
  cursor: pointer;
}
nav a:hover, nav button:hover { opacity: 0.75; }
nav a.active { background: #6c63ff; color: #fff; border-color: #6c63ff; }
nav .btn-login { border-color: #ffbe76; color: #ffbe76; }
nav .btn-logout { border-color: #6c63ff; color: #6c63ff; }
nav button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ADMIN */
.admin-only { display: none !important; }
body.is-admin .admin-only { display: flex !important; }

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  justify-content: center;
  align-items: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #1a1a2e;
  border: 1px solid #2a2a40;
  border-radius: 16px;
  padding: 32px;
  width: 320px;
  text-align: center;
}
.modal h3 {
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 20px;
}
.modal input {
  width: 100%;
  background: #12121f;
  border: 1px solid #2a2a40;
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  margin-bottom: 12px;
  text-align: center;
}
.modal input:focus { border-color: #6c63ff; }
.modal .btn-confirm {
  width: 100%;
  padding: 12px;
  background: #6c63ff;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.modal .btn-confirm:hover { opacity: 0.85; }
.modal .modal-error {
  color: #ff6584;
  font-size: 0.8rem;
  margin-top: 10px;
  min-height: 1.2em;
}

/* LAYOUT */
.container {
  width: 100%;
  max-width: 500px;
}

.section-title {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 16px;
  text-align: center;
}

/* SHARED UTILITIES */
.empty-msg {
  color: #333;
  font-size: 0.85rem;
  text-align: center;
  padding: 32px 0;
  font-style: italic;
}

.hint,
.member-count,
.word-count {
  font-size: 0.75rem;
  color: #444;
  text-align: center;
  margin-top: 16px;
}

.btn-add {
  background: #6c63ff;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-add:hover { opacity: 0.85; }

.btn-remove {
  background: #2a2a40;
  color: #888;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
}
.btn-remove:hover { background: #ff6584; color: #fff; }

.btn-score {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
}
.btn-score:active { transform: scale(0.9); }
.btn-plus {
  background: #ff6584;
  color: #fff;
}
.btn-plus:hover { opacity: 0.85; }
.btn-minus {
  background: #1a1a2e;
  color: #888;
  border: 1px solid #2a2a40;
}
.btn-minus:hover { opacity: 0.75; }

.score-positive { color: #ff6584; }
.score-zero { color: #555; }
