
/* ==========================================================
   LUCKTINNMS - JOGO DA MEMÓRIA
   CSS COMPLETO - CHROMEBOOK

   30 PARES / 60 CARTAS
   10 COLUNAS / 6 LINHAS
   SEM ROLAGEM
   ENGRENAGEM NO CABEÇALHO
   IMAGENS INTEIRAS SEM CORTES
   ========================================================== */

/* ================= RESET ================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

html {
  background: #03050d;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;

  background: #03050d;
  color: #ffffff;

  font-family: Arial, Helvetica, sans-serif;

  overflow-x: hidden;

  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid #5ba8ff;
  outline-offset: 3px;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

/* ================= TELAS ================= */

.tela {
  display: none;

  width: 100%;

  min-height: 100vh;
  min-height: 100dvh;

  padding: 14px 12px 16px;

  position: relative;
}

.tela.ativa {
  display: flex;
}

/* ==========================================================
   TELA DE CARREGAMENTO
   ========================================================== */

#loadingScreen,
.loading-screen {
  position: fixed;
  inset: 0;

  z-index: 99999;

  width: 100%;

  height: 100vh;
  height: 100dvh;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  background: radial-gradient(
    circle at 50% 35%,
    #112e72 0%,
    #08183f 28%,
    #040b22 58%,
    #02050e 100%
  );

  opacity: 1;
  visibility: visible;

  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

#loadingScreen.loading-hidden,
.loading-screen.loading-finished {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.loading-bg::before {
  content: "";

  position: absolute;

  width: 650px;
  height: 650px;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  border-radius: 50%;

  border: 1px solid rgba(0, 140, 255, 0.2);

  box-shadow:
    0 0 80px rgba(0, 100, 255, 0.12);
}

.loading-content {
  position: relative;
  z-index: 2;

  width: min(520px, 88%);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.loading-crown {
  font-size: clamp(60px, 13vw, 110px);

  line-height: 1;

  margin-bottom: 4px;

  color: #159dff;

  text-shadow:
    0 0 8px #007eff,
    0 0 20px #007eff,
    0 0 45px rgba(0, 126, 255, 0.85);

  animation:
    loadingCrown 1.8s ease-in-out infinite;
}

@keyframes loadingCrown {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-7px) scale(1.05);
  }
}

.loading-logo,
.loading-title {
  margin: 0;

  font-size: clamp(38px, 8vw, 78px);

  font-weight: 900;
  font-style: italic;

  letter-spacing:
    clamp(2px, 0.7vw, 6px);

  color: #ffffff;

  -webkit-text-stroke:
    2px #173b88;

  text-shadow:
    0 0 5px #ffffff,
    0 0 12px #008cff,
    0 0 28px #0074ff,
    0 0 55px rgba(0, 116, 255, 0.65);
}

.loading-subtitle {
  margin-top: 12px;

  font-size: 15px;
  font-weight: 900;

  letter-spacing: 3px;

  color: #b9d7ff;
}

.loading-bar-area {
  width: 100%;
  margin-top: 42px;
}

.loading-bar {
  width: 100%;
  height: 12px;

  padding: 2px;

  overflow: hidden;

  border-radius: 50px;

  background:
    rgba(255, 255, 255, 0.1);

  border:
    1px solid rgba(0, 157, 255, 0.35);

  box-shadow:
    0 0 12px rgba(0, 132, 255, 0.25);
}

.loading-bar-progress,
.loading-progress {
  width: 0%;
  height: 100%;

  border-radius: 50px;

  background: linear-gradient(
    90deg,
    #006cff,
    #00a8ff,
    #ffffff,
    #00a8ff,
    #006cff
  );

  background-size: 200% 100%;

  box-shadow:
    0 0 8px #008cff,
    0 0 18px #0074ff;

  animation:
    loadingShine 1.2s linear infinite;

  transition:
    width 0.05s linear;
}

@keyframes loadingShine {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 200% 50%;
  }
}

.loading-percent {
  margin-top: 9px;

  color: #00a2ff;

  font-size: 13px;
  font-weight: 900;
}

