/* SportyBet 风格 — 深绿 + 深色顶栏 */
:root {
  --mg-primary: #0D9737;
  --mg-primary-dark: #0a7a2c;
  --mg-primary-light: #2db84d;
  --mg-bg: #f2f2f2;
  --mg-bg-alt: #e8f5ec;
  --mg-surface: #FFFFFF;
  --mg-surface-alt: #f7f7f7;
  --mg-surface-muted: #fafafa;
  --mg-text-strong: #1a1a1a;
  --mg-text: #333333;
  --mg-text-muted: #666666;
  --mg-text-light: #999999;
  --mg-border: #e0e0e0;
  --mg-border-light: #eeeeee;
  --mg-success: #0D9737;
  --mg-danger: #e21b23;
  --mg-warning: #f5a623;
  --mg-gradient: linear-gradient(135deg, #0D9737 0%, #0a7a2c 100%);
  --mg-gradient-btn: linear-gradient(180deg, #2db84d 0%, #0D9737 50%, #0a7a2c 100%);
  --mg-shadow: 0 2px 12px rgba(13, 151, 55, 0.15);
  --mg-shadow-card: 0 1px 4px rgba(0, 0, 0, 0.08);
  --mg-header-h: 52px;
  --mg-tabbar-h: 58px;
  --mg-radius: 10px;
  --mg-radius-sm: 6px;
  --mg-header-bg: #1a1a1a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  -webkit-text-size-adjust: none;
  font-size: 16px;
}

body.mg-app {
  font-family: PingFangSC-Regular, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: var(--mg-bg);
  color: var(--mg-text-strong);
  line-height: 1.5;
  min-height: 100vh;
  padding-top: var(--mg-header-h);
  padding-bottom: calc(var(--mg-tabbar-h) + 8px);
}

a { color: var(--mg-primary); text-decoration: none; }
a:hover { color: var(--mg-primary-dark); }

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 12px;
}

.mg-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px;
}

/* ===== 顶部栏 ===== */
.mg-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--mg-header-h);
  background: var(--mg-header-bg);
  border-bottom: none;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.mg-header-inner {
  max-width: 720px;
  margin: 0 auto;
  height: 100%;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mg-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.mg-brand-icon {
  width: 30px;
  height: 30px;
  background: var(--mg-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  font-weight: 900;
}

.mg-brand-text {
  color: #fff;
}

.mg-brand-text em {
  color: var(--mg-primary-light);
  font-style: normal;
}

.mg-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mg-balance {
  background: rgba(13, 151, 55, 0.2);
  border: 1px solid var(--mg-primary);
  color: var(--mg-primary-light);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.mg-user-name {
  font-size: 0.8rem;
  color: #ccc;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mg-header-link {
  color: var(--mg-primary-light);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border: 1px solid rgba(45, 184, 77, 0.5);
  border-radius: 16px;
  white-space: nowrap;
}

.mg-header-link:hover {
  background: rgba(13, 151, 55, 0.15);
  color: #fff;
}

/* 旧 navbar 隐藏（admin 等页可能仍用） */
.navbar { display: none; }

/* ===== 底部导航 ===== */
.mg-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mg-tabbar-h);
  background: var(--mg-surface);
  border-top: 1px solid var(--mg-border);
  display: flex;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(48, 52, 66, 0.06);
}

.mg-tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--mg-text-muted);
  font-size: 0.7rem;
  padding: 6px 0;
  transition: color 0.2s;
}

.mg-tabbar-item .mg-tab-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.mg-tabbar-item.active {
  color: var(--mg-primary);
  font-weight: 600;
}

.mg-tabbar-item.active .mg-tab-icon {
  transform: scale(1.05);
}

/* ===== 首页轮播 ===== */
.mg-carousel {
  position: relative;
  border-radius: var(--mg-radius);
  overflow: hidden;
  margin-bottom: 10px;
  background: var(--mg-surface);
  box-shadow: var(--mg-shadow-card);
  aspect-ratio: 16 / 7;
  min-height: 140px;
}

