/* ==================== CSS Reset & Variables ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette */
  --primary-blue: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --secondary-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  
  /* Gradients */
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --card-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  
  /* Text */
  --text-light: #ffffff;
  --text-dark: #1f2937;
  --text-gray: #6b7280;
  
  /* Effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
  --blur: blur(10px);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 20px;
}

/* ==================== Global Styles ==================== */
button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

button:active {
  transform: scale(0.95);
}

select, input {
  font-family: inherit;
  outline: none;
  border: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

/* ==================== Settings Panel ==================== */
.settings-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 500px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  backdrop-filter: var(--blur);
  color: var(--text-light);
  padding: 2rem;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(59, 130, 246, 0.3);
  border-right: 3px solid rgba(59, 130, 246, 0.5);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1000;
  height: 100vh;
  overflow-y: auto;
}

.settings-panel:not(.hide) {
  transform: translateX(0);
}

.settings-content h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--text-light);
  font-weight: 700;
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: #60a5fa;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.form-group select {
  width: 100%;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
  border: 2px solid rgba(96, 165, 250, 0.4);
  border-radius: var(--radius-md);
  color: var(--text-light);
  font-size: 1.05rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

/* 优化下拉选项的对比度 */
.form-group select option {
  background: #1a202c;
  color: #ffffff;
  padding: 12px;
  font-size: 1rem;
  font-weight: 500;
}

.form-group select option:checked {
  background: #3b82f6;
  color: #ffffff;
  font-weight: 600;
}

.form-group select option:hover {
  background: #2d3748;
  color: #60a5fa;
}

.form-group select:hover {
  border-color: #60a5fa;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.25));
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.form-group select:focus {
  border-color: #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3), 0 8px 20px rgba(59, 130, 246, 0.2);
}

.difficulty-info {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
  border-radius: var(--radius-md);
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-left: 5px solid #10b981;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.difficulty-info h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #34d399;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.difficulty-info p {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(16, 185, 129, 0.3);
}

.difficulty-info p:last-child {
  margin-bottom: 0;
}

.difficulty-info strong {
  color: #60a5fa;
  font-weight: 600;
}

.settings-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: all 0.3s ease;
}

.settings-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* 只旋转按钮内的SVG图标 */
.settings-btn:hover svg {
  transform: rotate(90deg);
}

.settings-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-light);
  transition: transform 0.3s ease;
  display: block;
}

/* 按钮提示动画 */
.settings-btn::before {
  content: '设置';
  position: absolute;
  right: 70px;
  background: rgba(0, 0, 0, 0.9);
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.settings-btn:hover::before {
  opacity: 1;
}

/* ==================== Game Container ==================== */
.game-container {
  background: var(--card-gradient);
  backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 700px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

/* ==================== Start Game Overlay ==================== */
.start-game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: var(--blur);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.5s ease-out;
}

.start-game-overlay.hide {
  display: none;
}

.start-content {
  text-align: center;
  padding: 2rem;
}

.start-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}

.start-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.start-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

.start-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: var(--text-light);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.feature-icon {
  font-size: 1.5rem;
}

.start-game-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 3rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-purple));
  color: var(--text-light);
  font-size: 1.3rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.start-game-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
}

.start-game-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.start-tip {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

/* ==================== Game Header ==================== */
.game-header {
  text-align: center;
  margin-bottom: 2rem;
}

.game-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.game-title .icon {
  font-size: 2.5rem;
  animation: float 3s ease-in-out infinite;
}

.game-title .title-text {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-light), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;

/* Developer: SinceraXY from CUPB */

}

/* ==================== Stats Bar ==================== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  font-size: 1.5rem;
}

.stat-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
  font-family: 'JetBrains Mono', monospace;
}

/* ==================== Game Content ==================== */
.game-content {
  text-align: center;
}

.instruction {
  margin-bottom: 1rem;
}

.instruction p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.word-display {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.word {
  font-size: 3rem;
  font-weight: 600;
  color: var(--text-light);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.input-container {
  margin-bottom: 1rem;
}

.word-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.2rem;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255, 255, 255, 0.95);
  border: 3px solid transparent;
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.word-input:focus {
  background: #ffffff;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  transform: scale(1.02);
}

.word-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

/* ==================== Progress Bar ==================== */
.progress-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-lg);
  height: 8px;
  overflow: hidden;
  margin-top: 1.5rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), #34d399);
  border-radius: var(--radius-lg);
  transition: all 0.5s ease;
  width: 100%;
}

/* ==================== Best Score Display ==================== */
.best-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
  border: 2px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--text-light);
}

.best-icon {
  font-size: 1.5rem;
}

.best-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.best-value {
  font-size: 1.3rem;
  font-family: 'JetBrains Mono', monospace;
  color: #fbbf24;
}

/* ==================== End Game Container ==================== */
.end-game-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: var(--blur);
  border-radius: var(--radius-xl);
  display: none;
  align-items: center;
/* Dedicated to my girlfriend */
  justify-content: center;
  z-index: 10;
  animation: fadeIn 0.4s ease-out;
}

.end-game-content {
  text-align: center;
  padding: 2rem;
  width: 100%;
}

.game-over-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 1s ease;
}

.game-over-title {
  font-size: 2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  font-weight: 700;
}

.final-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.final-stat {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.final-stat:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.final-stat.highlight {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
  border-color: rgba(251, 191, 36, 0.5);
}

.final-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.final-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-light);
  font-family: 'JetBrains Mono', monospace;
}

