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

body {
  background: #111;
  color: #eee;
  font-family: "Segoe UI", sans-serif;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* mulai dari atas */
  padding-top: 60px;       /* geser seluruh layout ke bawah dari atas layar */
  overflow: hidden;        /* hilangkan scroll */
}

/* Container utama: canvas kiri + HUD kanan */
.desktop-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;       /* jarak antara board & panel */
  /* margin-top negatif dihapus, padding-top body sudah cukup */
}

/* Game board scaling */
.game-board {
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;        /* biar tidak penuh 100vh lagi */
  max-height: 90vh;    /* tetap responsive */
  gap: 2rem;
  padding: 1rem;
  box-sizing: border-box;
}

/* Canvas board */
canvas#board {
  /* aspect ratio 1:2 → proporsi Tetris asli */
  width: 70vh;          /* ukuran dikurangi supaya muat vertical */
  height: 70vh;
  max-height: 75vh;
  max-width: calc(75vh / 2);
  border: 2px solid #555;
  background: #111;
  display: block;
}

/* Panel HUD */
.hud-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 160px;
  align-items: flex-start; /* rapi di kiri */
}

.next-piece, .stat, .help {
	margin-bottom: 10px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.title-sm {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
  text-transform: uppercase;
  color: #aaa;
}

.next-box {
  width: 100px;   /* dulu 60px, sekarang diperbesar */
  height: 100px;  /* dulu 60px, sekarang diperbesar */
  max-width: 100%;
  max-height: 100%;
  background: #000;
  border: 1px solid #555;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Stats */
.stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
	padding-top: 10px;
}

.stat-value {
  font-weight: bold;
  color: #0f0;
}

/* Help text */
.help ul {
  list-style: none;
  font-size: 13px;
  line-height: 1.4;
  color: #ccc;
}
