* {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    padding: 0;
    background: linear-gradient(to right, #a1c4fd, #c2e9fb);
    font-family: "Segoe UI", "Helvetica", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
  }
  
  /* 整体布局：上下排列 */
  #main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 40px 20px;
  }
  
  /* 主游戏卡片 */
  #container {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 420px;
  }
  
  /* 规则卡片 */
  #rules {
    background: white;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    font-size: 15px;
    width: 420px;
    max-width: 90%;
    text-align: left;
  }
  
  #rules h3 {
    margin-top: 0;
    font-size: 18px;
  }
  
  #rules ul {
    padding-left: 20px;
    margin: 10px 0 0;
    line-height: 1.6;
  }
  
  /* 标题样式 */
  .logo-title {
    font-size: 28px;
    margin-bottom: 6px;
  }
  
  .brand-name {
    font-weight: bold;
    letter-spacing: 1px;
  }
  
  .cube {
    color: #4a90e2;
    font-style: italic;
    text-shadow: 1px 1px 1px #ccc;
  }
  
  /* 控制按钮区 */
  #controls {
    margin: 20px 0;
  }
  
  #roomInput {
    padding: 8px;
    font-size: 16px;
    width: 180px;
    margin-bottom: 10px;
  }
  
  button {
    padding: 10px 18px;
    margin: 5px 3px;
    border: none;
    border-radius: 8px;
    background-color: #4a90e2;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
  }
  
  button:hover {
    transform: scale(1.05);
    background-color: #357ab7;
  }
  
  /* 棋盘样式 */
  table {
    border-collapse: collapse;
    margin: 20px auto;
  }
  
  td {
    width: 80px;
    height: 80px;
    border: 3px solid #333;       /* 加粗边框 */
    text-align: center;
    font-size: 40px;              /* 稍微变大 */
    font-weight: bold;            /* 字体加粗 */
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.3s ease;
  }
  
  
  td:hover {
    background: #f5f5f5;
  }
  
  #status {
    font-size: 20px;
    margin: 10px 0;
    font-weight: bold;
    color: #e74c3c;
    letter-spacing: 0.5px;
    animation: pulse 1s infinite;
  }
  
  @keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
  }
  
  
  #restartBtn {
    display: none;
    margin-top: 15px;
    font-size: 16px;
  }
  

  /* ✅ 即将消失的落子样式 */
.fading {
  opacity: 0.3;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0.95);
}


#pauseBtn {
  display: none; /* 初始隐藏，JS 控制显示 */
  margin-top: 10px;
  padding: 6px 14px;
  font-size: 14px;
  background-color: #f39c12;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#pauseBtn:hover {
  background-color: #e67e22;
}

#players, #pauseBtn {
  text-align: center;
}
