* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft Yahei", sans-serif;
}

body {
  background-color: #f5f5f5;
  padding: 20px;
}

.container, .game-container, .admin-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* 登录/注册标签页 */
.tabs {
  display: flex;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: #eee;
  cursor: pointer;
  font-size: 16px;
}

.tab-btn.active {
  background: #4CAF50;
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 表单样式 */
.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input, select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.btn {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.btn:hover {
  background: #45a049;
}

.msg {
  margin-top: 10px;
  padding: 10px;
  border-radius: 4px;
}

.msg.success {
  background: #dff0d8;
  color: #3c763d;
}

.msg.error {
  background: #f2dede;
  color: #a94442;
}

/* 游戏大厅样式 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.logout-btn {
  background: #f44336;
}

.logout-btn:hover {
  background: #d32f2f;
}

.lobby {
  margin-bottom: 30px;
}

.online-users, .invites {
  margin: 15px 0;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 4px;
}

ul {
  list-style: none;
  margin-top: 10px;
}

li {
  padding: 8px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
}

/* 棋盘样式 */
.chessboard {
  width: 450px;
  height: 450px;
  margin: 20px auto;
  background: #f0d9b5;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(15, 1fr);
  position: relative;
}

.chessboard::before, .chessboard::after {
  content: "";
  position: absolute;
  background: #000;
}

.chessboard::before {
  width: 100%;
  height: 1px;
  top: 0;
  left: 0;
}

.chessboard::after {
  width: 1px;
  height: 100%;
  top: 0;
  left: 0;
}

.chess-cell {
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chess-cell:last-child {
  border-right: none;
}

.chess-cell:nth-child(15n) {
  border-right: none;
}

.chess-cell:nth-last-child(-n+15) {
  border-bottom: none;
}

.chess-piece {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
}

.black {
  background: #000;
}

.white {
  background: #fff;
  border: 1px solid #000;
}

/* 管理员后台样式 */
.admin-panel {
  margin-bottom: 30px;
}

.admin-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.admin-section:last-child {
  border-bottom: none;
}