/* Game specific styles for Brick Breaker */

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.back-btn {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease;
}

.back-btn:hover {
  transform: translateX(-5px);
  color: var(--primary);
}

.game-container {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.game-info {
  background-color: var(--surface);
  padding: 2rem;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.1);
}

.stat-item i {
  font-size: 1.2rem;
  color: var(--primary);
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.controls h3 {
  margin-bottom: 0.5rem;
}

.difficulty-buttons,
.theme-buttons {
  display: flex;
  gap: 0.5rem;
}

.difficulty-btn,
.theme-btn {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: none;
  padding: 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.difficulty-btn.active,
.theme-btn.active {
  background-color: var(--primary);
}

.mobile-controls {
  display: none;
}

.touch-pad {
  width: 100%;
  margin-top: 1rem;
}

#touch-area {
  width: 100%;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.action-btn {
  background-color: var(--accent);
  color: var(--text);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: auto;
}

.action-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(255, 137, 6, 0.4);
}

.game-board-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%;
  background-color: var(--surface);
  border-radius: 15px;
  overflow: hidden;
}

#game-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(22, 22, 26, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.overlay-content {
  text-align: center;
  padding: 2rem;
  background-color: var(--surface);
  border-radius: 15px;
  max-width: 90%;
  width: 400px;
}

.overlay-content h2 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.overlay-content p {
  margin-bottom: 1rem;
}

#game-over, #level-complete {
  display: none;
}

#new-high-score {
  color: var(--secondary);
  font-weight: bold;
  display: none;
}

/* Themes */
.game-board-container.classic #game-canvas {
  background-color: #2c3e50;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.game-board-container.neon #game-canvas {
  background-color: #000;
  box-shadow: inset 0 0 30px rgba(127, 90, 240, 0.5);
  border: 2px solid var(--primary);
}

.game-board-container.retro #game-canvas {
  background-color: #336699;
  background-image: linear-gradient(45deg, #336699 25%, #4477aa 25%, #4477aa 50%, #336699 50%, #336699 75%, #4477aa 75%, #4477aa 100%);
  background-size: 20px 20px;
}

/* Media Queries */
@media (max-width: 768px) {
  .game-container {
    grid-template-columns: 1fr;
  }
  
  .game-info {
    order: 2;
  }
  
  .game-board-container {
    order: 1;
  }
  
  .mobile-controls {
    display: block;
  }
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.action-btn:hover {
  animation: pulse 1.5s infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#game-over.active, #level-complete.active {
  display: flex;
  animation: fadeIn 0.5s ease;
}