/* CSS variables definition - Dark theme (default) */
:root {
  /* Basic colors */
  --bg-primary: linear-gradient(135deg, #1a1a2e, #0e4bf3);
  --text-primary: #e0e0e0;
  --text-secondary: #90caf9;
  --text-muted: #64b5f6;

  /* Card and elements */
  --card-bg: #1e1d2bd8;
  --card-border: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 8px 16px rgba(45, 24, 74, 0.322);
  --card-hover: #233446;

  /* Button and interactive elements */
  --btn-bg: #2c3e50;
  --btn-hover: #3498db;
  --btn-text: #fafafa;
  --btn-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

  /* Accent colors */
  --accent-blue: #3498db;
  --accent-red: #e74c3c;
  --accent-green: #2ecc71;
  --accent-yellow: #f1c40f;

  /* Special elements */
  --vs-badge-bg: linear-gradient(135deg, #ff3d00, #2979ff);
  --vs-badge-text: #fff;
  --vs-badge-shadow: 0 0 30px rgba(255, 255, 255, 0.3);

  /* Team colors */
  --team-left-bg: linear-gradient(135deg, #2980b9, #3498db);
  --team-right-bg: linear-gradient(135deg, #c0392b, #e74c3c);

  /* Background elements */
  --bg-element-1: radial-gradient(circle, rgba(144, 202, 249, 0.2), rgba(100, 181, 246, 0.1));
  --bg-element-2: radial-gradient(circle, rgba(129, 212, 250, 0.2), rgba(3, 169, 244, 0.1));
  --diagonal-1: linear-gradient(90deg, transparent, rgba(33, 150, 243, 0.3), rgba(33, 150, 243, 0.3), transparent);
  --diagonal-2: linear-gradient(90deg, transparent, rgba(244, 67, 54, 0.3), rgba(244, 67, 54, 0.3), transparent);

  /* Other */
  --input-bg: rgba(255, 255, 255, 0.1);
  --input-border: rgba(255, 255, 255, 0.2);
  --table-header-bg: #233446;
  --separator-color: rgba(255, 255, 255, 0.5);
}

/* 初始状态下的柔和配色 */
body {
  background: var(--bg-primary);
  font-family: "Noto Sans SC", sans-serif;
  margin: 0px;
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden;
  transition: all 0.8s ease-in-out;
}

/* Dynamic background for debate sides */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: 50%;
  transition: opacity 0.5s ease;
  z-index: -1;
}

body::before {
  left: 0;
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.9) 0%, rgba(139, 0, 0, 0.5) 100%);
  animation: pulsateRed 4s infinite alternate;
  opacity: 0.1;
}

body::after {
  right: 0;
  background: linear-gradient(225deg, rgba(0, 0, 255, 0.9) 0%, rgba(0, 0, 139, 0.5) 100%);
  animation: pulsateBlue 4s infinite alternate;
  opacity: 0.1;
}

/* Active debate side emphasis */
body[data-active-side="left"]::before {
  opacity: 1;
  background: linear-gradient(135deg, #ff0000 0%, #b71c1c 100%);
  box-shadow: 0 0 50px rgba(255, 0, 0, 0.4);
  animation: intensifyRed 2s infinite alternate;
  transition: all 0.4s ease;
}

body[data-active-side="left"]::after {
  opacity: 0.1;
  transition: all 0.4s ease;
}

body[data-active-side="right"]::before {
  opacity: 0.1;
  transition: all 0.4s ease;
}

body[data-active-side="right"]::after {
  opacity: 1;
  background: linear-gradient(225deg, #0000ff 0%, #1a237e 100%);
  box-shadow: 0 0 50px rgba(0, 0, 255, 0.4);
  animation: intensifyBlue 2s infinite alternate;
  transition: all 0.4s ease;
}

/* Curved separator line */
.background-separator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -2;
  pointer-events: none;
}

.background-separator::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: linear-gradient(to bottom, transparent, var(--separator-color) 50%, transparent);
  box-shadow: 0 0 15px var(--separator-color);
  transform: translateX(-50%);
  animation: separatorPulse 3s infinite alternate;
}

/* 添加动态背景元素 */
.bg-element {
  position: fixed;
  z-index: -2;
  opacity: 0.05;
}

.bg-circle-1 {
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: var(--bg-element-1);
  top: -200px;
  left: -200px;
  animation: pulse-soft 15s infinite alternate;
  transition: all 0.8s ease-in-out;
}

.bg-circle-2 {
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: var(--bg-element-2);
  bottom: -200px;
  right: -200px;
  animation: pulse-soft 15s infinite alternate-reverse;
  transition: all 0.8s ease-in-out;
}

/* 温和的脉动动画 */
@keyframes pulse-soft {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 0.15;
  }
  100% {
    transform: scale(1.2) translate(30px, 30px);
    opacity: 0.25;
  }
}

