@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(#ffffff, #dcdcdc);
  font-family: 'Roboto', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  color: #00188a;
}

html {
  cursor: url("https://raw.githubusercontent.com/WebDevSimplified/Mix-Or-Match/master/Assets/Cursors/Ghost.cur"), auto;
}

/* ==================== TELA INICIAL ==================== */
#tela-inicial {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
}

/* Logo grande na tela inicial (desktop/tablet) */
#tela-inicial .logo-container img {
  max-width: 400px;
  width: 100%;
}

/* Logo AINDA MAIOR no celular (mobile vertical) */
@media (max-width: 600px) {
  #tela-inicial .logo-container img {
    max-width: 400px;   /* Fica gigante e impactante em celular */
    width: 100%;
  }

  #tela-inicial {
    padding: 15px;
  }

  #botao-iniciar {
    margin-top: 70px;   /* Mais espaço entre logo e botão no mobile */
  }
}

#botao-iniciar {
  margin-top: 60px;
  padding: 18px 70px;
  font-size: 2.4em;
  background: #f35096;
  color: #ffffff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

#botao-iniciar:hover { transform: scale(1.08); }

@media (max-width: 600px) {
  #botao-iniciar {
    font-size: 2.2em;
    padding: 16px 60px;
  }
}

.escondido { display: none; }

/* ==================== LOGO DENTRO DO JOGO (independente) ==================== */
.jogo-logo {
  text-align: center;
  margin: 50px auto 50px;
}

/* Tamanho padrão no desktop/tablet */
.jogo-logo img {
  max-width: 200px;
  width: 60%;
}

/* Um pouco menor no mobile para não ocupar muito espaço */
@media (max-width: 600px) {
  .jogo-logo img {
    max-width: 200px;
    width: 60%;
  }
}

/* ==================== INFORMAÇÕES DO JOGO ==================== */
.game-info-container {
  max-width: 580px;
  margin: 0 auto 20px auto;
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.game-info {
  color: #00188a;
  font-size: 1.1em;
  background: #00178a1b;
  padding: 10px 18px;
  border-radius: 50px;
  text-align: center;
  flex: 1;
  min-width: 120px;
}

@media (max-width: 600px) {
  .game-info-container {
    max-width: 500px;
    padding: 0 10px;
  }

  .game-info {
    font-size: 0.9em;
    padding: 10px 15px;
  }
}

@media (max-width: 400px) {
  .game-info {
    font-size: 1.3em;
  }
}

/* ==================== GRID DAS CARTAS ==================== */
.game-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 15px;
  justify-content: center;
  perspective: 800px;
  max-width: 580px;
  margin: 0 auto;
  padding: 0 15px;
}

@media (max-width: 600px) {
  .game-container {
    max-width: 500px;
    grid-gap: 12px;
    padding: 0 10px;
  }
}

/* Cartas */
.card {
  position: relative;
  height: 155px;
  width: 115px;
  border-radius: 50px;
}

@media (max-width: 600px) {
  .card {
    height: 145px;
    width: 108px;
  }
}

@media (max-width: 400px) {
  .card {
    height: 135px;
    width: 100px;
  }
}

.card:hover {
  cursor: url("https://raw.githubusercontent.com/WebDevSimplified/Mix-Or-Match/master/Assets/Cursors/GhostHover.cur"), auto;
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
  border-radius: 10px;
  border: 3px solid;
  transition: transform 500ms ease-in-out;
}

.card-back { background: #ffffff; border-color: #f35096; }
.card-front { background: #ffdeed; border-color: #ff006f; transform: rotateY(180deg); }

.card.visible .card-back { transform: rotateY(180deg); }
.card.visible .card-front { transform: rotateY(0); }

.card.matched .card-value {
  transform: scale(1.05);
  animation: none;
}

.card-value {
  max-width: 88%;
  max-height: 88%;
  transform: scale(0.9);
  transition: transform 0.2s;
}

.card-front:hover .card-value { transform: scale(1); }

.spider {
  width: 72%;
  align-self: flex-start;
  transform: translateY(-10px);
  transition: transform 0.2s;
}

.card-back:hover .spider { transform: translateY(0); }

/* ==================== POPUPS ==================== */
.popup-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.24);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.popup-modal.active { display: flex; }

.popup-content {
  background: #ffffff;
  padding: 35px;
  border-radius: 50px;
  text-align: center;
  border: 4px solid #f35096;
  max-width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.popup-content h2 {
  font-size: 3em;
  color: #f35096;
  margin: 0 0 20px;
}

.popup-content p {
  font-size: 1.6em;
  color: #00188a;
  margin: 20px 0;
  line-height: 1.5;
}

.btn-popup {
  margin-top: 25px;
  padding: 15px 50px;
  font-size: 1.8em;
  background: #f35096;
  color: #ffffff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
}