:root {
  --accent: #007bff;
  --bg-light: #ffffff;
  --bg-dark: #0e0e0e;
  --text-light: #fff;
  --text-dark: #111;
  --card-bg-light: #f4f4f4;
  --card-bg-dark: #1a1a1a;
}

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color-scheme: light dark;
  background-color: light-dark(var(--bg-light), var(--bg-dark));
  color: light-dark(var(--text-dark), var(--text-light));
}

header {
  background: light-dark(var(--card-bg-light), var(--card-bg-dark));
  color: var(--accent);
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 1.3rem;
}

main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  max-width: 700px;
  margin: auto;
}

section {
  background: light-dark(var(--card-bg-light), var(--card-bg-dark));
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

button {
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  transition: background 0.2s ease;
}
button:hover {
  background-color: #0056b3;
}

input, select {
  width: 100%;
  padding: 0.6rem;
  margin: 0.3rem 0 1rem 0;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: light-dark(var(--bg-light), #222);
  color: inherit;
  box-sizing: border-box;
}

label {
  display: block;
  margin-top: 0.3rem;
  font-weight: 500;
}

#missions button {
  margin-top: 0.5rem;
}

.mission.completed {
  background-color: #333;
  opacity: 0.6;
  pointer-events: none;
}

#xp-bar {
  width: 100%;
  background: #555;
  border-radius: 5px;
  height: 15px;
  overflow: hidden;
  margin: 0.3rem 0 1rem;
}
#xp-progress {
  background: var(--accent);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

/* Pulsanti giorni della settimana e attrezzatura */
.weekdays-btn-group, .equipment-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.weekday-btn, .equipment-btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: light-dark(var(--bg-light), var(--card-bg-dark));
  color: inherit;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, color 0.2s;
}
.weekdays-btn-group input[type="checkbox"],
.equipment-btn-group input[type="checkbox"] {
  display: none;
}
.weekdays-btn-group input[type="checkbox"]:checked + .weekday-btn,
.equipment-btn-group input[type="checkbox"]:checked + .equipment-btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

@media (max-width: 600px) {
  main { padding: 0.5rem; }
  button { font-size: 0.9rem; }
}
