* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Comic Sans MS", "Trebuchet MS", Verdana, sans-serif;
  background: linear-gradient(180deg, #bde0fe 0%, #a2d2ff 100%);
  color: #2b2d42;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  padding: 1rem;
  text-align: center;
}

#changelog-link,
#historia-link {
  position: fixed;
  bottom: 1rem;
  background: #ffffff;
  color: #2b2d42;
  text-decoration: none;
  font-weight: bold;
  border-radius: 14px;
  padding: 0.5rem 0.9rem;
  box-shadow: 0 4px 0 #6c8ebf;
  z-index: 1000;
}

#changelog-link {
  right: 1rem;
}

#historia-link {
  left: 1rem;
}

header h1 {
  margin: 0;
  font-size: 2.2rem;
}

main {
  width: 100%;
  max-width: 900px;
  padding: 0 1rem 2rem;
}

.hidden {
  display: none !important;
}

#player-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

#player-toggle {
  background: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 0.6rem 1.1rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 0 #6c8ebf;
}

#player-panel {
  width: 100%;
  max-width: 500px;
  background: #ffffff;
  border-radius: 20px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 0 #6c8ebf;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

#player-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: #eef4ff;
  border-radius: 12px;
  padding: 0.2rem;
}

.player-chip.active {
  background: #d7ecff;
  outline: 2px solid #6c8ebf;
}

.player-name-button {
  background: none;
  border: none;
  font-family: inherit;
  font-weight: bold;
  font-size: 1rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: #2b2d42;
}

.player-icon-button {
  background: none;
  border: none;
  font-size: 1rem;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
  color: #6c8ebf;
}

#add-player-form {
  display: flex;
  gap: 0.5rem;
}

#add-player-form input {
  flex: 1;
  border: 2px solid #bde0fe;
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  font-size: 1rem;
  font-family: inherit;
}

#add-player-form button {
  background: #6c8ebf;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
}

#player-stats p {
  margin: 0 0 0.3rem;
}

#player-stats ul {
  margin: 0;
  padding-left: 1.2rem;
}

#game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.game-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem 1rem;
  text-align: center;
  text-decoration: none;
  color: #2b2d42;
  box-shadow: 0 6px 0 #6c8ebf;
  transition: transform 0.1s ease;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.game-card:hover {
  transform: translateY(-4px);
}

.game-card:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #6c8ebf;
}

.game-card .icon {
  font-size: 3.5rem;
}

.game-card .title {
  font-size: 1.4rem;
  font-weight: bold;
}

.game-card .description {
  font-size: 0.95rem;
  color: #5a5f7a;
}

.game-card .keyboard-required {
  font-size: 0.85rem;
  font-weight: bold;
  color: #b5453f;
}

#intro {
  width: 100%;
  max-width: 700px;
  background: #ffffff;
  border-radius: 20px;
  padding: 1rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 0 #6c8ebf;
  font-size: 0.95rem;
  line-height: 1.5;
}

#intro p {
  margin: 0.4rem 0;
}