/* 竞争状态的动画 */
@keyframes pulse-blue {
  0% {
    transform: scale(1);
    opacity: 0.2;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.08;
  }
  100% {
    transform: scale(1.3);
    opacity: 0.4;
  }
}

@keyframes pulse-red {
  0% {
    transform: scale(1);
    opacity: 0.2;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.08;
  }
  100% {
    transform: scale(1.3);
    opacity: 0.4;
  }
}

/* 添加对角线装饰 */
.diagonal-decoration {
  position: fixed;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.diagonal-1 {
  position: absolute;
  width: 200%;
  height: 2px;
  background: var(--diagonal-1);
  top: 30%;
  transform: rotate(-45deg);
  animation: moveDiagonal 20s linear infinite;
}

.diagonal-2 {
  position: absolute;
  width: 200%;
  height: 2px;
  background: var(--diagonal-2);
  bottom: 30%;
  transform: rotate(45deg);
  animation: moveDiagonal 20s linear infinite reverse;
}

.title {
  float: left;
  color: var(--text-primary);
  font-size: 3rem;
  padding: 40px;
  padding-bottom: 0px;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0, 140, 255, 0.3);
}

.key-hint {
  padding-top: 50px;
  padding-right: 40px;
  padding-bottom: 0px;
  float: right;
  color: var(--text-muted);
  font-size: 1rem;
  background-color: rgba(0, 0, 0, 0.1);
  padding: 10px 20px;
  border-radius: 8px;
  margin-top: 40px;
  margin-right: 40px;
  box-shadow: var(--btn-shadow);
}

.content {
  justify-content: space-between;
  display: flex;
  padding: 40px;
  width: calc(100% - 80px);
  height: 100%;
}

.card {
  border-radius: 20px;
  background-color: var(--card-bg);
  padding: 20px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  transition: all 0.3s ease;
  /* #min-width: 50%; */
}

.card-title {
  text-align: center;
  color: var(--text-primary);
  font-size: 2.2rem;
  margin-bottom: 20px;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(0, 140, 255, 0.2);
}

.card-subtitle {
  max-width: 95%;
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 15px;
  margin-bottom: 10px;
  margin-left: 36px;
  margin-right: 36px;
  font-weight: 500;
  border-bottom: 1px solid rgba(144, 202, 249, 0.3);
  padding-bottom: 5px;
  /* 超出部分 */
  overflow-y: hidden;
}

.card-selection {
  display: flex;
  background-color: var(--card-bg);
  align-items: center;
  justify-content: space-between;
  margin-left: -20px;
  margin-right: -20px;
  padding: 15px;
  padding-left: 56px;
  padding-right: 56px;
  transition: background-color 0.3s ease-out;
  border-left: 3px solid transparent;
}

.selection-text {
  color: var(--text-primary);
  font-size: 1.3rem;
}

.selection-btn > button,
input,
select {
  border-radius: 8px;
  padding: 12px 24px;
  background-color: var(--btn-bg);
  border: none;
  color: var(--btn-text);
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
}

