/* Berry Heist - Game Styles */

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

/* Copyright Overlay */
#copyright-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0a0a12;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#copyright-overlay.hidden {
  display: none;
}

#copyright-content {
  text-align: center;
  color: #ffffff;
  padding: 40px;
  border: 2px solid #2a2a3a;
  border-radius: 12px;
  background-color: rgba(20, 20, 30, 0.95);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

#copyright-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
  color: #ff9944;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.copyright-notice {
  font-size: 16px;
  color: #aaaaaa;
  margin-bottom: 30px;
}

#copyright-accept {
  padding: 12px 40px;
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  background: linear-gradient(135deg, #ff6644, #ff9944);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

#copyright-accept:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(255, 102, 68, 0.4);
}

#copyright-accept:active {
  transform: scale(0.98);
}

#game-container.hidden {
  display: none;
}

body {
  background-color: #0a0a12;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

html {
  height: -webkit-fill-available;
}

#game-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

#game-canvas {
  border: 2px solid #2a2a3a;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  cursor: default;
  /* Scale to fit screen while maintaining aspect ratio */
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
  object-fit: contain;
  /* Prevent touch gestures like pinch-zoom and scroll */
  touch-action: none;
}

#game-canvas:focus {
  outline: none;
}

#click-to-start {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  animation: pulse 1.5s ease-in-out infinite;
}

#click-to-start.hidden {
  display: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Prevent text selection during gameplay */
#game-container {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Mobile-specific styles */
@media (max-width: 850px), (max-height: 650px) {
  #game-canvas {
    border-width: 1px;
    border-radius: 4px;
  }
  
  #copyright-content {
    padding: 20px;
    margin: 10px;
  }
  
  #copyright-content h1 {
    font-size: 32px;
  }
  
  .copyright-notice {
    font-size: 14px;
  }
  
  #copyright-accept {
    padding: 10px 30px;
    font-size: 16px;
  }
}
