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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2d3748;
}

/* 导航菜单 */
.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  text-decoration: none;
  color: #4a5568;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #667eea;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #4a5568;
  cursor: pointer;
}

/* 英雄区域 */
.hero {
  text-align: center;
  padding: 4rem 0;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: bold;
  color: #2d3748;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  color: #4a5568;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

/* 卡片样式 */
.card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-align: center;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.card p {
  color: #718096;
  line-height: 1.5;
}

/* 网格布局 */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* 章节样式 */
.section {
  padding: 4rem 0;
}

.section:nth-child(even) {
  background: white;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: bold;
  color: #2d3748;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: #4a5568;
  max-width: 600px;
  margin: 0 auto;
}

/* 信息框样式 */
.info-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
}

.info-box h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.info-box ul {
  list-style: none;
  padding-left: 0;
}

.info-box li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.info-box li:last-child {
  border-bottom: none;
}

/* 随机猜字游戏显示 */
.random-charade {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin: 2rem auto;
  max-width: 600px;
}

.charade-content {
  font-size: 3rem;
  font-weight: bold;
  color: #667eea;
  background: #f7fafc;
  padding: 2rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  word-break: break-word;
}

/* 页脚样式 */
footer {
  background: #2d3748;
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #e2e8f0;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #a0aec0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #4a5568;
  padding-top: 1rem;
  text-align: center;
  color: #a0aec0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.125rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* 工具提示 */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}


/* 快速开始游戏样式 */
.quick-start-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.quick-charade-content {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 2rem;
  margin: 1.5rem 0;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.quick-timer {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.quick-game-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.quick-game-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  min-width: 120px;
}

.quick-game-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.quick-game-btn.start {
  background: linear-gradient(45deg, #10b981, #059669);
  color: white;
}

.quick-game-btn.next {
  background: linear-gradient(45deg, #3b82f6, #2563eb);
  color: white;
}

.quick-game-btn.pause {
  background: linear-gradient(45deg, #f59e0b, #d97706);
  color: white;
}

.quick-game-btn.reset {
  background: linear-gradient(45deg, #6b7280, #4b5563);
  color: white;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
  .quick-game-buttons {
    flex-direction: column;
    align-items: center;
  }

  .quick-game-btn {
    width: 100%;
    max-width: 200px;
  }

  .quick-charade-content {
    font-size: 2rem;
    padding: 1.5rem;
  }
}

/* 动画效果 */
@keyframes pulse {

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

  50% {
    transform: scale(1.05);
  }
}

.quick-charade-content.animate {
  animation: pulse 0.6s ease-in-out;
}

/* 游戏状态指示器 */
.game-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-status.active {
  background: #10b981;
  color: white;
}

.game-status.paused {
  background: #f59e0b;
  color: white;
}

.game-status.completed {
  background: #8b5cf6;
  color: white;
}

/* Picture Charades 特定样式 */
.picture-charades-container {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

.image-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
}

.charade-image {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

.image-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #8b5cf6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.image-fallback {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #f3e8ff 0%, #fce7f3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.category-button {
  height: 64px;
  background: linear-gradient(45deg, #f97316, #ea580c);
  transition: all 0.3s ease;
  transform: scale(1);
}

.category-button:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

.category-button.selected {
  ring: 4px;
  ring-color: rgb(147 197 253);
}

/* 响应式图片样式 */
@media (max-width: 768px) {
  .charade-image {
    height: 240px;
  }
  
  .image-fallback {
    font-size: 3rem;
  }
  
  .category-button {
    height: 56px;
    font-size: 0.875rem;
  }
}