.card-selection:hover {
  background-color: var(--card-hover);
  border-left: 3px solid var(--accent-blue);
}

.selection-btn > button:hover,
input:hover,
input:focus,
select:hover {
  background-color: var(--btn-hover);
  color: #fff;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.material-symbols-outlined {
  margin-right: 10px;
  display: inline-block;
  color: var(--text-muted);
}

/* Fix action-container layout issues by replacing it with action-wrapper */
.action-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px auto;
  padding: 20px;
  width: 100%;
}

.action {
  position: relative;
  text-align: center;
  width: 100%;
  max-width: 800px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.action > .material-symbols-outlined {
  font-size: 55px;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.action .selection-btn {
  text-align: center;
  padding-left: 0;
  margin-top: 20px;
}

.action .selection-btn > button {
  font-size: 1.8rem; /* 扩大按钮样式 */
  padding: 25px 60px; /* 扩大按钮样式 */
  min-width: 300px; /* 扩大按钮样式 */
  background-color: var(--accent-blue);
  color: #fff;
  transition: all 0.3s ease;
  border-radius: 12px; /* 扩大按钮样式 */
  text-transform: uppercase; /* 扩大按钮样式 */
  letter-spacing: 2px; /* 扩大按钮样式 */
}

.action .selection-btn > button:hover {
  background-color: var(--btn-hover);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3); /* 扩大按钮样式 */
}

.error-text {
  text-align: center;
  padding-top: 20px;
  font-size: 1rem;
  color: var(--accent-red);
}

/* Timer styling */
.counter > div {
  font-family: "Roboto Mono", monospace !important;
  text-align: center;
  width: 100%;
  font-size: 6rem;
  color: var(--text-primary);
  font-weight: bold;
  padding: 20px 0;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  transition: color 0.3s ease, text-shadow 0.3s ease;
  animation: timerPulse 2s infinite alternate;
}

/* Timer color states based on new rules */
.timer-normal {
  color: var(--text-primary) !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2) !important;
  transition: all 0.3s ease;
}

.timer-warning {
  color: var(--accent-yellow) !important; /* Yellow - 30 seconds or less */
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.7) !important;
  animation: warningPulse 1s infinite alternate;
}

.timer-danger {
  color: var(--accent-red) !important; /* Red - 10 seconds or less */
  text-shadow: 0 0 15px rgba(231, 76, 60, 0.5) !important;
}

.timer-critical {
  color: #ff3d00 !important; /* Blinking red - 5 seconds or less */
  text-shadow: 0 0 25px rgba(255, 61, 0, 0.8) !important;
  animation: criticalPulse 0.5s infinite alternate;
}

.timer-ended {
  color: #ff0000 !important; /* Continuous blinking red - 0 seconds */
  text-shadow: 0 0 30px rgba(255, 0, 0, 0.9) !important;
  animation: endedPulse 0.3s infinite alternate;
}

/* Timer color states */
.timer-normal {
  color: var(--text-primary) !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2) !important;
  transition: all 0.3s ease;
}

.timer-warning {
  color: var(--accent-yellow) !important; /* 黄色 - 30秒或以下 */
  text-shadow: 0 0 15px rgba(241, 196, 15, 0.5) !important;
  transition: all 0.3s ease;
}

.timer-sixty {
  color: var(--accent-red) !important; /* 红色 - 1分钟闪烁 */
  text-shadow: 0 0 15px rgba(231, 76, 60, 0.5) !important;
  animation: flash-once 1s ease-in-out;
}

.timer-critical {
  color: var(--accent-red) !important; /* 红色 - 5秒或以下 */
  text-shadow: 0 0 20px rgba(231, 76, 60, 0.7) !important;
  animation: timer-blink 1s infinite;
}

.timer-ended {
  color: var(--accent-red) !important;
  text-shadow: 0 0 25px rgba(231, 76, 60, 0.9) !important;
  animation: timer-blink 0.5s infinite;
}