.final-stat.highlight .final-value {
  color: #fbbf24;
}

.play-again-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-purple));
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.play-again-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.play-again-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* ==================== Help Button & Modal ==================== */
.help-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent-green), #34d399);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: all 0.3s ease;
}

.help-btn:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.help-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-light);
}

/* 帮助按钮提示 */
.help-btn::before {
  content: '游戏说明';
  position: absolute;
  left: 70px;
  background: rgba(0, 0, 0, 0.9);
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.help-btn:hover::before {
  opacity: 1;
}

.help-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: var(--blur);
/* Project: GameHub */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.help-modal.show {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

.help-content {
  background: linear-gradient(135deg, #2d3748, #1a202c);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s ease-out;
}

.help-content h3 {
  font-size: 1.8rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  text-align: center;
}

.help-section {
  margin-bottom: 2rem;
}

.help-section h4 {
  font-size: 1.2rem;
  color: var(--primary-light);
  margin-bottom: 1rem;
}

.help-section ul {
  list-style: none;
  padding: 0;
}

.help-section li {
  padding: 0.75rem 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.help-section li:last-child {
  border-bottom: none;
}

.help-section kbd {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
  color: var(--text-light);
}

/* 准确率说明样式 */
.accuracy-explanation {
  background: rgba(59, 130, 246, 0.1);
  border-left: 4px solid var(--primary-blue);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

.accuracy-explanation p {
  margin: 0.75rem 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.accuracy-explanation .formula {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-family: monospace;
  font-size: 1rem;
  color: #60a5fa;
  text-align: center;
  margin: 1rem 0;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.accuracy-explanation ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.accuracy-explanation li {
  padding: 0.4rem 0;
  border-bottom: none;
}

.accuracy-explanation .tip {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.15));
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-top: 1rem;
  color: #34d399;
}

/* 准确率信息图标 */
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 0.4rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-purple));
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
  position: relative;
  vertical-align: middle;
}

.info-icon svg {
  width: 12px;
  height: 12px;
  color: white;
  stroke: white;
  fill: white;
}

.info-icon:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.info-icon:active {
  transform: scale(1.05);
}

/* 准确率提示框 */
.accuracy-tooltip {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%) translateX(10px);
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.98), rgba(15, 52, 96, 0.98));
  border: 2px solid rgba(59, 130, 246, 0.5);
  border-radius: var(--radius-md);
  padding: 1rem;
  min-width: 280px;
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.3);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  margin-left: 10px;
}

.accuracy-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(5px);
}

/* 提示框小箭头 - 指向左侧 */
.accuracy-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-right-color: rgba(59, 130, 246, 0.5);
}

.tooltip-title {
  font-size: 1rem;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(96, 165, 250, 0.3);
}

.tooltip-content {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

.tooltip-content p {
  margin: 0.5rem 0;
}

.tooltip-content strong {
  color: #60a5fa;
}

.formula-small {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8rem;
  color: #60a5fa;
  text-align: center;
  margin: 0.75rem 0;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.tooltip-content ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.tooltip-content li {
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.tooltip-content li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-green);
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ==================== Responsive Design ==================== */

/* 中等屏幕 - 平板设备 */
@media (max-width: 1024px) {
  /* 准确率提示框 - 改为向上显示防止溢出 */
  .accuracy-tooltip {
    top: auto;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    margin-left: 0;
    max-width: min(320px, 90vw);
  }
  
  .accuracy-tooltip.show {
    transform: translateX(-50%) translateY(-5px);
  }
  
  .accuracy-tooltip::after {
    top: 100%;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(59, 130, 246, 0.5);
    border-right-color: transparent;
  }
}

@media (max-width: 768px) {
  .game-container {
    padding: 1.5rem;
  }
  
  .game-title .title-text {
    font-size: 2rem;
  }
  
  .game-title .icon {
    font-size: 2rem;
  }
  
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .word {
    font-size: 2rem;
  }
  
  .word-input {
    font-size: 1rem;
  }
  
  .final-stats {
    grid-template-columns: 1fr;
  }
  
  .settings-btn,
  .help-btn {
    width: 48px;
    height: 48px;
    bottom: 20px;
  }
  
  .settings-btn {
    right: 20px;
  }
  
  .help-btn {
    left: 20px;
  }
  
  .help-content {
    padding: 1.5rem;
  }
  
  /* 开始界面响应式 */
  .start-icon {
    font-size: 4rem;
  }
  
  .start-title {
    font-size: 2rem;
  }
  
  .start-features {
    gap: 1rem;
  }
  
  .start-game-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }
  
  /* 按钮提示在移动端隐藏 */
  .settings-btn::before,
  .help-btn::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .game-title .title-text {
    font-size: 1.5rem;
  }
  
  .stat-value {
    font-size: 1.2rem;
  }
  
  .stat-label {
    font-size: 0.65rem;
  }
  
  .word {
    font-size: 1.5rem;
  }
  
  .final-value {
    font-size: 1.5rem;
  }
  
  /* 开始界面小屏优化 */
  .start-icon {
    font-size: 3rem;
  }
  
  .start-title {
    font-size: 1.5rem;
  }
  
  .start-description {
    font-size: 0.95rem;
  }
  
  .start-features {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .feature-item {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
  
  .start-game-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .start-tip {
    font-size: 0.8rem;
  }
}