.loading-text,
.loading-tip {
  margin-top: 25px;

  color: rgba(190, 210, 245, 0.7);

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 1.5px;

  text-align: center;
}

/* ==========================================================
   CAPA DO JOGO
   ========================================================== */

#homeScreen {
  padding: 0;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  background: radial-gradient(
    circle at 50% 25%,
    #112e72 0%,
    #08183f 28%,
    #040b22 58%,
    #02050e 100%
  );
}

.capa {
  position: relative;

  width: 100%;

  min-height: 100vh;
  min-height: 100dvh;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  padding: 30px 20px 35px;

  overflow: hidden;

  isolation: isolate;
}

.capa::before {
  content: "";

  position: absolute;

  width: 620px;
  height: 620px;

  left: -400px;
  bottom: -250px;

  border-radius: 50%;

  border:
    2px solid rgba(0, 132, 255, 0.32);

  box-shadow:
    0 0 30px rgba(0, 120, 255, 0.15);

  z-index: -2;
}

.capa::after {
  content: "";

  position: absolute;

  width: 580px;
  height: 580px;

  right: -360px;
  bottom: -200px;

  border-radius: 50%;

  border:
    2px solid rgba(0, 132, 255, 0.3);

  z-index: -2;
}

.decor {
  position: absolute;

  width: 4px;
  height: 4px;

  border-radius: 50%;

  background: #149cff;

  box-shadow:
    0 0 8px #149cff;

  opacity: 0.75;

  z-index: -1;
}

.decor-1 {
  top: 17%;
  left: 8%;
}

.decor-2 {
  top: 32%;
  right: 9%;
}

.decor-3 {
  bottom: 17%;
  left: 20%;
}

.logo-capa {
  width: 100%;
  max-width: 900px;

  text-align: center;

  margin-bottom: 28px;
}

.coroa {
  color: #159dff;

  font-size: 42px;
  line-height: 1;

  margin-bottom: -4px;

  text-shadow:
    0 0 20px #007eff;
}

.logo-capa h1 {
  font-size:
    clamp(42px, 8vw, 92px);

  font-style: italic;
  font-weight: 900;

  letter-spacing:
    clamp(1px, 0.5vw, 5px);

  color: #ffffff;

  -webkit-text-stroke:
    2px #173b88;

  text-shadow:
    0 0 5px #ffffff,
    0 0 12px #008cff,
    0 0 28px #0074ff,
    0 0 55px rgba(0, 116, 255, 0.65);
}

.linha-logo {
  width: min(520px, 80%);
  height: 5px;

  margin: 8px auto 0;

  border-radius: 50%;

  background: linear-gradient(
    90deg,
    transparent,
    #008cff,
    #ffffff,
    #008cff,
    transparent
  );

  box-shadow:
    0 0 12px #008cff;
}

.logo-capa p {
  margin-top: 24px;

  font-size:
    clamp(15px, 2.8vw, 23px);

  font-weight: 900;
  font-style: italic;

  line-height: 1.35;
}

.logo-capa p span {
  display: block;

  color: #00a2ff;

  margin-top: 3px;
}

.botoes-capa {
  width: min(520px, 90%);

  display: flex;
  flex-direction: column;

  gap: 14px;

  margin-top: 2px;
}

.botao-capa {
  width: 100%;
  height: 76px;

  border-radius: 24px;

  font-size:
    clamp(21px, 4vw, 29px);

  font-weight: 900;
  font-style: italic;

  color: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 18px;

  transition:
    transform 0.15s ease,
    filter 0.15s ease;
}

.botao-capa:active {
  transform: scale(0.97);
}

.botao-capa:hover {
  filter: brightness(1.08);
}

.botao-capa .icone {
  font-size: 31px;
  font-style: normal;
}

.botao-capa.jogar {
  border:
    2px solid #00a8ff;

  background: linear-gradient(
    100deg,
    #0d9af5,
    #443dff
  );

  box-shadow:
    0 0 12px rgba(0, 151, 255, 0.75);
}