/* 添加1分钟闪烁动画 */
@keyframes flash-once {
  0%,
  100% {
    color: var(--text-primary) !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2) !important;
  }
  50% {
    color: var(--accent-red) !important;
    text-shadow: 0 0 15px rgba(231, 76, 60, 0.5) !important;
  }
}

@keyframes timer-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

@keyframes flash-red {
  0%,
  100% {
    color: var(--text-primary) !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2) !important;
  }
  50% {
    color: var(--accent-red) !important;
    text-shadow: 0 0 15px rgba(231, 76, 60, 0.5) !important;
  }
}

@keyframes intensifyRed {
  0% {
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.3);
  }
  100% {
    box-shadow: 0 0 60px rgba(255, 0, 0, 0.6);
  }
}

@keyframes intensifyBlue {
  0% {
    box-shadow: 0 0 30px rgba(0, 0, 255, 0.3);
  }
  100% {
    box-shadow: 0 0 60px rgba(0, 0, 255, 0.6);
  }
}

@keyframes separatorPulse {
  0% {
    opacity: 0.3;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }
  100% {
    opacity: 0.8;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  }
}

@keyframes vsPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.5);
  }
}

@keyframes warningPulse {
  0% {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  }
  100% {
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
  }
}

@keyframes criticalPulse {
  0% {
    text-shadow: 0 0 15px rgba(255, 61, 0, 0.6);
  }
  100% {
    text-shadow: 0 0 25px rgba(255, 61, 0, 0.8);
  }
}

@keyframes endedPulse {
  0% {
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.7);
  }
  100% {
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.9);
  }
}

