/* Reset e base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #fff9d6 0%, #f9f1a5 100%);
  color: #663300;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #f9d71c;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

header h1 {
  font-weight: 700;
  font-size: 1.3rem;
  color: #663300;
  text-shadow: 1px 1px 1px #d1b06d;
}

#btnDica {
  background: #663300;
  color: #f9d71c;
  border: none;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 1px 1px 4px #a97d0d;
}

#btnDica:hover,
#btnDica:focus {
  background: #a97d0d;
  outline: none;
  box-shadow: 0 0 12px #f9d71c;
}

main {
  position: absolute;
  top: 58px;
  left: 0;
  width: 100%;
  height: calc(100% - 58px - 32px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  overflow: hidden;
  background: radial-gradient(circle at center, #fffbe6 40%, #d1b06d 100%);
}

#gameCanvas {
  width: 100%;
  max-width: 700px;
  height: 100%;
  max-height: 600px;
  border-radius: 20px;
  box-shadow:
    inset 0 0 30px #fff8a0,
    0 4px 15px rgba(0,0,0,0.15);
  background: transparent;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

#gameCanvas:active {
  cursor: grabbing;
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 32px;
  background: #f9d71c;
  color: #663300;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  line-height: 32px;
  box-shadow: 0 -3px 8px rgba(0,0,0,0.15);
}

/* Responsivo */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 8px;
    height: auto;
    padding: 10px 15px;
  }
  header h1 {
    font-size: 1.1rem;
  }
  #btnDica {
    font-size: 0.9rem;
    padding: 6px 12px;
  }
  main {
    top: 70px;
    height: calc(100% - 70px - 32px);
    padding: 5px;
  }
  #gameCanvas {
    max-width: 100%;
    height: 100%;
    border-radius: 15px;
  }
}

/* Balão fala (canvas desenhado, mas aqui o cursor normal) */