.botao-capa.multiplayer {
  border:
    2px solid #009fff;

  background:
    rgba(5, 27, 67, 0.82);

  box-shadow:
    0 0 12px rgba(0, 151, 255, 0.35);
}

.recursos-capa {
  width: min(590px, 95%);

  display: flex;

  align-items: center;
  justify-content: center;

  margin-top: 35px;

  gap: 20px;
}

.recurso {
  display: flex;

  align-items: center;

  gap: 9px;

  min-width: 0;
}

.recurso > span {
  color: #079aff;
  font-size: 25px;
}

.recurso strong,
.recurso small {
  display: block;
}

.recurso strong {
  font-size: 10px;
}

.recurso small {
  font-size: 9px;
  font-weight: 700;
  margin-top: 2px;
}

.separador-recurso {
  width: 1px;
  height: 38px;

  background:
    rgba(255, 255, 255, 0.2);
}

/* ==========================================================
   MODAIS
   ========================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;

  z-index: 1000;

  display: none;

  align-items: center;
  justify-content: center;

  padding: 14px;

  background:
    rgba(1, 5, 18, 0.82);

  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);

  overflow-y: auto;
}

.modal-overlay.aberto {
  display: flex;
}

.modal {
  position: relative;

  width: min(430px, 100%);

  max-height:
    calc(100dvh - 28px);

  overflow-y: auto;

  padding: 30px 24px;

  border-radius: 24px;

  background: linear-gradient(
    145deg,
    #172856,
    #050c24
  );

  border:
    1px solid rgba(0, 153, 255, 0.5);

  box-shadow:
    0 0 35px rgba(0, 110, 255, 0.35),
    0 25px 70px rgba(0, 0, 0, 0.65);
}

.fechar {
  position: absolute;

  top: 9px;
  right: 12px;

  width: 40px;
  height: 40px;

  border: none;
  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.08);

  color: #ffffff;

  font-size: 26px;
}

.modal-icon {
  text-align: center;

  font-size: 42px;

  margin-bottom: 5px;
}

.modal h2 {
  text-align: center;

  font-size: 25px;
  letter-spacing: 1px;

  margin-bottom: 6px;
}

.modal-subtitulo {
  text-align: center;

  color: #9eabd0;

  margin-bottom: 24px;

  font-size: 14px;
}

/* ================= CAMPOS ================= */

label {
  display: block;

  margin-bottom: 8px;

  color: #d4daf0;

  font-size: 14px;
  font-weight: 700;
}

input {
  display: block;

  width: 100%;
  height: 52px;

  padding: 0 15px;

  margin-bottom: 16px;

  border:
    1px solid rgba(255, 255, 255, 0.12);

  border-radius: 14px;

  outline: none;

  background:
    rgba(255, 255, 255, 0.07);

  color: #ffffff;

  font-size: 16px;

  -webkit-appearance: none;
  appearance: none;
}

input:focus {
  border-color: #4fa8ff;

  box-shadow:
    0 0 0 3px rgba(79, 168, 255, 0.15);
}

input::placeholder {
  color: #78819f;
}

/* ================= BOTÕES ================= */

.btn {
  width: 100%;

  min-height: 52px;

  padding: 13px 16px;

  border: none;
  border-radius: 14px;

  font-size: 15px;
  font-weight: 800;

  color: #ffffff;

  transition:
    transform 0.12s ease,
    filter 0.12s ease,
    opacity 0.12s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.principal {
  background: linear-gradient(
    135deg,
    #167eff,
    #664cff
  );

  box-shadow:
    0 8px 25px rgba(40, 100, 255, 0.28);
}

.secundario {
  background:
    rgba(255, 255, 255, 0.07);

  border:
    1px solid rgba(255, 255, 255, 0.1);
}

.sair {
  margin-top: 12px;

  background:
    rgba(255, 50, 80, 0.1);

  border:
    1px solid rgba(255, 80, 100, 0.18);

  color: #ff9baa;
}

.separador {
  display: flex;
  align-items: center;

  gap: 12px;

  margin: 20px 0;

  color: #707a9e;

  font-size: 12px;
  font-weight: bold;
}

.separador::before,
.separador::after {
  content: "";

  flex: 1;
  height: 1px;

  background:
    rgba(255, 255, 255, 0.1);
}

.mensagem {
  min-height: 22px;

  margin-top: 14px;

  text-align: center;

  color: #b8c2e3;

  font-size: 14px;
  line-height: 1.4;
}

/* ================= CONTAINERS ================= */

.container {
  width: 100%;

  max-width: 650px;

  margin: auto;
}

.card {
  width: 100%;

  padding: 28px;

  border-radius: 24px;

  background:
    rgba(15, 22, 50, 0.94);

  border:
    1px solid rgba(255, 255, 255, 0.09);

  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4);
}