.debate-card {
  opacity: 1.0;
  background-color: var(--card-bg);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

/* Debate card active state enhancements */
.debate-card[status="on"] {
  box-shadow: 0 0 40px rgba(52, 152, 219, 0.7);
  border: 1px solid rgba(52, 152, 219, 0.7);
  transform: scale(1.02);
  animation: card-pulse 2s infinite;
  z-index: 1;
}

@keyframes card-pulse {
  0% {
    box-shadow: 0 0 30px rgba(52, 152, 219, 0.5);
    transform: scale(1.02);
  }
  50% {
    box-shadow: 0 0 50px rgba(52, 152, 219, 0.8);
    transform: scale(1.03);
  }
  100% {
    box-shadow: 0 0 30px rgba(52, 152, 219, 0.5);
    transform: scale(1.02);
  }
}

.debate-card[status="off"] {
  background-color: rgba(26, 43, 60, 0.3);
  opacity: 0.3;
  filter: grayscale(80%) brightness(0.7);
  transform: scale(0.98);
  transition: all 0.4s ease;
}

.card-content {
  color: var(--text-primary);
}

/* Enhanced team indicators with arrows */
.team-indicator {
  position: absolute;
  top: 20px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.team-indicator::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.team-left {
  left: 20px;
  background: var(--team-left-bg);
}

.team-left::after {
  right: -10px;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent #3498db;
}

.team-right {
  right: 20px;
  background: var(--team-right-bg);
}

.team-right::after {
  left: -10px;
  border-width: 10px 10px 10px 0;
  border-color: transparent #c0392b transparent transparent;
}

.debate-card[status="on"] .team-left,
.debate-card[status="on"] .team-right {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* VS badge - Refined positioning and responsive sizing */
.vs-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;

  /* Improved styling */
  background: var(--vs-badge-bg);
  color: var(--vs-badge-text);
  font-size: 2.5rem;
  font-weight: bold;

  /* Use aspect-ratio to maintain circular shape */
  aspect-ratio: 1 / 1;
  width: 80px;
  height: 80px;
  border-radius: 50%;

  /* Improved visual effects */
  box-shadow: var(--vs-badge-shadow);

  /* Center content within the badge */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Animation */
  animation: vsPulse 2s infinite alternate;

  /* Prevent interaction with badge */
  pointer-events: none;

  /* Ensure text is centered */
  text-align: center;
  line-height: 1;

  /* Fix for potential overflow issues */
  overflow: hidden;

  /* Improve rendering */
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Responsive adjustments for VS badge */
@media (max-width: 480px) {
  .vs-badge {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

@media (max-width: 375px) {
  .vs-badge {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .vs-badge {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .vs-badge {
    width: 80px;
    height: 80px;
    font-size: 2.2rem;
  }
}

/* 2K resolution */
@media screen and (min-width: 2048px) and (max-width: 3839px) {
  .vs-badge {
    width: 120px;
    height: 120px;
    font-size: 3.5rem;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.4);
  }
}

/* 4K resolution */
@media screen and (min-width: 3840px) {
  .vs-badge {
    width: 180px;
    height: 180px;
    font-size: 5rem;
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.5);
  }
}

/* Landscape mode adjustment */
@media (max-width: 900px) and (orientation: landscape) {
  .vs-badge {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
  }
}

/* Progress bar for debate stages */
.debate-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.1);
  z-index: 1000;
}

.debate-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  width: 0%;
  transition: width 0.5s ease;
}

/* Responsive design improvements */
@media (max-width: 768px) {
  .content {
    flex-direction: column;
  }

  .card {
    width: 100% !important;
    margin-bottom: 20px;
  }

  .title {
    font-size: 2rem;
    padding: 20px;
  }

  .counter > div {
    font-size: 3.5rem;
  }
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

th {
  background-color: var(--table-header-bg);
  color: var(--text-secondary);
  font-weight: bold;
}

tr:hover {
  background-color: rgba(52, 152, 219, 0.1);
}

/* Update the settings card styles */
.settings-card {
  position: relative;
  z-index: 2; /* 提高层级 */
  margin: 10px auto;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  max-width: 800px;
  width: 95%;
}

/* Action container positioning */
.action-container {
  /* 弹性布局 */
  display: flex;
  position: relative; /* 改为相对定位 */
  margin: 40px auto; /* 添加外边距 */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 1; /* 降低层级 */
}

/* Add styles for the hint toggle */
.hint-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  width: 100%;
  max-width: 300px;
}

.hint-toggle-label {
  color: var(--text-primary);
  font-size: 1rem;
}

.action {
  text-align: center;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 30px 60px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}

.action-title {
  font-size: 2.4rem;
  color: var(--text-primary);
  font-weight: bold;
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(0, 140, 255, 0.3);
}

.action-btn button {
  font-size: 1.2rem;
  padding: 15px 40px;
  background: linear-gradient(135deg, #2980b9, #3498db);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #3498db, #2980b9);
}

/* Update input styles */
.selection-btn input {
  width: 200px;
  padding: 10px 15px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-primary);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.selection-btn input:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.15);
}

/* Improved return button */
.return-button {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.return-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #34495e, #2c3e50);
}

.return-button .icon {
  font-size: 1.2rem;
}

/* Progress bars */
.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0 0 20px 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  transform-origin: left;
  transition: transform 1s linear;
}

.progress-fill.right {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
}

/* 添加三栏布局 */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 三列等宽 */
  gap: 20px;
  margin-bottom: 20px;
}

/* 调整输入组样式 */
.input-group {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
}

/* 响应式布局优化 */
@media (max-width: 1024px) {
  .action {
    max-width: 95%;
  }

  .action-grid {
    grid-template-columns: repeat(2, 1fr); /* 平板设备显示两列 */
  }
}

@media (max-width: 768px) {
  .action-grid {
    grid-template-columns: 1fr; /* 移动设备显示单列 */
  }

  .action {
    padding: 20px;
  }
}

/* 子标题基础样式 */
[class^="card-subtitle"] {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 25px;
  margin-bottom: 15px;
  margin-left: 36px;
  margin-right: 36px;
  font-weight: 500;
  padding-bottom: 8px;
  position: relative;
  border-bottom: 1px solid rgba(144, 202, 249, 0.2);
}

/* 信息设置样式 */
.card-subtitle-info {
  color: var(--text-muted);
  border-bottom-color: rgba(100, 181, 246, 0.3);
}

