/* ===== Sinuca - Estilos ===== */

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

body {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  color: #fff;
  overflow-x: hidden;
}

/* ===== Topbar ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #2d5a27 0%, #1a472a 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-back {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-back:hover {
  background: rgba(255,255,255,0.25);
}

.game-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.stats {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
}

.stats strong {
  color: #fff;
  font-size: 1.1rem;
}

/* ===== Game Container ===== */
.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  gap: 1rem;
}

.game-area {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 2 / 1;
}

#game-canvas {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  cursor: crosshair;
  touch-action: none;
}

/* ===== Power Meter ===== */
.power-meter {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  background: rgba(0,0,0,0.5);
  padding: 8px 12px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.power-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  text-align: center;
}

.power-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: hidden;
}

.power-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #fbbf24, #ef4444);
  border-radius: 4px;
  transition: width 0.1s ease;
}

/* ===== Controls Info ===== */
.controls-info {
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin-top: 2rem;
}

.controls-info p {
  margin: 0.25rem 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-surface-light, #0f3460);
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  user-select: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-primary {
  background: linear-gradient(135deg, #2d5a27 0%, #1a472a 100%);
  box-shadow: 0 0 20px rgba(45, 90, 39, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(45, 90, 39, 0.6);
}

.btn-whatsapp {
  background: #25d366;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2rem;
  max-width: 90vw;
  width: 360px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #fff;
}

.modal p {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.5rem;
}

.modal .btn {
  width: 100%;
  margin: 0.5rem 0;
}

/* ===== Game Info Section ===== */
.game-info {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  color: rgba(255,255,255,0.9);
}

.game-info h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #fff;
}

.game-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  color: #4ade80;
}

.game-info p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.game-info ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.game-info li {
  margin: 0.5rem 0;
  line-height: 1.5;
}

/* ===== Responsivo ===== */
@media (max-width: 640px) {
  .topbar {
    padding: 0.5rem;
  }

  .game-title {
    font-size: 1.1rem;
  }

  .stats {
    font-size: 0.75rem;
    gap: 0.75rem;
  }

  .stats strong {
    font-size: 0.95rem;
  }

  .game-container {
    padding: 0.5rem;
  }

  .power-meter {
    width: 150px;
    bottom: -45px;
  }

  .controls-info {
    font-size: 0.75rem;
    margin-top: 2.5rem;
  }

  .modal {
    padding: 1.5rem;
    width: 90vw;
  }

  .modal h2 {
    font-size: 1.25rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .game-info {
    margin: 1.5rem auto;
    padding: 0 0.75rem;
  }

  .game-info h2 {
    font-size: 1.2rem;
  }

  .game-info h3 {
    font-size: 1rem;
  }
}

@media (max-width: 400px) {
  .stats {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-end;
  }
}

/* ===== Animações ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}
