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

body {
  background: linear-gradient(135deg, #1b2838 0%, #101721 100%);
  color: #f0f4f8;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.game-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 820px;
  width: 100%;
}

.header-bar {
  text-align: center;
}

.header-bar h1 {
  font-size: 2rem;
  letter-spacing: 2px;
  color: #64b5f6;
  text-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
}

.header-bar .subtext {
  font-size: 0.95rem;
  color: #90caf9;
  opacity: 0.85;
}

.canvas-container {
  position: relative;
  width: 760px;
  height: 570px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(100, 181, 246, 0.2);
  background-color: #99b9d3;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background-color: #99b9d3;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(16, 23, 33, 0.88);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(100, 181, 246, 0.2);
  border-top-color: #64b5f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  font-size: 1.1rem;
  color: #e3f2fd;
  font-weight: 500;
}

.controls-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px 20px;
}

.panel-section h3 {
  font-size: 1.05rem;
  color: #90caf9;
  margin-bottom: 8px;
}

.panel-section p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #cfd8dc;
  margin-bottom: 4px;
}

.panel-section strong {
  color: #ffffff;
}