.card-subtitle-info::before {
  content: "info";
  font-family: "Material Symbols Outlined";
  margin-right: 8px;
  font-size: 1.2rem;
  vertical-align: middle;
}

/* 快捷键设置样式 */
.card-subtitle-key {
  color: var(--accent-green);
  border-bottom-color: rgba(129, 199, 132, 0.3);
}

.card-subtitle-key::before {
  content: "keyboard";
  font-family: "Material Symbols Outlined";
  margin-right: 8px;
  font-size: 1.2rem;
  vertical-align: middle;
}

/* 程序设置样式 */
.card-subtitle-set {
  color: var(--accent-yellow);
  border-bottom-color: rgba(255, 183, 77, 0.3);
}

.card-subtitle-set::before {
  content: "settings";
  font-family: "Material Symbols Outlined";
  margin-right: 8px;
  font-size: 1.2rem;
  vertical-align: middle;
}

/* 悬停效果 */
[class^="card-subtitle"]:hover {
  transform: translateX(5px);
  transition: transform 0.3s ease;
}

/* 添加开发信息样式 */
.action-info {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 25px;
  opacity: 0.8;
}

/* 添加版本信息样式 */
.version-info {
  top: 5px;
  position: relative;
  bottom: 15px;
  bottom: 10px;
  /* right: 15px; */
  color: var(--text-muted);
  font-size: 0.8rem;
  opacity: 0.6;
}

.project-link {
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.project-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.project-link .material-symbols-outlined {
  font-size: 1.1rem;
  margin: 0;
}

/* 开关按钮样式 */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

/* 统计卡片样式 */
.statistics-card {
  width: calc(100% - 40px);
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 15px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  overflow-y: auto;
  transition: all 0.3s ease;
}
.statistics-summary {
  display: flex;
  justify-content: space-between;
  align-items: center; 
}

.statistics-card .card-title {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--card-border);
}

.statistics-card table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.statistics-card th,
.statistics-card td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

.statistics-card th {
  background: var(--table-header-bg);
  color: var(--text-secondary);
  font-weight: 500;
}

.statistics-card tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* 响应式布局 */
@media (max-width: 768px) {
  .statistics-card {
    width: calc(100% - 20px);
    margin: 10px;
    padding: 15px;
  }
  
  .statistics-card th,
  .statistics-card td {
    padding: 8px;
    font-size: 0.9rem;
  }
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2c3e50;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: #fafafa;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-blue);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* 主题切换开关样式 */
.theme-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-switch .slider {
  background-color: #2c3e50;
}

.theme-switch .slider:before {
  content: "🌙";
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #2c3e50;
}

.theme-switch input:checked + .slider {
  background-color: #3498db;
}

.theme-switch input:checked + .slider:before {
  content: "☀️";
  transform: translateX(26px);
}

.theme-label {
  font-size: 1rem;
  color: var(--text-primary);
}

.debate-topic-display {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 15px 30px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.debate-topic-display .material-symbols-outlined {
  color: var(--text-muted);
  font-size: 1.5rem;
}

#topic_text {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .debate-topic-display {
    width: 90%;
    padding: 12px 20px;
  }

  #topic_text {
    font-size: 1rem;
  }
}

/* 虚拟按键样式 */
.virtual-keys {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 15px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  width: 100%; /* 修改宽度以匹配父容器 */
  text-align: center;
  box-sizing: border-box;
  justify-content: space-around;
  flex-wrap: wrap;
}

/* 虚拟按键设置样式 */
.virtual-keys-settings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  padding: 10px;
}

/* 优化虚拟按键基础样式 */
.v-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px; /* Smaller gap */
  padding: 8px; /* Smaller padding */
  min-width: 80px; /* Smaller min-width */
  border: none;
  border-radius: 10px; /* Slightly smaller border-radius */
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--btn-shadow);
  backdrop-filter: blur(10px);
}