.mg-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.mg-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.mg-carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.mg-carousel-link {
  display: block;
  width: 100%;
  height: 100%;
}

.mg-carousel-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.mg-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--mg-text-strong);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  opacity: 0.85;
}

.mg-carousel-prev { left: 6px; }
.mg-carousel-next { right: 6px; }

.mg-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 6px;
  align-items: center;
}

.mg-carousel-dot {
  width: 16px;
  height: 4px;
  border: none;
  border-radius: 2px;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 0;
  transition: all 0.25s;
}

.mg-carousel-dot.active {
  width: 24px;
  background: var(--mg-primary);
}

/* ===== 公告栏 ===== */
.mg-notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #f7faff 0%, #edf4ff 100%);
  border: 1px solid var(--mg-border);
  border-radius: var(--mg-radius-sm);
  padding: 8px 10px;
  margin-bottom: 12px;
  min-height: 40px;
}

.mg-notice-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.mg-notice-marquee {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.mg-notice-marquee-inner {
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--mg-text);
  animation: mg-marquee 28s linear infinite;
}

@keyframes mg-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.mg-notice-more {
  flex-shrink: 0;
  border: none;
  background: var(--mg-primary);
  color: #fff;
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
}

.mg-notice-list {
  display: grid;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
}

.mg-notice-item {
  padding: 12px;
  background: var(--mg-surface-alt);
  border-radius: var(--mg-radius-sm);
  border: 1px solid var(--mg-border);
}

.mg-notice-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--mg-text-strong);
  margin-bottom: 6px;
}

.mg-notice-item-body {
  font-size: 0.8rem;
  color: var(--mg-text-muted);
  line-height: 1.5;
}

.modal-content-wide {
  max-width: 480px;
}

/* ===== 按钮 ===== */
.btn {
  padding: 10px 18px;
  border: none;
  border-radius: var(--mg-radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: var(--mg-gradient-btn);
  color: #fff;
  box-shadow: 0 4px 6px rgba(76, 150, 255, 0.2);
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--mg-success);
  color: #fff;
}

.btn-danger {
  background: var(--mg-danger);
  color: #fff;
  font-size: 0.8rem;
  padding: 6px 12px;
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-full { width: 100%; padding: 12px; }
.btn-lg { padding: 12px 24px; font-size: 1rem; border-radius: var(--mg-radius); }

/* ===== 首页横幅 ===== */
.mg-banner {
  background: var(--mg-gradient);
  border-radius: var(--mg-radius);
  padding: 20px 16px;
  color: #fff;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.mg-banner::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
}

.mg-banner h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.mg-banner p {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-bottom: 12px;
}

.mg-banner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mg-tag {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
}

/* ===== 统计卡片 ===== */
.mg-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.mg-stat-card {
  background: var(--mg-surface);
  border-radius: var(--mg-radius-sm);
  padding: 12px 8px;
  text-align: center;
  border: 1px solid var(--mg-border);
  box-shadow: var(--mg-shadow-card);
}

.mg-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--mg-primary);
}

.mg-stat-label {
  font-size: 0.7rem;
  color: var(--mg-text-muted);
  margin-top: 4px;
}

/* ===== 区块标题 ===== */
.mg-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 2px;
}

.mg-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mg-text-strong);
}

.mg-section-link {
  font-size: 0.8rem;
  color: var(--mg-primary);
}

/* ===== 赛事卡片 ===== */
.match-grid {
  display: grid;
  gap: 10px;
}

.match-card {
  background: var(--mg-surface);
  border-radius: var(--mg-radius);
  padding: 14px;
  border: 1px solid var(--mg-border);
  box-shadow: var(--mg-shadow-card);
  transition: box-shadow 0.2s;
}

.match-card:hover {
  box-shadow: var(--mg-shadow);
}

.match-league {
  color: var(--mg-primary);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

.match-team {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mg-text-strong);
  flex: 1;
  min-width: 0;
}

.match-team.home { text-align: left; }
.match-team.away { text-align: right; }

