/* Pirate Island scene */

#scene-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#three-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Loading overlay */
#loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10;
  transition: opacity 0.6s ease;
}

#loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  text-align: center;
}

.loader-content p {
  color: var(--text-muted);
  font-size: 16px;
  margin-top: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Controls hint */
#controls-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 24px;
  z-index: 20;
  display: flex;
  gap: 24px;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 2s ease 4s;
}

#controls-hint p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

#controls-hint p strong {
  color: rgba(255, 255, 255, 0.95);
}

/* Death overlay */
#death-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(180, 30, 30, 0.35);
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#death-overlay.visible {
  opacity: 1;
}

#death-overlay p {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

#death-overlay .sub {
  font-size: 16px;
  font-weight: 400;
  margin-top: 8px;
  opacity: 0.7;
}

@media (max-width: 600px) {
  #controls-hint {
    flex-direction: column;
    gap: 6px;
    padding: 10px 18px;
  }
}