.v-key:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Reduced shadow */
}

.v-key:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Reduced shadow */
}

/* 图标样式优化 */
.v-key span:first-child {
  font-size: 20px; /* Smaller font size */
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.v-key:hover span:first-child {
  color: var(--text-secondary);
}

/* 文字样式优化 */
.v-key span:last-child {
  font-size: 0.8rem; /* Smaller font size */
  font-weight: 500;
  opacity: 0.9;
  white-space: nowrap;
}

/* 时间控制按钮特殊样式 */
.v-key.time-control {
  background: rgba(52, 152, 219, 0.15);
  border: 1px solid rgba(52, 152, 219, 0.2);
}

.v-key.time-control:hover {
  background: rgba(52, 152, 219, 0.25);
  border-color: rgba(52, 152, 219, 0.3);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.15); /* Reduced shadow */
}

.v-key.time-control span:first-child {
  color: var(--accent-blue);
}

/* 时间回滚按钮样式 */
.v-key[data-action*="rollback"] {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.v-key[data-action*="rollback"]:hover {
  background: rgba(46, 204, 113, 0.25);
  border-color: rgba(46, 204, 113, 0.3);
  box-shadow: 0 4px 8px rgba(46, 204, 113, 0.15); /* Reduced shadow */
}

.v-key[data-action*="rollback"] span:first-child {
  color: var(--accent-green);
}

/* 时间前进按钮样式 */
.v-key[data-action*="forward"] {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.v-key[data-action*="forward"]:hover {
  background: rgba(231, 76, 60, 0.25);
  border-color: rgba(231, 76, 60, 0.3);
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.15); /* Reduced shadow */
}

.v-key[data-action*="forward"] span:first-child {
  color: var(--accent-red);
}

/* 重置按钮样式 */
.v-key[data-action="reset"] {
  background: rgba(241, 196, 15, 0.15);
  border: 1px solid rgba(241, 196, 15, 0.2);
}

.v-key[data-action="reset"]:hover {
  background: rgba(241, 196, 15, 0.25);
  border-color: rgba(241, 196, 15, 0.3);
  box-shadow: 0 4px 8px rgba(241, 196, 15, 0.15); /* Reduced shadow */
}

.v-key[data-action="reset"] span:first-child {
  color: var(--accent-yellow);
}

/* 结束自由辩论按钮样式 */
.end-free-debate {
  background: rgba(192, 57, 43, 0.15) !important;
  border: 1px solid rgba(192, 57, 43, 0.2) !important;
}

.end-free-debate:hover {
  background: rgba(192, 57, 43, 0.25) !important;
  border-color: rgba(192, 57, 43, 0.3) !important;
  box-shadow: 0 6px 12px rgba(192, 57, 43, 0.15) !important;
}

.end-free-debate span:first-child {
  color: #c0392b !important;
}

/* 按钮点击效果 */
.v-key.active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .v-key {
    padding: 10px;
    min-width: 80px;
  }

  .v-key span:first-child {
    font-size: 24px;
  }

  .v-key span:last-child {
    font-size: 0.8rem;
  }
}

/* Fix controls-container to prevent overlapping */
.controls-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  z-index: 1000;
  width: 90%; /* 调整宽度 */
  max-width: 1200px; /* 增加最大宽度 */
  padding-bottom: 20px;
}

/* Update phase hint to work in the container */

/* Style for the End Free Debate button */
.end-free-debate {
  background: rgba(231, 76, 60, 0.2) !important;
  border: 1px solid rgba(231, 76, 60, 0.3) !important;
}

.end-free-debate:hover {
  background: rgba(231, 76, 60, 0.3) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .controls-container {
    width: 95%;
    bottom: 10px;
    gap: 10px;
  }

  .virtual-keys {
    padding: 10px;
  }

  .v-key {
    padding: 8px;
    font-size: 0.9rem;
  }

  .hint-toggle-container {
    flex-direction: column;
    padding: 10px;
  }
}

