/* Reset and basic styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
}

.game-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
}

.game-header h1 {
  font-size: 3rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: 10px;
  font-family: "Arial", sans-serif;
  font-weight: bold;
  letter-spacing: 3px;
  color: #ffffff;
  text-align: center;
}

/* Block colors from the game */
.block-red {
  color: #ff6b6b;
}
.block-yellow {
  color: #f1c40f;
}
.block-green {
  color: #27ae60;
}
.block-blue {
  color: #3498db;
}
.block-purple {
  color: #9b59b6;
}
.block-orange {
  color: #e67e22;
}
.block-cyan {
  color: #1abc9c;
}

@keyframes tetrisGlow {
  0% {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  }
  100% {
    text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.5);
  }
}

/* Main Content Layout */
.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

.info-section {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.game-area {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.game-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 180px;
}

/* Info Section Styles */
.game-description {
  background: rgba(255, 255, 255, 0.15);
  padding: 25px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-description h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #ffd93d;
  text-align: center;
}

.game-description p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

.game-features {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-features h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #4ecdc4;
  text-align: center;
}

.game-features ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-features li {
  font-size: 1rem;
  line-height: 1.4;
  padding: 8px 0;
}

.controls-info {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.controls-info h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: #4ecdc4;
  text-align: center;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.control-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.key {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ffd93d;
  margin-bottom: 8px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

.action {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Game Section Styles */
.game-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  padding: 12px 15px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ffd93d;
}

.next-piece-panel {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.next-piece-panel h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: #4ecdc4;
}

.game-header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.game-board {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  padding: 20px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 20px;
}

#gameCanvas {
  display: block;
  border: 2px solid #fff;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#nextCanvas {
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

.game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  border: 2px solid #ff6b6b;
  backdrop-filter: blur(10px);
}

.game-over h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #ff6b6b;
}

.game-over p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

#restartBtn {
  background: linear-gradient(45deg, #ff6b6b, #ffd93d);
  color: #fff;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

#restartBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.hidden {
  display: none;
}

/* SEO Content Styles */
.game-description {
  max-width: 600px;
  margin: 20px auto;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-description p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

/* Footer Styles */
.game-footer {
  background: rgba(0, 0, 0, 0.3);
  margin-top: 40px;
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #ffd93d;
  text-align: center;
}

.footer-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 15px;
  text-align: center;
}

.footer-keywords {
  margin-top: 30px;
  text-align: center;
  opacity: 0.7;
}

.footer-keywords p {
  font-size: 0.9rem;
  margin: 0;
}

.footer-copyright {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  opacity: 0.8;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
}

/* Game Features Section - Full Width */
.game-features-section {
  margin-bottom: 40px;
}

.game-features-section .game-features {
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-features-section .game-features h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #4ecdc4;
  text-align: center;
}

.game-features-section .game-features ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  margin: 0;
}

.game-features-section .game-features li {
  font-size: 1rem;
  line-height: 1.4;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

/* Responsive design */
@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .game-area {
    order: -1;
    justify-content: center;
  }

  .game-sidebar {
    min-width: 160px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .game-header h1 {
    font-size: 2rem;
    letter-spacing: 2px;
  }

  .game-area {
    flex-direction: column;
    align-items: center;
  }

  .game-sidebar {
    width: 100%;
    max-width: 300px;
    min-width: auto;
    order: -1;
    margin-bottom: 20px;
    flex-direction: column;
  }

  .game-stats {
    flex-direction: row;
    gap: 10px;
    margin-bottom: 15px;
    order: 1;
  }

  .next-piece-panel {
    padding: 12px;
    margin-bottom: 0;
    order: 2;
  }

  .stat-item {
    flex: 1;
    flex-direction: column;
    text-align: center;
    padding: 10px;
  }

  .stat-label {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }

  .stat-value {
    font-size: 1.1rem;
  }

  .next-piece-panel h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  #nextCanvas {
    width: 100px;
    height: 100px;
  }

  #gameCanvas {
    width: 250px;
    height: 500px;
  }

  .controls-info {
    padding: 12px;
  }

  .controls-info h3 {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .controls-grid {
    gap: 8px;
  }

  .control-item {
    padding: 6px 10px;
  }

  .key {
    font-size: 0.8rem;
    padding: 3px 6px;
  }

  .action {
    font-size: 0.7rem;
  }

  .game-description,
  .controls-info {
    padding: 20px;
  }

  .game-features-section .game-features {
    padding: 20px;
  }

  .game-features-section .game-features h3 {
    font-size: 1.4rem;
  }

  .game-features-section .game-features ul {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .game-features-section .game-features li {
    padding: 10px;
    font-size: 0.9rem;
  }
}
