body{
    background-color: #dfe9f3;
    font-family: Arial, Helvetica, sans-serif;
}

.contenedor{
    width: 500px;
    margin: auto;
    margin-top: 30px;
    background-color: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0px 0px 10px gray;
}

h1{
    text-align: center;
    color: #333;
}

label{
    display: block;
    margin-top: 12px;
    font-weight: bold;
}

input,
select{
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

input[type="range"]{
    width: 100%;
}

.botones{
    margin-top: 20px;
    text-align: center;
}

input[type="submit"],
input[type="reset"]{
    width: 120px;
    background-color: #4a90e2;
    color: white;
    border: none;
    cursor: pointer;
    margin: 10px;
    font-weight: bold;
}

input[type="submit"]:hover,
input[type="reset"]:hover{
    background-color: #357abd;
}

.mensaje{
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    background-color: #e1f7d5;
    color: #2d6a2b;
    border: 1px solid #8bc34a;
}


/* ============================================ */
/* MEJORAS DE RESPONSIVIDAD Y ANIMACIONES       */
/* ============================================ */

/* Transiciones smooth */
* {
  transition: all 0.3s ease;
}

a, button, input[type="button"], input[type="submit"] {
  transition: all 0.3s ease;
  cursor: pointer;
}

a:hover, button:hover, input[type="button"]:hover, input[type="submit"]:hover {
  transform: translateY(-2px);
}

/* Media queries para responsividad */
@media (max-width: 1024px) {
  body {
    font-size: 16px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  body {
    padding: 15px !important;
    font-size: 15px;
  }
  
  main {
    padding: 16px !important;
    margin: 10px !important;
  }
  
  h1 {
    font-size: 1.5rem !important;
  }
  
  h2 {
    font-size: 1.25rem !important;
  }
  
  table {
    font-size: 0.9rem;
  }
  
  .card, .carta, .container {
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px !important;
    font-size: 14px;
  }
  
  main {
    padding: 12px !important;
    margin: 5px !important;
  }
  
  h1 {
    font-size: 1.25rem !important;
  }
  
  h2 {
    font-size: 1.1rem !important;
  }
  
  .flex-container, .grid {
    flex-direction: column;
    grid-template-columns: 1fr;
  }
  
  img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  table {
    font-size: 0.8rem;
    overflow-x: auto;
    display: block;
  }
}

/* Animaciones */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

main, .card, .carta, .container {
  animation: slideIn 0.5s ease-out;
}

img {
  animation: fadeIn 0.4s ease-out;
}

/* Efecto hover mejorado en elementos interactivos */
a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  opacity: 0.8;
}

/* Soporte para formularios */
input, textarea, select {
  border-radius: 6px;
  border: 2px solid #e0e0e0;
  padding: 10px;
  font-family: inherit;
  transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #557a6b;
  box-shadow: 0 0 0 3px rgba(85, 122, 107, 0.1);
}

/* Soporte para viewport meta */
@supports (display: grid) {
  .grid {
    display: grid;
    gap: 20px;
  }
}

/* Print styles */
@media print {
  body {
    background-color: white;
  }
  
  a {
    text-decoration: underline;
  }
}