/* Add highlight animation for phase hint */
.phase-hint.highlight {
  animation: phaseHintHighlight 1s ease-out;
}

@keyframes phaseHintHighlight {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.6);
    border-color: rgba(52, 152, 219, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
}

/* Improve the visibility of the next phase hint */
.phase-hint {
  position: relative;
  background: var(--card-bg);
  /* left: 50%; */
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 20px;
  font-size: 1.3rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  border: 1px solid var(--card-border);
  animation: hintFadeIn 0.5s ease-out, phasePulse 3s infinite alternate;
  width: calc(fit-content + 20px);
  text-align: center;
  box-sizing: border-box;
  margin-bottom: 10px;
  display: block !important; /* 确保显示 */
  z-index: 1001; /* 提高层级 */
}

/* Add a subtle pulse animation to make the hint more noticeable */
.phase-hint {
  animation: phasePulse 3s infinite alternate;
}

@keyframes phasePulse {
  0% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.6);
  }
}

/* 辩论结束动画样式 */
.debate-end-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 4rem;
  font-weight: bold;
  color: #ffbd39;
  text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: all 0.5s ease-out;
  animation: endTextAppear 0.5s ease-out forwards, endTextPulse 2s ease-in-out infinite, endTextShake 0.5s ease-in-out
    infinite;
}

.debate-end-text.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@keyframes endTextAppear {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

@keyframes endTextPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes endTextShake {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  25% {
    transform: translate(-50%, -50%) rotate(-2deg);
  }
  75% {
    transform: translate(-50%, -50%) rotate(2deg);
  }
}

/* 添加光晕效果 */
.debate-end-text::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 68, 68, 0.2) 0%, rgba(255, 68, 68, 0) 70%);
  transform: translate(-50%, -50%);
  z-index: -1;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
}

/* 添加庆祝彩带效果 */
.confetti {
  position: fixed;
  z-index: 999;
  width: 10px;
  height: 10px;
  opacity: 0;
}

@keyframes confettiLeft {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(calc(50vw - 50px), calc(50vh - 50%)) rotate(720deg);
    opacity: 0;
  }
}

@keyframes confettiRight {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50vw + 50px), calc(50vh - 50%)) rotate(-720deg);
    opacity: 0;
  }
}

/* 更新版本信息样式 */
.version-info {
  position: relative;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 15px;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid var(--card-border);
  transition: all 0.3s ease;
  text-align: center;
  line-height: 1.8;
}

.version-info:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.version-info .material-symbols-outlined {
  font-size: 1.1rem;
  vertical-align: middle;
  margin-right: 5px;
}

.version-info a.project-link {
  margin-top: 8px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.project-link:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

/* 自定义提示框样式 */
.custom-alert {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  padding: 20px 30px;
  width: 300px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: all 0.3s ease;
}

.custom-alert.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.custom-alert .icon {
  color: var(--accent-red);
  font-size: 2em;
  margin-bottom: 10px;
}

.custom-alert .message {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.custom-alert .btn-ok {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 8px 25px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-alert .btn-ok:hover {
  background: var(--btn-hover);
  transform: translateY(-2px);
}

.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  z-index: 9998;
  transition: opacity 0.3s ease;
}

.alert-overlay.show {
  opacity: 1;
}
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.confirm-overlay.show {
  opacity: 1;
}

.custom-confirm {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 300px;
  width: 90%;
}

.custom-confirm.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.custom-confirm .icon {
  display: block;
  font-size: 36px;
  color: #ff9800;
  margin-bottom: 10px;
  text-align: center;
}

.custom-confirm .message {
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.5;
}

.custom-confirm .buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.custom-confirm button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.custom-confirm .btn-ok {
  background-color: #2196F3;
  color: white;
}

.custom-confirm .btn-ok:hover {
  background-color: #0b7dda;
}

.custom-confirm .btn-cancel {
  background-color: #f1f1f1;
  color: #333;
}

.custom-confirm .btn-cancel:hover {
  background-color: #ddd;
}
