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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-controls {
  display: flex;
  gap: 15px;
  justify-content: center;
}

main {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 20px;
  align-items: start;
}

.game-area {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 牌桌 */
.table-container {
  margin-bottom: 30px;
}

.poker-table {
  position: relative;
  width: 100%;
  height: 500px;
  background: linear-gradient(135deg, #1e5128 0%, #2d6a4f 100%);
  border-radius: 250px;
  border: 8px solid #8b4513;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.seat {
  position: absolute;
  width: 120px;
  height: 80px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.seat-0 { top: 10%; left: 50%; transform: translateX(-50%); }
.seat-1 { top: 20%; left: 15%; }
.seat-2 { top: 50%; left: 5%; transform: translateY(-50%); }
.seat-3 { bottom: 20%; left: 15%; }
.seat-4 { bottom: 10%; left: 50%; transform: translateX(-50%); }
.seat-5 { bottom: 20%; right: 15%; }
.seat-6 { top: 50%; right: 5%; transform: translateY(-50%); }
.seat-7 { top: 20%; right: 15%; }

.seat-placeholder {
  background: rgba(255, 255, 255, 0.2);
  border: 3px dashed rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  color: white;
  font-weight: bold;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.seat:hover .seat-placeholder {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
}

.player-info {
  background: linear-gradient(135deg, #4a90e2, #357abd);
  border: 3px solid #2c5f8d;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  color: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.player-info.current-turn {
  animation: pulse 1.5s infinite;
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.player-name {
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.card-count {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* 中央出牌区 */
.center-area {
  text-align: center;
}

.played-cards {
  min-height: 120px;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.current-player-indicator {
  color: white;
  font-weight: bold;
  margin-top: 10px;
  font-size: 1.1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 手牌区域 */
.my-hand {
  margin-top: 20px;
}

.my-hand h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.cards-container {
  min-height: 150px;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 15px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 15px;
}

/* 扑克牌样式 */
.card {
  width: 70px;
  height: 100px;
  background: white;
  border: 2px solid #333;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  user-select: none;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.card.selected {
  transform: translateY(-20px);
  border-color: #4a90e2;
  box-shadow: 0 5px 20px rgba(74, 144, 226, 0.5);
}

.card.red {
  color: #e74c3c;
}

.card.black {
  color: #2c3e50;
}

.card-rank {
  font-size: 1.5rem;
  font-weight: bold;
}

.card-suit {
  font-size: 1.8rem;
}

.card-small {
  width: 55px;
  height: 80px;
}

.card-small .card-rank {
  font-size: 1.2rem;
}

.card-small .card-suit {
  font-size: 1.4rem;
}

/* 按钮 */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn-success {
  background: #27ae60;
  color: white;
}

.btn-success:hover {
  background: #229954;
}

.btn-warning {
  background: #f39c12;
  color: white;
}

.btn-warning:hover {
  background: #e67e22;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover {
  background: #2980b9;
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
}

.btn-chat {
  background: #9b59b6;
  color: white;
  padding: 10px 20px;
}

.btn-chat:hover {
  background: #8e44ad;
}

.hand-controls {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* 聊天区域 */
.chat-area {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  max-height: 800px;
}

.chat-area h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  background: #f9f9f9;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
}

.chat-message {
  margin-bottom: 12px;
  padding: 10px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-message-header {
  font-weight: bold;
  color: #4a90e2;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.chat-message-text {
  color: #333;
  word-wrap: break-word;
}

.chat-message-time {
  font-size: 0.75rem;
  color: #999;
  margin-top: 5px;
}

.chat-input-container {
  display: flex;
  gap: 10px;
}

#chatInput {
  flex: 1;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

#chatInput:focus {
  outline: none;
  border-color: #9b59b6;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  main {
    grid-template-columns: 1fr;
  }

  .chat-area {
    height: 400px;
  }
}

