/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html, body {
    width: 100%;
    height: 100%;
    background-color: #0a0f1c;
    font-family: 'Segoe UI', sans-serif;
    color: white;
    overflow: hidden;
  }
  
  /* Container geral */
  .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    height: 100vh;
    padding: 1rem 0;
  }
  
  /* Título */
  h1 {
    font-size: 1.8rem;
    color: #00ffcc;
    margin-bottom: 1rem;
    text-align: center;
  }
  
  /* Controles */
  .controls {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .controls button {
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background-color: #00ffcc;
    color: #0a0f1c;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .controls button:hover {
    background-color: #00d4a6;
  }
  
  .status {
    color: #00ffcc;
    font-size: 1rem;
    font-weight: bold;
  }
  
  /* Tabuleiro */
  .game-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    width: 95vw;
    max-width: 1100px;
    height: calc(100vh - 180px);
    padding: 0;
    justify-items: center;
    align-items: center;
  }
  
  /* Cartas */
  .card {
    width: 85%;
    aspect-ratio: 5 / 7;
    perspective: 1000px;
    position: relative;
  }
  
  /* Faces da carta */
  .card .face {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Frente */
  .card .front {
    background-color: white;
    transform: rotateY(180deg);
  }
  
  .card .front img {
    width: 80%;
  }
  
  /* Verso */
  .card .back {
    background-color: #1e1e2f;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0, 255, 204, 0.3);
  }
  
  /* Flip Animation */
  .card.revelada .front {
    transform: rotateY(0deg);
  }
  
  .card.revelada .back {
    transform: rotateY(180deg);
  }
  
  /* Botão genérico */
  button {
    background-color: #00ffcc;
    color: #001f2e;
    font-weight: bold;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  
  button:hover {
    transform: scale(1.05);
  }
  
  /* Tela de Vitória */
  .victory {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 28, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #00ffcc;
    text-align: center;
    z-index: 999;
    animation: fadeIn 0.6s ease forwards;
  }
  
  .victory h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .victory p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
  }
  
  .victory button {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
  }
  
  .hidden {
    display: none;
  }
  
  /* Animação suave */
  @keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
  }

  .victory {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #001f2e;
    color: #00ffcc;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    z-index: 999;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.4);
    animation: fadeInScale 0.6s ease forwards;
  }
  
  .victory h2 {
    margin-bottom: 0.5rem;
  }
  
  .victory button {
    margin-top: 1rem;
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
  }
  
  .hidden {
    display: none;
  }
  
  @keyframes fadeInScale {
    0% {
      opacity: 0;
      transform: scale(0.8) translate(-50%, -50%);
    }
    100% {
      opacity: 1;
      transform: scale(1) translate(-50%, -50%);
    }
  }