*{
  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{
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 25px;
}

.top-section {
  display: flex;
  gap: 20px;
  width: 100%;
}

/* 控制面板样式 */
.control-panel {
  flex: 1;
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e6ed;
}

.panel-title {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  padding-bottom: 5px;
  border-bottom: 2px solid #f0f5ff;
}

.panel-title i {
  margin-right: 10px;
}

.setting-group {
  margin-bottom: 25px;
}

.setting-title {
  font-size: 18px;
  color: #34495e;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-btn {
  padding: 10px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #f9f9f9;
  color: #555;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-grow: 1;
  text-align: center;
}

.option-btn:hover {
  background: #f0f0f0;
}

.option-btn.active {
  background: linear-gradient(135deg, #3498db, #1abc9c);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.custom-rounds {
  display: none;
  margin-top: 15px;
  animation: fadeIn 0.5s;
}

.custom-rounds input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 16px;
  background: #f8fafc;
  transition: all 0.3s;
}

.custom-rounds input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  outline: none;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.btn {
  flex: 1;
  padding: 14px 0;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #ecf0f1, #d5dbdb);
  color: #34495e;
}

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

/* 游戏区域样式 */
.game-area {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.game-display {
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #e0e6ed;
}

.players {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.player {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 45%;
}

.player-icon {
  font-size: 54px;
  margin-bottom: 10px;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.player-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #2c3e50;
  padding: 8px 20px;
  border-radius: 30px;
  background: #f0f7ff;
}

.choices {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.choice-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f8f9fa;
  border: 3px solid #e0e0e0;
  font-size: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.choice-btn:hover {
  transform: scale(1.1);
  border-color: #3498db;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.choice-btn.key {
  position: relative;
}

.choice-btn.key::after {
  content: attr(data-key);
  position: absolute;
  bottom: -35px;
  font-size: 14px;
  background: #2c3e50;
  color: white;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 500;
}

.selection-display {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: #f8f9fa;
  border: 5px solid #ecf0f1;
  font-size: 100px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.05);
}

.selection-display::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, #3498db, transparent);
  animation: rotate 3s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

.selection-display.active::before {
  opacity: 0.3;
}

.countdown {
  font-size: 48px;
  font-weight: 700;
  color: #e74c3c;
  height: 60px;
  margin-top: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vs {
  font-size: 32px;
  font-weight: 700;
  color: #7f8c8d;
  align-self: center;
  margin: 0 20px;
  background: #f0f7ff;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* 统计面板样式 */
.stats-panel {
  background: white;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e6ed;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  text-align: center;
}

.stat-item {
  padding: 15px;
  border-radius: 15px;
  background: #f8f9fa;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #eef2f7;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  margin: 10px 0;
  color: #2c3e50;
}

.stat-label {
  color: #7f8c8d;
  font-size: 16px;
}

.winner-display {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  margin-top: 20px;
  padding: 15px;
  border-radius: 15px;
  background: #f8f9fa;
  color: #27ae60;
  min-height: 62px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* 游戏记录样式 */
.records-panel {
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e6ed;
}

.records-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.records-table th {
  background: #f1f8ff;
  padding: 15px;
  text-align: left;
  color: #2c3e50;
  font-weight: 600;
  border-bottom: 2px solid #e0e6ed;
}

.records-table td {
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.records-table tr:last-child td {
  border-bottom: none;
}

.records-table tr:hover {
  background: #f9fbfd;
}

.result-win {
  color: #27ae60;
  font-weight: 600;
}

.result-lose {
  color: #e74c3c;
  font-weight: 600;
}

.result-draw {
  color: #f39c12;
  font-weight: 600;
}

/* 底部区域样式 */
footer {
  width: 100%;
  margin-top: 25px;
}

.faq-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.7);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #eef2f7;
}

.faq-item h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.faq-item h3 i {
  margin-right: 10px;
  font-size: 20px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f7ff;
  border-radius: 50%;
}

.faq-item p {
  color: #555;
  line-height: 1.7;
}

.notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(44, 62, 80, 0.9);
  color: white;
  padding: 15px 40px;
  border-radius: 30px;
  font-size: 16px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

/* 动画效果 */
@keyframes fadeIn {
  from {
      opacity: 0;
  }

  to {
      opacity: 1;
  }
}

@keyframes pulse {
  0% {
      transform: scale(1);
  }

  50% {
      transform: scale(1.05);
  }

  100% {
      transform: scale(1);
  }
}

@keyframes rotate {
  0% {
      transform: rotate(0deg);
  }

  100% {
      transform: rotate(360deg);
  }
}

@keyframes bounce {

  0%,
  100% {
      transform: translateY(0);
  }

  50% {
      transform: translateY(-15px);
  }
}

@keyframes winnerAnimation {
  0% {
      transform: scale(1);
      box-shadow: 0 0 0 rgba(39, 174, 96, 0.4);
  }

  50% {
      transform: scale(1.025);
      box-shadow: 0 0 20px rgba(39, 174, 96, 0.6);
  }

  100% {
      transform: scale(1);
      box-shadow: 0 0 0 rgba(39, 174, 96, 0.4);
  }
}

.pulse {
  animation: pulse 0.5s ease;
}

.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {

  0%,
  100% {
      transform: translateX(0);
  }

  25% {
      transform: translateX(-10px);
  }

  75% {
      transform: translateX(10px);
  }
}

.winner-animation {
  animation: winnerAnimation 1.5s ease infinite;
}

.bounce {
  animation: bounce 0.5s ease;
}

.selection-animation {
  animation: bounce 0.5s ease;
}
