:root {
  --primary-color: #f4d03f;
  --secondary-color: #e67e22;
  --background-color: #2c3e50;
  --text-color: #ecf0f1;
  --block-color: #e74c3c;
  --shadow-color: rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Comfortaa', cursive;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#app {
  text-align: center;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.menu-screen {
  background: rgba(44, 62, 80, 0.95);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 32px var(--shadow-color);
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
  text-shadow: 2px 2px 4px var(--shadow-color);
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.menu-btn {
  display: block;
  width: 200px;
  margin: 1rem auto;
  padding: 1rem;
  font-size: 1.2rem;
  background-color: var(--primary-color);
  border: none;
  border-radius: 15px;
  color: var(--background-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.menu-btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow-color);
}

.difficulty-btn {
  background-color: var(--secondary-color);
}

.back-btn {
  background-color: #95a5a6;
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.control-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.key {
  background-color: var(--primary-color);
  color: var(--background-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: bold;
}

.game-container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
}

#game-board {
  border: 4px solid var(--primary-color);
  border-radius: 10px;
}

.game-info {
  background: rgba(44, 62, 80, 0.8);
  padding: 1rem;
  border-radius: 15px;
}

.next-piece {
  margin-bottom: 2rem;
}

#next-piece-canvas {
  border: 2px solid var(--primary-color);
  border-radius: 8px;
}

.hidden {
  display: none;
}

@media (max-width: 768px) {
  .game-container {
    flex-direction: column;
    align-items: center;
  }
  
  .game-info {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 1rem;
  }
}