/* Reset y estilos generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #0b0f1a;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header {
  background-color: #0f172a;
  padding: 20px 0;
  text-align: center;
  box-shadow: 0 2px 5px #00000050;
}

header h1 {
  color: #00e0b5;
  font-size: 2.5em;
}

/* Navbar */
nav {
  background-color: #1a2433;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  gap: 30px;
}

nav a {
  color: #ccc;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav a:hover {
  color: #00e0b5;
}

/* Contenido principal */
main {
  flex: 1;
  padding: 40px 20px;
  width: 100%;
}

/* Estilo general del grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 50px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* Tarjetas */
.card {
  position: relative;
  background: #1a2433;
  border-radius: 12px;
  border: solid 3px #00e0b5;
  height: 300px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, background 0.2s;
  cursor: pointer;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-15px);
  background: #223143;
}

.card-image {
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.play-btn {
  background-color: #00e0b5;
  color: #0b0f1a;
  border: none;
  padding: 12px 0;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
}

.modo {
  font-size: 15px;
  color: #cccccc;
  text-align: center;
  font-weight: bold;
  padding: 8px 10px;
  background-color: #1a2433;
  width: 100%;
}

/* Footer */
footer {
  background-color: #0f172a;
  padding: 15px 0;
  text-align: center;
  font-size: 14px;
  color: #888;
}

/* Responsive para celulares */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.8em;
    padding: 0 10px;
  }

  nav {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }

  nav a {
    font-size: 1rem;
  }

  main {
    padding: 20px 10px;
  }

  .grid {
    display: flex;
    flex-direction: column;
    align-items: center; /* Añade esto para centrar las tarjetas */
    gap: 25px;
    padding: 0 10px;
    max-width: 100%; /* Asegura que ocupe todo el ancho */
  }

  .card {
    width: 100%;
    max-width: 320px; /* Establece un máximo pero permite que se ajuste */
    margin: 0 auto; /* Centra la tarjeta */
    height: auto;
  }

  .card-image {
    height: 160px;
  }

  .play-btn {
    font-size: 1rem;
    padding: 10px;
  }

  .modo {
    font-size: 14px;
    padding: 6px 8px;
  }

  footer {
    font-size: 12px;
    padding: 12px 0;
  }
}