/* 强制全域盒模型重置 - 硬核覆盖 */
* {
    box-sizing: border-box !important;
    max-width: 100vw !important;
}
html, body {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    background-color: #F7F9FC;
}
.login-card, .register-card {
    width: 92% !important;
    margin: 20px auto !important;
    float: none !important;
}

/**
 * JJ竞猜系统 - 全局样式
 * 蓝白浅色调 简洁分明
 */

/* ==================== 强制全局布局重置 ==================== */
html, body {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* ==================== 基础重置 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background: #F0F4F8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

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

/* ==================== 验证码容器修复 ==================== */
.captcha-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.captcha-wrapper .input-wrapper {
    flex: 1 !important;
    margin-bottom: 0 !important;
}

.captcha-img {
    flex-shrink: 0 !important;
}

/* ==================== 安全区域适配 ==================== */
.safe-top {
  padding-top: constant(safe-area-inset-top);
  padding-top: env(safe-area-inset-top);
}

.safe-bottom {
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
}

/* ==================== 滚动条隐藏 ==================== */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ==================== 页面容器 ==================== */
.page {
  min-height: 100vh;
  background: #F0F4F8;
  padding-bottom: 70px;
}

.page-white {
  min-height: 100vh;
  background: #fff;
}

/* ==================== 头部导航 ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  height: 56px;
}

.header-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #333;
  font-size: 20px;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  text-align: center;
  flex: 1;
}

.header-right {
  min-width: 60px;
  display: flex;
  justify-content: flex-end;
}

/* ==================== 底部导航 ==================== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  z-index: 100;
  display: flex;
  border-top: 1px solid #E8ECF0;
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
}

.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  color: #999;
  font-size: 10px;
  transition: color 0.2s;
}

.tabbar-item.active {
  color: #007AFF;
}

.tabbar-item-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.tabbar-item-text {
  font-size: 11px;
}

/* ==================== 卡片 ==================== */
.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.card-shadow {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-p16 {
  padding: 16px;
}

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-primary {
  background: #007AFF;
  color: #fff;
}
.btn-primary:active {
  background: #0066DD;
}

.btn-secondary {
  background: #E8ECF0;
  color: #666;
}
.btn-secondary:active {
  background: #D8DCE0;
}

.btn-outline {
  background: transparent;
  color: #007AFF;
  border: 1px solid #007AFF;
}
.btn-outline:active {
  background: #E8F4FF;
}

.btn-ghost {
  background: transparent;
  color: #007AFF;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 18px;
}

.btn-full {
  width: 100%;
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== 输入框 ==================== */
.input-group {
  margin-bottom: 16px;
}

.input-label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  background: #F5F7FA;
  border: 1px solid #E8ECF0;
  border-radius: 8px;
  transition: all 0.2s;
}

.input:focus {
  border-color: #007AFF;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

.input::placeholder {
  color: #B8C4CE;
}

.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 18px;
}

.input-with-icon .input {
  padding-left: 46px;
}

.input-right {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.code-btn {
  padding: 8px 12px;
  font-size: 13px;
  color: #007AFF;
  background: #E8F4FF;
  border-radius: 6px;
}

/* ==================== 列表 ==================== */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #F0F4F8;
}

.list-item:first-child {
  border-top: none;
}

.list-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #F0F4F8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.list-item-content {
  flex: 1;
}

.list-item-title {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.list-item-desc {
  font-size: 13px;
  color: #999;
  margin-top: 2px;
}

.list-item-arrow {
  color: #CCC;
  font-size: 18px;
}

/* ==================== 徽章 ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 9px;
  background: #FF3B30;
  color: #fff;
}

.badge-blue {
  background: #007AFF;
}

.badge-green {
  background: #34C759;
}

.badge-orange {
  background: #FF9500;
}

/* ==================== 分割线 ==================== */
.divider {
  height: 1px;
  background: #E8ECF0;
  margin: 16px 0;
}

.divider-v {
  width: 1px;
  height: 100%;
  background: #E8ECF0;
}

/* ==================== 空状态 ==================== */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-text {
  font-size: 14px;
  color: #999;
}

/* ==================== 加载状态 ==================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E8ECF0;
  border-top-color: #007AFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== 弹窗 ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 320px;
  overflow: hidden;
  animation: modalIn 0.25s ease;
}

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

.modal-header {
  padding: 20px 16px 16px;
  text-align: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.modal-body {
  padding: 0 16px 16px;
}

.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid #E8ECF0;
  display: flex;
  gap: 12px;
}

.modal-footer .btn {
  flex: 1;
}

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 300;
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ==================== 头像 ==================== */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

/* ==================== 金币 ==================== */
.coin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.coin-icon {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
}

.coin-value {
  font-size: 14px;
  font-weight: 600;
  color: #FF9500;
}

/* ==================== 标签 ==================== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
}

.tag-blue {
  background: #E8F4FF;
  color: #007AFF;
}

.tag-green {
  background: #E8FEEE;
  color: #34C759;
}

.tag-orange {
  background: #FFF4E8;
  color: #FF9500;
}

.tag-red {
  background: #FFE8E8;
  color: #FF3B30;
}

/* ==================== 进度条 ==================== */
.progress {
  height: 8px;
  background: #E8ECF0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #007AFF, #5856D6);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-success .progress-bar {
  background: linear-gradient(90deg, #34C759, #30D158);
}

/* ==================== 赛事卡片 ==================== */
.match-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.match-league {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #666;
  margin-bottom: 12px;
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.match-team {
  flex: 1;
  text-align: center;
}

.match-team-logo {
  width: 48px;
  height: 48px;
  background: #F0F4F8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 24px;
}

.match-team-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.match-vs {
  padding: 0 16px;
  font-size: 14px;
  color: #999;
  font-weight: 500;
}

.match-time {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.match-odds {
  display: flex;
  gap: 8px;
}

.match-odds-item {
  flex: 1;
  padding: 12px;
  background: #F0F4F8;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.match-odds-item:active {
  background: #E8F4FF;
}

.match-odds-item.selected {
  background: #E8F4FF;
  border: 1px solid #007AFF;
}

.match-odds-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.match-odds-value {
  font-size: 18px;
  font-weight: 600;
  color: #007AFF;
}

/* ==================== Tab 切换 ==================== */
.tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid #E8ECF0;
}

.tab {
  flex: 1;
  padding: 14px 0;
  text-align: center;
  font-size: 15px;
  color: #666;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab.active {
  color: #007AFF;
  border-bottom-color: #007AFF;
}

/* ==================== 工具类 ==================== */
.text-primary { color: #007AFF; }
.text-success { color: #34C759; }
.text-warning { color: #FF9500; }
.text-danger { color: #FF3B30; }
.text-muted { color: #999; }

.bg-primary { background: #007AFF; }
.bg-success { background: #34C759; }
.bg-warning { background: #FF9500; }
.bg-danger { background: #FF3B30; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.ml-2 { margin-left: 8px; }
.mr-2 { margin-right: 8px; }
.mx-4 { margin-left: 16px; margin-right: 16px; }
.my-4 { margin-top: 16px; margin-bottom: 16px; }

.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-full { border-radius: 9999px; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.cursor-pointer { cursor: pointer; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
