@font-face {
  font-family: 'Comic Sans MS Custom';
  src: url('fonts/comic-sans.ttf') format('truetype');
  font-display: swap;
}

body {
  font-family: 'Comic Sans MS Custom', 'Comic Sans MS', 'Chalkboard SE', 'Bradley Hand', cursive, Arial, sans-serif;
  background: #f2b02b;
  margin: 20px;
  padding: 0;
  padding-bottom: 60px;
}
h1 {
  text-align: center;
  color: #333;
}
#titulo {
  display: block;
  margin: 0 auto 20px auto;
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}
.container {
  max-width: 500px;
  margin: 0 auto;
  background: #fff;
  padding: 1.5em;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #b5b5b5;
}
.inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
}
.input-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.input-edit {
  flex: 1;
  padding: 7px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
}
.input-edit:focus {
  outline: 2px solid #fde636;
  outline-offset: 2px;
}
.remove {
  color: #ff7800;
  cursor: pointer;
  font-size: 1.5em;
  background: none;
  border: none;
  padding: 0 4px;
  box-shadow: none;
  font-weight: bold;
  width: auto;
}
input[type="text"] {
  width: 100%;
  padding: 10px;
  margin-right: 0;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  font-size: 16px;
  font-family: inherit;
}
input[type="text"]:focus {
  outline: 2px solid #fde636;
  outline-offset: 2px;
}
button {
  padding: 10px 15px;
  border: none;
  background-color: #fde636;
  color: black;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s, box-shadow 0.3s;
  font-family: inherit;
  border: 1px solid #b5b5b5;
}
button:hover {
  background-color: #f2da1d;
}
button:focus-visible {
  outline: 2px solid #f2da1d;
  outline-offset: 2px;
}
#sortear {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  background-color: #fde636;
}
#sortear:hover {
  background-color: #f2da1d;
}
#winner {
  margin-top: 20px;
  font-size: 1.8em;
  color: green;
  font-weight: bold;
  min-height: 38px;
  text-align: center;
}
#loadingGif {
  margin-top: 20px;
  text-align: center;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}
#loadingGif.fade-out {
  opacity: 0;
}
#loadingGif img {
  max-width: 360px;
  height: auto;
}
#loadingText {
  font-size: 1.1em;
  color: #333;
  margin-top: 10px;
  margin-bottom: 0;
  font-weight: bold;
}
.version {
  text-align: center;
  font-size: 0.9em;
  margin-top: 20px;
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}
.version a {
  text-decoration: underline;
  transition: color 0.3s ease;
}
.version a:hover {
  text-decoration: underline;
}
.new-gif {
  height: 20px;
  display: inline-block;
  vertical-align: middle;
}
#sponsor {
  text-align: center;
  margin-top: 20px;
}
.footer {
  background-color: #fff;
  text-align: center;
  padding: 10px 0;
  margin-top: 20px;
  border-top: 1px solid #ddd;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}
.footer a {
  color: #333;
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.3s ease;
}
.footer a:hover {
  text-decoration: underline;
}
/* Formulario responsive */
#addForm {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  width: 100%;
}
#addForm input {
  flex: 1;
  min-width: 0;
  max-width: none;
}
#addForm button {
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 768px){
  body {
    margin: 10px;
  }
  .container {
    max-width: 95vw;
    padding: 1em;
  }
  h1 {
    font-size: 1.5em;
    text-align: center;
  }
  .inputs-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  input[type="text"] {
    width: auto;
    max-width: none;
    font-size: 16px;
  }
  #addForm {
    flex-direction: column;
  }
  #addForm input,
  #addForm button {
    width: 100%;
    min-width: auto;
  }
  .input-edit {
    font-size: 16px;
  }
  button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
  }
  .remove {
    padding: 8px;
    font-size: 1.2em;
  }
}