.texto-centro {
  text-align: center;

  color: #aeb8dc;

  line-height: 1.5;
}

/* ==========================================================
   SALA MULTIPLAYER
   ========================================================== */

#roomScreen {
  align-items: center;

  background: radial-gradient(
    circle at top,
    #14245a 0%,
    #080d22 45%,
    #03050d 100%
  );
}

.topo {
  width: 100%;

  margin-bottom: 20px;

  text-align: center;
}

.topo h1 {
  font-size:
    clamp(25px, 6vw, 40px);

  margin-bottom: 8px;
}

.codigo {
  display: inline-block;

  padding: 8px 15px;

  border-radius: 10px;

  background:
    rgba(255, 255, 255, 0.07);

  color: #9fb1ff;

  font-weight: 900;
  letter-spacing: 3px;
}

.codigo-grande {
  width: 100%;

  padding: 18px 8px;
  margin: 16px 0;

  text-align: center;

  border-radius: 15px;

  background:
    rgba(70, 100, 255, 0.08);

  border:
    1px dashed rgba(100, 140, 255, 0.4);
}

.codigo-grande span {
  font-size:
    clamp(30px, 9vw, 48px);

  font-weight: 900;

  letter-spacing:
    clamp(4px, 2vw, 9px);

  color: #aebaff;
}

.linha {
  width: 100%;
  height: 1px;

  margin: 24px 0;

  background:
    rgba(255, 255, 255, 0.08);
}

.sala-painel h2 {
  margin-bottom: 14px;
  text-align: center;
}

.players-list {
  display: flex;
  flex-direction: column;

  gap: 9px;
  width: 100%;
}

.player {
  width: 100%;

  padding: 13px 15px;

  border-radius: 12px;

  background:
    rgba(255, 255, 255, 0.06);

  border:
    1px solid rgba(255, 255, 255, 0.07);

  color: #e9ecff;

  font-weight: 700;
}

/* ==========================================================
   TELA DO JOGO
   ========================================================== */

#gameScreen {
  align-items: flex-start;

  background: radial-gradient(
    circle at top,
    #111e4c 0%,
    #070c20 50%,
    #02040b 100%
  );
}

.jogo-container {
  width: 100%;

  max-width: 1320px;

  margin: 0 auto;
}

.game-top {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 20px;

  width: 100%;

  margin-bottom: 20px;
}

.game-top h1 {
  font-size:
    clamp(24px, 6vw, 40px);
}

.game-top p {
  margin-top: 5px;

  color: #8f99bb;

  font-size: 13px;
}

.game-message {
  max-width: 45%;

  text-align: right;

  color: #b9c3e4;

  font-size: 14px;
  line-height: 1.4;
}

/* ==========================================================
   TABULEIRO - 60 CARTAS
   ========================================================== */

.game-board {
  display: grid;

  grid-template-columns:
    repeat(10, minmax(0, 1fr));

  width: 100%;

  max-width: 1260px;

  gap: 5px;

  margin: 0 auto 12px;

  user-select: none;
}

/* ==========================================================
   CARTAS
   ========================================================== */

.memoryCard {
  position: relative;

  display: flex;

  align-items: center;
  justify-content: center;

  width: 100%;
  min-width: 0;

  aspect-ratio: 3 / 4;

  padding: 0;

  overflow: hidden;

  border:
    2px solid rgba(116, 151, 255, 0.38);

  border-radius: 7px;

  background: linear-gradient(
    145deg,
    #243263,
    #111832
  );

  color: #ffffff;

  font-size:
    clamp(18px, 2vw, 27px);

  font-weight: 900;

  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.3);

  user-select: none;

  touch-action: manipulation;

  transition:
    border-color 0.12s ease,
    background-color 0.12s ease;
}

