body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg,#ff6b6b, #ff3b3b);
  margin: 0;
}

header {
  display: flex;
  justify-content: space-between;
  padding: 15px 25px;
  background: rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
  color: #222;
}

.status {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.status span {
  background: rgba(255, 255, 255, 0.6);
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
}

main {
  display: flex;
  padding: 20px;
  gap: 20px;
}

/* PANEL */
.panel {
  width: 260px;
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.panel h3 {
  margin-top: 0;
}

.panel select,
.panel button {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border-radius: 8px;
  border: none;
}

.panel button {
  background: #ff6b6b;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

.panel button:hover {
  background: #ff3b3b;
  color: white;
}

/* GAME */
.game {
  flex: 1;
  background: rgba(255,255,255,0.7);
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.game-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
}

#message {
  margin: 20px 0;
  font-size: 24px;
  text-align: center;
  font-weight: bold;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.card {
  height: 110px;
  background: linear-gradient(145deg, #dfe6e9, #b2bec3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  font-size: 18px;
  font-weight: bold;
  transition: 0.2s;
  gap: 6px;
}

.card img {
  width: 55px;
  height: 55px;
  object-fit: contain;
}

.card-text {
  font-size: 14px;
  font-weight: bold;
}

.active {
  border: 4px solid #ff4757;
  background: #ffeaa7;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255,0,0,0.6);
}

/* ========================= */
/* 📲 TABLET RESPONSIVE */
/* ========================= */
@media (max-width: 1024px) {

  main {
    flex-direction: column;
    align-items: center;
  }

  .panel {
    width: 100%;
    max-width: 500px;
  }

  .game {
    width: 100%;
    max-width: 600px;
  }

  .grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card {
    height: 100px;
  }

  .card img {
    width: 50px;
    height: 50px;
  }
}

/* ========================= */
/* 📱 MÓVIL RESPONSIVE */
/* ========================= */
@media (max-width: 600px) {

  header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .status span {
    display: block;
    margin: 5px 0;
  }

  main {
    flex-direction: column;
    padding: 10px;
  }

  .panel {
    width: 100%;
    padding: 15px;
  }

  .game {
    width: 100%;
    padding: 15px;
  }

  #message {
    font-size: 20px;
  }

  /* 🔥 GRID MÁS ADAPTATIVO */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card {
    height: 90px;
    font-size: 14px;
  }

  .card img {
    width: 40px;
    height: 40px;
  }

  .card-text {
    font-size: 12px;
  }
}