.match-vs {
  color: var(--mg-text-muted);
  font-size: 0.8rem;
  padding: 4px 10px;
  background: var(--mg-surface-alt);
  border-radius: 20px;
  flex-shrink: 0;
}

.match-time {
  color: var(--mg-text-muted);
  font-size: 0.75rem;
  margin-bottom: 10px;
}

/* ===== 赔率按钮 ===== */
.odds-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.odds-row-4 { grid-template-columns: repeat(4, 1fr); }

.odds-btn {
  background: var(--mg-surface-alt);
  border: 1px solid var(--mg-border);
  border-radius: var(--mg-radius-sm);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--mg-text-strong);
}

.odds-btn:hover,
.odds-btn:active {
  background: #e8f5ec;
  border-color: var(--mg-primary-light);
}

.odds-btn.selected {
  background: var(--mg-primary);
  border-color: var(--mg-primary);
  color: #fff;
}

.odds-label {
  font-size: 0.7rem;
  color: var(--mg-text-muted);
  margin-bottom: 4px;
}

.odds-btn.selected .odds-label { color: rgba(255,255,255,0.85); }

.odds-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--mg-primary);
}

.odds-btn.selected .odds-value { color: #fff; }

.live-badge {
  background: var(--mg-danger);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  animation: mg-pulse 2s infinite;
}

@keyframes mg-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* ===== 赛事页 ===== */
.mg-page-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--mg-text-strong);
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--mg-text-muted);
  font-size: 0.75rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.mg-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.mg-filter-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid var(--mg-border);
  background: var(--mg-surface);
  color: var(--mg-text-muted);
  cursor: pointer;
}

.mg-filter-tab.active {
  background: var(--mg-primary);
  border-color: var(--mg-primary);
  color: #fff;
  font-weight: 600;
}

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-bar select {
  padding: 8px 12px;
  border: 1px solid var(--mg-border);
  border-radius: var(--mg-radius-sm);
  background: var(--mg-surface);
  color: var(--mg-text);
  font-size: 0.85rem;
  width: auto;
  min-width: 120px;
  margin-bottom: 0;
}

.match-count-hint {
  color: var(--mg-text-muted);
  font-size: 0.75rem;
}

.match-group { margin-bottom: 16px; }

.match-group-title {
  font-size: 0.9rem;
  color: var(--mg-text-strong);
  font-weight: 700;
  margin-bottom: 10px;
  padding-left: 8px;
  border-left: 3px solid var(--mg-primary);
}

.match-group-list { display: grid; gap: 10px; }

.sport-tag {
  background: var(--mg-surface-alt);
  color: var(--mg-primary);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--mg-border);
}