.memoryCard:active {
  transform: none;
}

.memoryCard:hover:not(.encontrada) {
  filter: brightness(1.08);
}

/* ================= CARTAS ABERTAS ================= */

.memoryCard.aberta {
  padding: 0;

  overflow: hidden;

  background: #080d20;
}

/* ================= PARES ENCONTRADOS ================= */

.memoryCard.encontrada {
  padding: 0;

  overflow: hidden;

  background: #080d20;

  border: 2px solid #32d58b;

  box-shadow:
    0 0 0 2px rgba(50, 213, 139, 0.18);

  cursor: default;
}

/* ==========================================================
   IMAGENS DAS CARTAS
   ========================================================== */

.memoryCard .carta-foto,
#gameScreen .memoryCard .carta-foto {
  display: block;

  width: 100%;
  height: 100%;

  max-width: 100%;
  max-height: 100%;

  min-width: 0;
  min-height: 0;

  /* Ocupa a carta inteira sem cortar */
  object-fit: fill;

  object-position: center;

  image-rendering: auto;

  margin: 0;
  padding: 0;

  border: none;

  background: #080d20;

  pointer-events: none;
  user-select: none;
}

/* ================= BOTÃO VOLTAR ================= */

.voltar {
  display: block;

  width: 100%;
  max-width: 320px;

  margin: 0 auto;
}

/* ==========================================================
   CHROMEBOOK - JOGO SEM ROLAGEM
   ========================================================== */

@media (min-width: 761px) {

  html:has(#gameScreen.ativa),
  body:has(#gameScreen.ativa) {
    height: 100%;
    overflow: hidden;
  }

  #gameScreen.ativa {
    height: 100dvh;
    min-height: 0;

    padding: 8px 18px 10px;

    overflow: hidden;

    align-items: stretch;
  }

  #gameScreen .jogo-container {
    display: flex;
    flex-direction: column;

    width: 100%;
    max-width: 1320px;

    height: 100%;
    min-height: 0;

    margin: 0 auto;
  }

  /* CABEÇALHO */

  #gameScreen .game-top {
    flex: 0 0 auto;

    gap: 10px;

    margin-bottom: 7px;
  }

  #gameScreen .game-top h1 {
    font-size:
      clamp(19px, 2.1vw, 26px);

    line-height: 1.1;
  }

  #gameScreen .game-top p {
    margin-top: 3px;
    font-size: 12px;
  }

  #gameScreen .game-message {
    font-size: 12px;
    line-height: 1.2;
  }

  /* 10 COLUNAS / 6 LINHAS */

  #gameScreen .game-board {
    display: grid;

    grid-template-columns:
      repeat(10, minmax(0, 1fr));

    grid-template-rows:
      repeat(6, minmax(0, 1fr));

    grid-auto-rows:
      minmax(0, 1fr);

    flex: 1 1 0;

    width: 100%;

    max-width: 1260px;

    min-height: 0;

    gap: 5px;

    margin: 0 auto 7px;

    overflow: hidden;
  }

  /* QUADRADOS */

  #gameScreen .memoryCard {
    position: relative;

    width: 100%;
    height: 100%;

    min-width: 0;
    min-height: 0;

    aspect-ratio: auto;

    padding: 0;

    border-radius: 7px;

    font-size:
      clamp(16px, 2vw, 25px);

    overflow: hidden;
  }

  /* FIGURINHAS */

  #gameScreen .memoryCard .carta-foto {
    display: block;

    width: 100%;
    height: 100%;

    min-width: 0;
    min-height: 0;

    object-fit: fill;

    object-position: center;

    image-rendering: auto;

    margin: 0;
    padding: 0;

    border: none;

    pointer-events: none;
  }

  /* BOTÃO VOLTAR */

  #gameScreen .voltar {
    flex: 0 0 auto;

    min-height: 34px;

    padding: 6px 12px;

    margin: 0 auto;
  }
}

