body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans Thai', 'Segoe UI', Arial, sans-serif;
  background: #18141a;
  color: #f3e9e1;
  min-height: 100vh;
  font-size: 15px;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 4px 24px 4px;
  background: rgba(34, 24, 44, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  margin-top: 18px;
}

h1, h2, h3, h4 {
  font-family: 'Noto Sans Thai', 'Creepster', cursive, Arial, sans-serif;
  letter-spacing: 1px;
  color: #e94560;
  margin: 0 0 8px 0;
  font-size: 1.15em;
}

input, textarea, button, select {
  font-family: 'Noto Sans Thai', 'Segoe UI', Arial, sans-serif;
  font-size: 0.98em;
  border-radius: 7px;
  border: none;
  padding: 7px;
  margin: 5px 0;
  width: 100%;
  box-sizing: border-box;
}

button {
  background: #e94560;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 1px 4px rgba(233,69,96,0.08);
  border: none;
  outline: none;
  padding: 8px 0;
  margin-top: 4px;
  font-size: 1em;
}
button:hover, button:focus {
  background: #a8323e;
  transform: translateY(-1px) scale(1.02);
}

button:focus-visible {
  outline: 2.5px solid #e94560;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #e94560;
}

input, textarea, select {
  transition: box-shadow 0.2s, border 0.2s;
  border: 1.5px solid #2d1e36;
  background: #22182c;
  color: #f3e9e1;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 2px #e94560;
  border-color: #e94560;
}

input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2.5px solid #e94560;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #e94560;
}

.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.role-item {
  background: #2d1e36;
  color: #f3e9e1;
  padding: 5px 7px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.97em;
}
.role-item input[type='checkbox'] {
  accent-color: #e94560;
  width: 1em;
  height: 1em;
}
.role-item:hover {
  background: #3a2546;
  box-shadow: 0 2px 8px rgba(34,24,44,0.12);
}

@media (max-width: 600px) {
  #app {
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 4px 0 12px 0;
    max-width: 100vw;
  }
  h1, h2, h3, h4 {
    font-size: 1em;
  }
  .assignment-card {
    padding: 6px 4px;
    font-size: 0.95em;
    gap: 4px;
  }
  .role-list, .player-list-grid {
    gap: 3px;
  }
  .role-item, .player-list li {
    padding: 2px 2px;
    font-size: 0.95em;
    gap: 3px;
  }
  button, input, textarea, select {
    font-size: 0.97em;
    padding: 7px 0;
  }
  .player-list-card {
    padding: 6px 2px;
    margin-bottom: 6px;
  }
  .assignment-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

/* Add a subtle werewolf paw print background */
body::after {
  content: '';
  position: fixed;
  left: 10vw;
  bottom: 0;
  width: 180px;
  height: 180px;
  /* background: url('https://cdn.pixabay.com/photo/2013/07/13/12/46/paw-146238_1280.png') no-repeat center/contain; */
  opacity: 0.07;
  z-index: 0;
  pointer-events: none;
}

/* Assignment card style */
.assignment-card {
  background: #22182c;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(34,24,44,0.13);
  padding: 8px 8px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: box-shadow 0.2s, transform 0.2s;
  animation: fadeInCard 0.7s;
  font-size: 0.97em;
}
.assignment-card strong {
  font-size: 1em;
  letter-spacing: 0.3px;
}
.assignment-card .role-badge {
  margin-left: 4px;
  font-size: 0.97em;
  padding: 2px 7px;
}
@keyframes fadeInCard {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #e94560;
  color: #fff;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 1.08em;
  box-shadow: 0 2px 12px rgba(34,24,44,0.18);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s, top 0.4s;
}
.toast.show {
  opacity: 1;
  pointer-events: auto;
  top: 36px;
}
@media (max-width: 600px) {
  .toast {
    font-size: 1em;
    padding: 10px 12px;
    top: 8px;
  }
  .toast.show {
    top: 18px;
  }
}

.player-list-card {
  background: #22182c;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(34,24,44,0.13);
  padding: 10px 8px;
  margin-bottom: 10px;
  margin-top: 6px;
}
.player-list-card h4 {
  margin: 0 0 6px 0;
  font-size: 1em;
}
.player-list ul {
  margin: 0;
  padding: 0;
}
.player-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
  padding: 3px 0;
  border-bottom: none;
  background: none;
  font-size: 0.97em;
}
.player-list li:last-child {
  border-bottom: none;
}
.player-list .player-inactive {
  opacity: 0.5;
  text-decoration: line-through;
}
.player-list .player-active-checkbox {
  accent-color: #e94560;
  width: 1em;
  height: 1em;
}

.role-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.97em;
  margin-left: 4px;
  color: #fff;
}
.role-badge-werewolf { background: #e94560; }
.role-badge-villager { background: #3b7a57; }
.role-badge-seer { background: #5b5be6; }
.role-badge-witch { background: #a259c6; }
.role-badge-hunter { background: #e6b800; }
.role-badge-cupid { background: #e66b9c; }
.role-badge-little-girl { background: #f7a072; }
.role-badge-bodyguard { background: #4bb3fd; }
.role-badge-alpha-wolf { background: #7c3aed; }
.role-badge-tanner { background: #b5651d; }
.role-badge-minion { background: #22223b; }
.role-badge-custom { background: #888; }

.assignment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 10px 0;
}
@media (max-width: 900px) {
  .assignment-grid, .player-list-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .assignment-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

.player-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
@media (max-width: 900px) {
  .player-list-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .player-list-grid {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
.player-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
  padding: 3px 0;
  border-bottom: none;
  background: none;
}

.custom-role-list h4 {
  font-size: 0.98em;
  margin-bottom: 2px;
}
.custom-role-list ul {
  margin: 0;
  padding: 0;
}
.custom-role-list li {
  gap: 5px;
  font-size: 0.97em;
  padding: 2px 0;
}

.btn-primary { background: #e94560; color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: #a8323e; }

.btn-secondary { background: #4bb3fd; color: #fff; }
.btn-secondary:hover, .btn-secondary:focus { background: #2176ae; }

.btn-add { background: #3b7a57; color: #fff; }
.btn-add:hover, .btn-add:focus { background: #24513a; }

.btn-delete { background: #b5651d; color: #fff; }
.btn-delete:hover, .btn-delete:focus { background: #7a3e0e; }

.btn-edit { background: #e6b800; color: #222; }
.btn-edit:hover, .btn-edit:focus { background: #bfa000; }

.btn-history { background: #5b5be6; color: #fff; }
.btn-history:hover, .btn-history:focus { background: #3737a6; }

.btn-clear { background: #22223b; color: #fff; }
.btn-clear:hover, .btn-clear:focus { background: #11111d; }

.btn-icon { margin-right: 4px; } 