/* ============================
 * 体育投注教程 - 自定义样式
 * 配合 Alpine.js + Tailwind CSS
 * ============================ */

/* Alpine.js 初始化前隐藏 */
[x-cloak] { display: none !important; }

/* 全局字体和基础 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: #f0f2f5;
}

/* iOS 安全区 */
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* 团队徽章 */
.team-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 比分显示 */
.score-display {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

/* 结果标签 */
.result-tag {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}
.result-tag.win { background: #d1fae5; color: #065f46; }
.result-tag.lose { background: #fee2e2; color: #991b1b; }
.result-tag.halfWin { background: #ecfdf5; color: #047857; border: 1px dashed #6ee7b7; }
.result-tag.halfLose { background: #fef2f2; color: #b91c1c; border: 1px dashed #fca5a5; }
.result-tag.refund { background: #f3f4f6; color: #4b5563; }

/* 场景卡片滑动容器 */
.scenario-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 16px;
}
.scenario-carousel::-webkit-scrollbar { display: none; }
.scenario-card {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

/* 场景导航箭头 */
.nav-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  color: #6b7280;
}
.nav-arrow:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  color: #3b82f6;
}
.nav-arrow:active {
  transform: scale(0.95);
}

/* 场景指示点 */
.dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  transition: all 0.3s;
}
.dot-indicator.active {
  background: #3b82f6;
  width: 24px;
  border-radius: 4px;
}

/* 问答选项按钮 */
.quiz-option {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  text-align: left;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.quiz-option:hover { border-color: #93c5fd; background: #eff6ff; }
.quiz-option.selected { border-color: #3b82f6; background: #eff6ff; }
.quiz-option.correct { border-color: #10b981; background: #ecfdf5; }
.quiz-option.wrong { border-color: #ef4444; background: #fef2f2; }

/* 进度条 */
.progress-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* 计算器输入框 */
.calc-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.2s;
  outline: none;
}
.calc-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 难度标签 */
.difficulty-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.difficulty-1 { background: #dbeafe; color: #1d4ed8; }
.difficulty-2 { background: #fef3c7; color: #b45309; }
.difficulty-3 { background: #fce7f3; color: #be185d; }

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-around;
  z-index: 50;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  font-size: 11px;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
  border: none;
  background: none;
}
.bottom-nav-item.active {
  color: #3b82f6;
}
.bottom-nav-item .nav-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

/* 卡片动画 */
.card-enter {
  animation: cardIn 0.3s ease-out;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 让球/大小球标注 */
.handicap-label {
  display: inline-block;
  padding: 2px 12px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

/* 解释文本框 */
.explanation-box {
  background: #f0f9ff;
  border-left: 4px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-size: 14px;
  color: #1e40af;
  line-height: 1.6;
}

/* 提示卡片 */
.tip-card {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px;
}

/* 响应式调整 */
@media (min-width: 768px) {
  .bottom-nav {
    position: static;
    border-top: none;
    border-bottom: 1px solid #e5e7eb;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
  }
  .bottom-nav-item {
    flex: none;
    flex-direction: row;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
  }
  .bottom-nav-item.active {
    background: #eff6ff;
  }
  .team-badge {
    width: 72px;
    height: 72px;
    font-size: 18px;
  }
  .score-display {
    font-size: 3.5rem;
  }
}

/* 串关计算器 - 串关项 */
.parlay-leg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}
.parlay-leg:last-child {
  border-bottom: none;
}

/* 数据标注提示 */
.data-note {
  display: inline-block;
  padding: 1px 6px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

/* 滚动容器 */
.content-scroll {
  padding-bottom: 80px; /* 为底部导航栏留出空间 */
}
@media (min-width: 768px) {
  .content-scroll {
    padding-bottom: 20px;
    max-width: 800px;
    margin: 0 auto;
  }
}