/* ==========================================================
   CHROMEBOOK - MODAIS SEM ROLAGEM EXTERNA
   ========================================================== */

@media (min-width: 761px) {

  .modal-overlay {
    height: 100dvh;
    max-height: 100dvh;

    overflow: hidden;

    padding: 8px 14px;

    align-items: center;
    justify-content: center;
  }

  .modal {
    width: min(430px, 100%);

    max-height:
      calc(100dvh - 16px);

    padding: 16px 22px;

    overflow-y: auto;

    border-radius: 18px;
  }

  .modal-icon {
    font-size: 30px;
    margin-bottom: 2px;
  }

  .modal h2 {
    font-size: 22px;
    margin-bottom: 4px;
  }

  .modal-subtitulo {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .modal input {
    height: 40px;

    margin-bottom: 10px;

    font-size: 14px;
  }

  .modal label {
    font-size: 12px;
    margin-bottom: 5px;
  }

  .modal .btn {
    min-height: 40px;

    padding: 9px 12px;

    font-size: 13px;
  }

  .modal .separador {
    margin: 10px 0;
  }

  .modal .mensagem {
    min-height: 16px;

    margin-top: 8px;

    font-size: 12px;
  }
}

/* ==========================================================
   CHROMEBOOK - SALA MULTIPLAYER
   ========================================================== */

@media (min-width: 761px) {

  #roomScreen.ativa {
    height: 100dvh;
    min-height: 0;

    padding: 8px 16px;

    align-items: center;
    justify-content: center;

    overflow: hidden;
  }

  #roomScreen .container {
    width: 100%;
    max-width: 650px;

    max-height: 100%;

    margin: auto;

    overflow-y: auto;
  }

  #roomScreen .card {
    padding: 14px 20px;
    border-radius: 16px;
  }

  #roomScreen .topo {
    margin-bottom: 8px;
  }

  #roomScreen .topo h1 {
    font-size: 23px;
    margin-bottom: 4px;
  }

  #roomScreen .codigo-grande {
    padding: 8px;
    margin: 8px 0;
  }

  #roomScreen .codigo-grande span {
    font-size: 30px;
    letter-spacing: 5px;
  }

  #roomScreen .linha {
    margin: 10px 0;
  }

  #roomScreen .sala-painel h2 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  #roomScreen .players-list {
    gap: 5px;
  }

  #roomScreen .player {
    padding: 7px 12px;
    font-size: 13px;
  }

  #roomScreen .btn {
    min-height: 38px;

    padding: 8px 12px;

    font-size: 13px;
  }

  #roomScreen .sair {
    margin-top: 7px;
  }

  #roomScreen .mensagem {
    min-height: 16px;

    margin-top: 6px;

    font-size: 12px;
  }
}

/* ==========================================================
   TELAS MENORES
   ========================================================== */

@media (max-width: 760px) {

  .capa {
    padding: 25px 14px;
  }

  .logo-capa h1 {
    font-size:
      clamp(36px, 10vw, 60px);

    -webkit-text-stroke:
      1px #173b88;
  }

  .logo-capa p {
    font-size: 15px;
    margin-top: 18px;
  }

  .botoes-capa {
    width: min(430px, 94%);
    gap: 12px;
  }

  .botao-capa {
    height: 64px;

    border-radius: 19px;

    font-size: 21px;
  }

  .recursos-capa {
    margin-top: 25px;
    gap: 9px;
  }

  .modal {
    padding: 26px 16px;
    border-radius: 20px;
  }

  .card {
    padding: 20px 16px;
  }

  .game-top {
    flex-direction: column;
    align-items: stretch;

    gap: 8px;

    margin-bottom: 15px;

    text-align: center;
  }

  .game-message {
    max-width: 100%;

    text-align: center;

    font-size: 13px;
  }

  .game-board {
    grid-template-columns:
      repeat(6, minmax(0, 1fr));

    gap: 7px;
  }

  .memoryCard {
    border-radius: 9px;
  }

  .voltar {
    max-width: 100%;
  }
}

