:root {
  --primary-color: #6c5ce7;
  --secondary-color: #a29bfe;
  --bg-color: #2d3436;
  --text-color: #dfe6e9;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
}

/* ==================== Page Layout with Sidebars ==================== */
.page-wrapper {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 20px;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.sidebar {
  min-height: 100vh;
}

.sidebar-left,
.sidebar-right {
  display: flex;
  align-items: flex-start;
  padding-top: 80px;
}

.sticky-ad {
  position: sticky;
  top: 20px;
  width: 160px;
  min-height: 600px;
}

.main-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

/* Responsive: Hide sidebars on tablets and mobile */
@media (max-width: 1024px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .sidebar {
    display: none;
  }
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#game-container {
  position: relative;
  background-color: var(--bg-color);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  gap: 20px;
}

canvas {
  border: 4px solid #485460;
  background-color: #000;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

#stats-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 150px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 15px;
  text-align: center;
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
  display: block;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
}

#controls-hint {
  font-size: 0.8rem;
  margin-top: auto;
  opacity: 0.8;
  line-height: 1.6;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  z-index: 10;
}

button {
  padding: 12px 24px;
  font-size: 1.2rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.2s;
}

button:hover {
  background-color: #5b4bc4;
  transform: scale(1.05);
}

h1 {
  margin-top: 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
