/* ==========================================================================
   FLAPPY BIRD - RESPONSIVE FULLSCREEN WEB STYLES
   ========================================================================== */

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: #0d131f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  position: fixed;
}

#app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1b2838 0%, #0a0e17 100%);
  overflow: hidden;
}

#game-canvas {
  display: block;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  max-width: 100%;
  max-height: 100%;
}

/* Floating top bar controls */
#top-bar {
  position: absolute;
  top: max(12px, var(--safe-top));
  right: max(12px, var(--safe-right));
  display: flex;
  gap: 10px;
  z-index: 50;
  pointer-events: auto;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.icon-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px) scale(1.05);
}

.icon-btn:active {
  transform: translateY(0) scale(0.95);
}

/* Orientation notification for desktop landscape */
#landscape-prompt {
  display: none;
  position: absolute;
  bottom: max(16px, var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  color: rgba(255, 255, 255, 0.85);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  pointer-events: none;
  backdrop-filter: blur(4px);
  z-index: 40;
}

/* Loading overlay */
#loading-overlay {
  position: absolute;
  inset: 0;
  background: #0d131f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  color: white;
  transition: opacity 0.4s ease;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffd700;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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