*{
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  max-width: 1560px;
  min-width: 1240px;
  width: 100%;
  margin: 20px auto;
  color: #333;
}

.container * {
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 25px;
}

header h1 {
  font-size: 2.1rem;
  margin-bottom: 10px;
  color: #2c3e50;
}

header p {
  font-size: 1.1rem;
  color: #7f8c8d;
  max-width: 90%;
  margin: 0 auto;
  line-height: 1.6;
}

.main-content{
  display: flex;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
}

.game-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ddd;
}

.game-board-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 15px;
}

.game-board {
  position: relative;
  background: #0d1b2a;
  border-radius: 8px;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.6), 0 8px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

canvas {
  display: block;
}

.game-controls-bottom {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 15px;
}

.game-control-btn {
  padding: 14px 40px;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.start-btn {
  background: linear-gradient(135deg, #00b09b, #96c93d);
  color: white;
}

.pause-btn {
  background: linear-gradient(135deg, #676767, #141414);
  color: white;
}

.end-btn {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  color: white;
}

.game-control-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.game-control-btn:active {
  transform: translateY(1px);
}

.game-control-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.game-info {
  width: 550px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
}

.info-section {
  margin-bottom: 15px;
}

.info-section h2 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #2d3748;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-item {
  background: white;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.stat-item .value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #2d3748;
  letter-spacing: 1px;
  line-height: 1;
}

.stat-item .label {
  font-size: 0.85rem;
  color: #718096;
  margin-top: 10px;
  line-height: 1;
}

.preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #eee;
  border-radius: 12px;
}

.preview-canvas {
  background: #0d1b2a;
  border-radius: 8px;
  margin: 10px 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.control-btn {
  background: #4a5568;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
  background: #2d3748;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.control-btn:active {
  transform: translateY(1px);
}

.control-btn span {
  font-size: 1.3rem;
  margin-right: 12px;
}

.game-status {
  margin: 10px 0;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #e53e3e;
  min-height: 30px;
  padding: 10px;
  background: #fff5f5;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.setting-options {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}

.setting-option {
  flex: 1;
  padding: 12px;
  text-align: center;
  background: #edf2f7;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.setting-option.active {
  background: #4299e1;
  color: white;
}

.level-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.level-selector input {
  flex: 1;
  padding: 10px;
  border: 2px solid #cbd5e0;
  border-radius: 8px;
  font-size: 1.1rem;
  text-align: center;
}

.setting-option.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 0.5s ease-in-out;
}

/* 方块颜色样式 */
.cell-0 {
  background: #0d1b2a;
}

/* 空白 */
.cell-I {
  background: #00f0f0;
}

/* I方块 */
.cell-J {
  background: #0000f0;
}

/* J方块 */
.cell-L {
  background: #f0a000;
}

/* L方块 */
.cell-O {
  background: #f0f000;
}

/* O方块 */
.cell-S {
  background: #00f000;
}

/* S方块 */
.cell-T {
  background: #a000f0;
}

/* T方块 */
.cell-Z {
  background: #f00000;
}

/* Z方块 */
.cell-monochrome {
  background: #718096;
}


.game-footer{
  background: #fff;
  display: flex;
  gap: 20px;
  width: 100%;
  padding: 20px;
  margin: 25px auto;
  border-radius: 12px;
}

.game-features,.game-instructions {
  flex: 1;
}

.game-footer h2{
  font-size: 1.3rem;
}

.features-container {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 15px;
}
.feature-item {
  padding: 15px;
  background: white;
  border-radius: 6px;
  border: 1px solid #eee;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.feature-item p{
  opacity: 0.85;
  margin-top: 5px;
}

.feature-item h3 {
  margin-top: 0;
  color: #2d3748;
  font-size: 1.05rem;
}

.game-instructions ul {
  padding-left: 20px;
  padding-top: 10px;
  opacity: 0.85;
}

.game-instructions ul li{
  padding-top: 10px;
}