/* ==========================================================
   CORREÇÃO DEFINITIVA DA ENGRENAGEM
   ========================================================== */

/*
  A ENGRENAGEM É CRIADA PELO
  ARQUIVO configuracoes.js.

  ESTE CSS SUBSTITUI A POSIÇÃO ANTIGA
  PARA NÃO COBRIR A PRIMEIRA LINHA.
*/

#luck-config-botao {
  position: fixed !important;

  top: 95px !important;
  right: 16px !important;

  width: 42px !important;
  height: 42px !important;

  padding: 0 !important;
  margin: 0 !important;

  display: flex !important;

  align-items: center !important;
  justify-content: center !important;

  border-radius: 50% !important;

  border:
    1px solid rgba(
      120,
      160,
      255,
      0.65
    ) !important;

  background:
    linear-gradient(
      145deg,
      #263a70,
      #101a39
    ) !important;

  color: #ffffff !important;

  font-size: 23px !important;
  line-height: 1 !important;

  cursor: pointer !important;

  z-index: 9000 !important;

  box-shadow:
    0 4px 14px rgba(
      0,
      0,
      0,
      0.45
    ) !important;
}

/* ==========================================================
   ENGRENAGEM NA FAIXA SUPERIOR DO JOGO
   ========================================================== */

/*
  O CABEÇALHO TEM CERCA DE 55 PIXELS
  DE ALTURA.

  A ENGRENAGEM DEVE FICAR NELE,
  NÃO SOBRE AS CARTAS.
*/

body:has(#gameScreen.ativa)
#luck-config-botao {
  top: 96px !important;
  right: 16px !important;
}

/* ==========================================================
   AJUSTE FINAL REAL DA POSIÇÃO
   ========================================================== */

/*
  POSIÇÃO CORRETA:
  12 PIXELS A PARTIR DO TOPO DA PÁGINA.

  ISSO COLOCA A ENGRENAGEM NA MESMA
  FAIXA DO TÍTULO LUCKTINNMS.

  A REGRA ABAIXO PREVALECE SOBRE
  AS REGRAS ANTERIORES.
*/

body:has(#gameScreen.ativa)
#luck-config-botao {
  top: 12px !important;
  right: 18px !important;
}

/* ESPAÇO PARA A ENGRENAGEM NO CABEÇALHO */

#gameScreen .game-top {
  padding-right: 62px !important;
}

/* GARANTE QUE O TEXTO NÃO INVADA
   A ÁREA DA ENGRENAGEM */

#gameScreen .game-message {
  margin-right: 0;
}

/* ==========================================================
   ENGRENAGEM NAS OUTRAS TELAS
   ========================================================== */

body:not(:has(#gameScreen.ativa))
#luck-config-botao {
  top: 14px !important;
  right: 18px !important;
}

/* ==========================================================
   MENU DE CONFIGURAÇÕES
   ========================================================== */

#luck-config-fundo {
  z-index: 99999 !important;
}

#luck-config-fundo.aberto {
  display: flex !important;
}

#luck-config-painel {
  max-width: 420px;
}

/* ==========================================================
   AJUSTE FINAL DAS FOTOS
   ========================================================== */

#gameScreen .memoryCard {
  padding: 0;
  overflow: hidden;

  touch-action: manipulation;
}

#gameScreen .memoryCard .carta-foto {
  display: block;

  width: 100%;
  height: 100%;

  max-width: 100%;
  max-height: 100%;

  min-width: 0;
  min-height: 0;

  object-fit: fill;

  object-position: center;

  image-rendering: auto;

  margin: 0;
  padding: 0;

  border: none;

  background: #080d20;

  pointer-events: none;
  user-select: none;
}

#gameScreen .memoryCard.aberta,
#gameScreen .memoryCard.encontrada {
  padding: 0;
  overflow: hidden;
}

#gameScreen .memoryCard.encontrada {
  border: 2px solid #32d58b;
}

/* ==========================================================
   FIM DO CSS - LUCKTINNMS
   ========================================================== */