.league-tag {
  background: #EDF4FF;
  color: var(--mg-primary-dark);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.match-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.match-time-inline {
  color: var(--mg-text-muted);
  font-size: 0.7rem;
  margin-left: auto;
}

.odds-section { margin-top: 8px; }

.odds-section-title {
  font-size: 0.72rem;
  color: var(--mg-text-muted);
  margin-bottom: 6px;
  padding-left: 6px;
  border-left: 2px solid var(--mg-primary-light);
}

.match-card-wc .odds-row { margin-top: 0; }

.empty-hint {
  color: var(--mg-text-muted);
  padding: 32px 16px;
  text-align: center;
  background: var(--mg-surface);
  border-radius: var(--mg-radius);
  border: 1px dashed var(--mg-border);
  font-size: 0.9rem;
}

.match-ended-hint {
  color: var(--mg-text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

/* ===== 个人中心 ===== */
.mg-profile-header {
  background: var(--mg-gradient);
  border-radius: var(--mg-radius);
  padding: 20px 16px;
  color: #fff;
  margin-bottom: 12px;
}

.mg-profile-header h2 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.mg-profile-balance {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.mg-profile-meta {
  font-size: 0.8rem;
  opacity: 0.9;
}

.mg-deposit-card {
  background: var(--mg-surface);
  border-radius: var(--mg-radius);
  padding: 14px;
  border: 1px solid var(--mg-border);
  margin-bottom: 12px;
  box-shadow: var(--mg-shadow-card);
}

.mg-deposit-card h3 {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: var(--mg-text-strong);
}

.mg-deposit-card form {
  display: flex;
  gap: 8px;
}

.mg-deposit-card input {
  flex: 1;
  margin-bottom: 0;
}

.profile-section { margin-bottom: 16px; }

.profile-card {
  background: var(--mg-surface);
  border-radius: var(--mg-radius);
  padding: 16px;
  border: 1px solid var(--mg-border);
}

.profile-card h2 { color: var(--mg-primary); margin-bottom: 8px; }

.balance { font-size: 1.25rem; color: var(--mg-success); margin-bottom: 8px; }

.deposit-box {
  background: var(--mg-surface);
  border-radius: var(--mg-radius);
  padding: 16px;
  border: 1px solid var(--mg-border);
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  background: var(--mg-surface);
  border-radius: var(--mg-radius-sm);
  border: 1px solid var(--mg-border);
  overflow: hidden;
}

.tabs button {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  color: var(--mg-text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  border-bottom: 2px solid transparent;
}

.tabs button.active {
  color: var(--mg-primary);
  border-bottom-color: var(--mg-primary);
  font-weight: 600;
  background: var(--mg-surface-alt);
}

/* ===== Modal ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal.show { display: flex; }

.modal-content {
  background: var(--mg-surface);
  border-radius: var(--mg-radius);
  padding: 24px 20px;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.modal-content h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--mg-text-strong);
}

.close {
  position: absolute;
  right: 14px;
  top: 12px;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--mg-text-muted);
  line-height: 1;
}

.close:hover { color: var(--mg-text-strong); }

/* ===== Forms ===== */
input, select {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--mg-border);
  border-radius: var(--mg-radius-sm);
  background: var(--mg-surface-alt);
  color: var(--mg-text-strong);
  font-size: 0.9rem;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--mg-primary);
  background: var(--mg-surface);
}

input::placeholder { color: var(--mg-text-light); }

.auth-form { margin-top: 12px; }

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: var(--mg-radius-sm);
  overflow: hidden;
  border: 1px solid var(--mg-border);
}

.auth-tabs button {
  flex: 1;
  padding: 10px;
  background: var(--mg-surface-alt);
  border: none;
  color: var(--mg-text-muted);
  cursor: pointer;
  font-size: 0.9rem;
}

.auth-tabs button.active {
  background: var(--mg-primary);
  color: #fff;
  font-weight: 600;
}

/* ===== Tables ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  background: var(--mg-surface);
  border-radius: var(--mg-radius-sm);
  overflow: hidden;
}

.table th, .table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--mg-border-light);
}

.table th {
  background: var(--mg-surface-alt);
  color: var(--mg-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.table tr:last-child td { border-bottom: none; }

/* ===== Badges ===== */
.badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-pending { background: #FFF9EB; color: #FF7D52; }
.badge-won { background: #DEFDD8; color: var(--mg-success); }
.badge-lost { background: #FFEDDC; color: var(--mg-danger); }
.badge-open { background: #EDF4FF; color: var(--mg-primary); }
.badge-drawn { background: #E1E8FE; color: #6A82F9; }
.badge-active { background: #DEFDD8; color: var(--mg-success); }
.badge-disabled { background: #FFEDDC; color: var(--mg-danger); }
.badge-cancelled { background: var(--mg-surface-alt); color: var(--mg-text-muted); }

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 16px;
  color: var(--mg-text-muted);
  font-size: 0.75rem;
  margin-top: 16px;
}

/* ===== Admin / legacy ===== */
.card {
  background: var(--mg-surface);
  border-radius: var(--mg-radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--mg-border);
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.dash-card {
  background: var(--mg-surface);
  border-radius: var(--mg-radius-sm);
  padding: 16px;
  border: 1px solid var(--mg-border);
  text-align: center;
}

.dash-card .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--mg-primary);
}

.dash-card .label {
  color: var(--mg-text-muted);
  font-size: 0.75rem;
  margin-top: 4px;
}

.login-box {
  max-width: 400px;
  margin: 40px auto;
  background: var(--mg-surface);
  padding: 32px;
  border-radius: var(--mg-radius);
  border: 1px solid var(--mg-border);
  text-align: center;
}

.login-box h2 { margin-bottom: 20px; color: var(--mg-primary); }

.settings-form {
  max-width: 520px;
  display: grid;
  gap: 12px;
}

.settings-form label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--mg-text);
}

.settings-form input[type="text"],
.settings-form input[type="number"] {
  flex: 1;
  max-width: 200px;
  margin-bottom: 0;
}

.settings-form input[type="checkbox"] { width: auto; margin-bottom: 0; }

/* legacy hero (hidden on new home) */
.hero, .world-cup-banner { display: none; }

.lottery-card, .lottery-grid { display: none; }

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .mg-main, .mg-header-inner { max-width: 960px; }
  .match-grid { grid-template-columns: repeat(2, 1fr); }
  body.mg-app { padding-bottom: 0; }
  .mg-tabbar { display: none; }
}

@media (max-width: 380px) {
  .odds-row-4 { grid-template-columns: repeat(2, 1fr); }
  .odds-row { grid-template-columns: repeat(3, 1fr); }
}

/* ===== SportyBet 引流组件 ===== */
.sb-sport-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  margin-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sb-sport-pills::-webkit-scrollbar { display: none; }

.sb-sport-pill {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--mg-surface);
  border: 1px solid var(--mg-border);
  color: var(--mg-text);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.sb-sport-pill.active {
  background: var(--mg-primary);
  border-color: var(--mg-primary);
  color: #fff;
}
.sb-sport-pill-promo {
  background: linear-gradient(135deg, #1a1a1a, #333);
  border-color: var(--mg-primary);
  color: var(--mg-primary-light);
}

.sb-promo-card {
  display: block;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a3d1c 100%);
  border-radius: var(--mg-radius);
  padding: 16px;
  margin-bottom: 12px;
  color: #fff;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(13, 151, 55, 0.4);
}
.sb-promo-card::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 100px;
  height: 100px;
  background: rgba(13, 151, 55, 0.2);
  border-radius: 50%;
}
.sb-promo-card-badge {
  display: inline-block;
  background: var(--mg-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  margin-bottom: 8px;
}
.sb-promo-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.sb-promo-card-desc {
  font-size: 0.75rem;
  color: #ccc;
  margin-bottom: 10px;
  line-height: 1.4;
}
.sb-promo-card-cta {
  font-size: 0.8rem;
  color: var(--mg-primary-light);
  font-weight: 700;
}

.sb-promo-profile {
  background: var(--mg-surface);
  border: 1px solid var(--mg-border);
  border-radius: var(--mg-radius);
  padding: 16px;
  margin-bottom: 16px;
}
.sb-promo-profile h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--mg-text-strong);
}
.sb-promo-profile p {
  font-size: 0.8rem;
  color: var(--mg-text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.sb-promo-profile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sb-promo-strip {
  position: fixed;
  bottom: calc(var(--mg-tabbar-h) + 8px);
  left: 12px;
  right: 12px;
  max-width: 696px;
  margin: 0 auto;
  z-index: 999;
  display: flex;
  align-items: center;
  background: #1a1a1a;
  border: 1px solid var(--mg-primary);
  border-radius: 24px;
  padding: 8px 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: sb-slide-up 0.4s ease;
}
.sb-promo-strip.hidden { display: none; }
.sb-promo-strip a {
  flex: 1;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sb-promo-strip-dot {
  width: 8px;
  height: 8px;
  background: var(--mg-primary-light);
  border-radius: 50%;
  animation: mg-pulse 1.5s infinite;
  flex-shrink: 0;
}
.sb-promo-strip-close {
  border: none;
  background: none;
  color: #888;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
@keyframes sb-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sb-bet-success-modal { text-align: center; }
.sb-bet-success-icon {
  width: 48px;
  height: 48px;
  background: var(--mg-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 12px;
}

@media (min-width: 768px) {
  .sb-promo-strip { bottom: 16px; }
}
