/* === FUENTES === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&family=Open+Sans:wght@400;600&display=swap');

/* === RESET & BASE === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg, #fff6fa, #fef0ff);
  font-family: 'Open Sans', sans-serif;
  color: #333;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* === HEADER === */
header {
  background: #ffffffcc;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 1em 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #ffc6e6;
}

#logo img {
  height: 50px;
  filter: drop-shadow(0 0 5px rgba(255, 0, 119, 0.2));
  transition: transform 0.3s ease;
}

#logo img:hover {
  transform: scale(1.05);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2em;
}

nav li a {
  color: #d1008f;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: 0.3s ease;
}

nav li a:hover {
  color: #ff1493;
}

#menu-icon {
  display: none;
}

/* === LOGOS & HEADERME === */
.headerme {
  text-align: center;
  padding-top: 120px;
  padding-bottom: 1em;
}

.logopicupper {
  width: 300px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.2);
}

.logopicupper2 {
  width: 140px;
  height: auto;
  margin: 1em auto;
}

.headerme h3 {
  color: #880055;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.2em;
  margin-top: 1em;
}

/* === TABLA DE JUEGO === */
.table {
  margin: 2em auto;
  text-align: center;
  perspective: 100vw;
}

.table__dealer,
.table__user {
  font-weight: bold;
  margin-bottom: 1em;
  font-size: 1.2em;
  color: #4a004f;
}

/* === CARTAS === */
.card {
  display: inline-block;
  margin: 10px;
  width: 120px;
  height: 160px;
  position: relative;
  perspective: 1000px;
}

.card__front,
.card__back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  backface-visibility: hidden;
  transition: transform 0.6s ease;
}

.card__front {
  background-color: #fff;
  border: 2px solid #ff80c0;
  color: #ff1493;
  font-size: 2.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transform: rotateY(0deg);
}

.card__back {
  background-color: #ffd6eb;
  border: 2px solid #ff80c0;
  transform: rotateY(180deg);
}

.card__front.spades::before { content: '\2660'; }
.card__front.clubs::before { content: '\2663'; }
.card__front.diamonds::before { content: '\2666'; }
.card__front.hearts::before { content: '\2665'; }

/* === BOTONES === */
.btn {
  background-color: #ff66b2;
  border: none;
  color: white;
  padding: 10px 20px;
  margin: 10px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  text-transform: uppercase;
}

.btn:hover {
  background-color: #d1008f;
}

.btn--reset {
  background-color: #660033;
}

/* === GAME OVER === */
.gameover {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 240, 250, 0.95);
  z-index: 100;
  text-align: center;
}

.gameover.active {
  display: block;
}

.gameover__msg {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
}

.gameover__msg::before {
  content: attr(data-msg);
  display: block;
  font-size: 1.5em;
  color: #880055;
  margin-bottom: 1em;
  font-weight: bold;
}

/* === FOOTER === */
.footer {
  margin-top: 4em;
  padding: 2em 1em;
  background: #fff;
  text-align: center;
  border-top: 1px solid #ffe6f0;
}

.footer img {
  height: 40px;
  transition: transform 0.3s ease;
}

.footer img:hover {
  transform: scale(1.1);
}
