
  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    background-image: url("https://img.freepik.com/free-photo/abstract-luxury-gradient-blue-background-smooth-dark-blue-with-black-vignette-studio-banner_1258-54581.jpg?ga=GA1.1.2024449475.1746596705&semt=ais_items_boosted&w=740");
    color: #6b7280;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 1rem 3rem;
  }

  p {
    font-weight: 500;
  }

  main.container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
  }

  #game {
    display: flex;
    gap: 2rem;
    justify-content: center;
  }

  #board {
    position: relative;
    width: 300px; 
    height: 530px;
    background: #6e9ede;
    border-radius: 12px;
    box-shadow: 0 10px 30px white;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(20, 1fr);
    gap: 2px;
    flex-shrink: 0;
  }

  .cell {
    width: 100%;
    height: 100%;
    background: black;
    border-radius: 6px;
    box-shadow: inset 0 0 4px rgba(107,114,128,0.2);
    transition: background-color 0.3s ease;
  }


  .block-1 { background: #ef4444; box-shadow: 0 0 6px #ef4444aa;}
  .block-2 { background: #c74fcb; box-shadow: 0 0 6px #c74fcb;}
  .block-3 { background: #f8c806; box-shadow: 0 0 6px #facc15aa;}
  .block-4 { background: #10de5c; box-shadow: 0 0 6px #22c55eaa;}
  .block-5 { background: #9c3af8; box-shadow: 0 0 6px #a855f7aa;}
  .block-6 { background: #f4268d; box-shadow: 0 0 6px #ec4899aa;}
  .block-7 { background: #3fcfe8; box-shadow: 0 0 6px #06b6d4aa;}

  #sidebar {
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    color: #6e9ede;
    flex-shrink: 0;
  }

  #sidebar h2 {
    margin: 0;
    font-weight: 700;
    font-size: 1.75rem;
    color: white;
    text-align: center;
  }

  #next {
    background-color: #6e9ede;
    border-radius: 12px;
    box-shadow: 0 10px 30px white;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 2px;
    margin: 0 auto;
    width: 120px;
    height: 120px;
    min-width: 120px;
    min-height: 120px;
  }

  .score, .lines {
    font-size: 1.130rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-align: center;
    background: black;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px white;
    color: white;
  }

  #controls {
    background: black;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px white;
    font-size: 0.95rem;
    color: white;
  }

  #controls strong {
    color: white;
    font-weight: 800;
    padding: 3rem;
  }

  button {
    cursor: pointer;
    border-radius: 0.75rem;
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 12px white;
    user-select: none;
    display: inline-block;
  }

  .btn-box{
    display: inline-block;
    border-radius: 0.75rem;
    padding: 0.7rem 1rem;
    background: rgb(9, 229, 229);
    font-size: 16px;
    color: black;
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 12px white;
}
.btn-box:hover{
  background-color: rgb(9, 196, 196);
}

  #pause-button {
    background-color: rgb(240, 19, 252);
    color: white;
  }
  #pause-button:hover {
    background-color: rgb(190, 4, 199);
  }

  #restart-button {
    background-color: #ef4444;
    color: white;
  }
  #restart-button:hover {
    background-color: #dc2626;
  }

  #game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffffee;
    width: 320px;
    height: 140px;
    border-radius: 1rem;
    border: 2px solid #2563eb;
    color: #2563eb;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 20;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    visibility: hidden;
  }
  #game-over.visible {
    visibility: visible;
  }

  /* Responsive styles */
  @media (max-width: 720px) {
    #game {
      flex-direction: column;
      align-items: center;
    }

    #sidebar {
      width: 50%;
      max-width: 320px;
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: center;
      gap: 1rem;
    }

    #next {
      width: 96px;
      height: 96px;
      grid-template-columns: repeat(4, 1fr);
      grid-template-rows: repeat(4, 1fr);
    }

    .score, .lines, #controls {
      flex: 1 1 45%;
      text-align: center;
      font-size: 1rem;
      padding: 0.8rem;
      box-shadow: 0 6px 20px white;
    }

    .btn {
      width: 100%;
      display: flex;
      justify-content: center;
      gap: 1rem;
      margin-top: 0.5rem;
      flex: 1 1 100%;
    }

    button {
      flex: 1 1 calc(50% - 0.5rem);
      font-size: 1rem;
      padding: 0.65rem 0;
    }
  }

  @media (max-width: 400px) {
    #board {
      width: 240px;
      height: 424px;
      grid-template-columns: repeat(10, 1fr);
      grid-template-rows: repeat(20, 1fr);
    }
    #next {
      width: 80px;
      height: 80px;
    }
  }