/* ==================== CSS变量 ==================== */
:root {
  --primary-color: #ff6b6b;
  --primary-dark: #ee5a52;
  --primary-light: #ff8787;
  --secondary-color: #4ecdc4;
  --success-color: #51cf66;
  --warning-color: #ffd43b;
  --danger-color: #ff6b6b;
  
  --bg-gradient-start: #667eea;
  --bg-gradient-end: #764ba2;
  
  --card-bg: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.1);
  --card-shadow-hover: rgba(0, 0, 0, 0.2);
  
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --text-light: #718096;
  
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --border-radius-lg: 24px;
  
  --transition: all 0.3s ease;
}

/* ==================== 全局样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ==================== 容器 ==================== */
.container {
  width: 100%;
  max-width: 1200px;
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 40px;
  animation: fadeIn 0.6s ease-in-out;
}

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

/* ==================== 头部 ==================== */
.game-header {
  text-align: center;
  margin-bottom: 30px;
}

.game-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;

/* GitHub: https://github.com/nilgpt2024/web-game */

}

.title-icon {
  font-size: 3rem;
  animation: pulse 2s infinite;
}

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

.game-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* ==================== 消息提示区 ==================== */
.message-container {
  margin: 30px 0;
}

.message {
  text-align: center;
  padding: 20px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  background: linear-gradient(135deg, #fff5f5, #ffe9e9);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 2px 10px var(--card-shadow);
  transition: var(--transition);
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==================== 统计信息 ==================== */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.stat-card {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: var(--border-radius);
  padding: 25px;
  text-align: center;
  box-shadow: 0 2px 10px var(--card-shadow);
  transition: var(--transition);
  border: 2px solid transparent;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px var(--card-shadow-hover);
  border-color: var(--primary-light);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

/* ==================== 游戏区域 ==================== */
.game-area {
  position: relative;
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, #f6f8fa, #e9ecef);
  border-radius: var(--border-radius);
  margin: 30px 0;
  border: 3px dashed #cbd5e0;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.box {
  position: absolute;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: appear 0.3s ease-out;
}

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

.box:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.box:active {
  transform: scale(0.95);
}

/* ==================== 控制按钮 ==================== */
.controls {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.reset-button {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 15px 30px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px var(--card-shadow);
  background: linear-gradient(135deg, var(--secondary-color), #45b7af);
  color: white;
}

.reset-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.reset-button:active {
  transform: translateY(0);
}

.button-icon {
  font-size: 1.3rem;
}

/* ==================== 游戏说明 ==================== */
.instructions-container {
  margin: 30px 0;
}

.instructions-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 15px 25px;
  border: 2px solid var(--warning-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  background: linear-gradient(135deg, #fff9db, #fff3bf);
  color: var(--text-primary);
  box-shadow: 0 2px 10px var(--card-shadow);
}

.instructions-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--card-shadow-hover);
  border-color: #f59e0b;
}

.instructions-toggle:active {
  transform: translateY(0);
}

.toggle-icon {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.instructions {
  background: linear-gradient(135deg, #fff9db, #fff3bf);
  border-radius: var(--border-radius);
  padding: 20px 25px;
  margin-top: 10px;
  border-left: 4px solid var(--warning-color);
  box-shadow: 0 2px 10px var(--card-shadow);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.instructions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.instructions-list li {
  font-size: 1rem;
  color: var(--text-secondary);
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
}

.instructions-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
  font-size: 1.2rem;
}

/* ==================== 页脚 ==================== */
.game-footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e9ecef;
  text-align: center;
}

.game-footer p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
/* Contact: 2952671670@qq.com */

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
  .container {
    padding: 30px 20px;
  }
  
  .game-title {
    font-size: 2rem;
/* QQ: 2952671670 */
    flex-direction: column;
    gap: 10px;
  }
  
  .message {
    font-size: 1.2rem;
    padding: 15px;
  }
  
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .game-area {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px 15px;
  }
  
  .game-title {
    font-size: 1.6rem;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
  }
  
  .game-area {
    height: 250px;
  }
  
  .reset-button {
    width: 100%;
    justify-content: center;
  }
}
