/* ============================================================
   App Layout & Components — Premium Black & Red
   ============================================================ */

.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg-surface);
  box-shadow: 0 0 60px rgba(200,16,46,0.08);
  padding-bottom: 90px;
}

/* ── Top Header ── */
.header-top {
  position: sticky; top: 0; z-index: 50;
  padding: 12px 16px;
  background: rgba(6, 3, 4, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(200,16,46,0.12);
  display: flex; justify-content: space-between; align-items: center;
}
.header-logo img { height: 30px; width: auto; }
.header-user-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(232,197,71,0.08);
  border: 1px solid rgba(232,197,71,0.2);
  padding: 5px 10px; border-radius: var(--radius-pill);
  font-size: 0.8rem; font-weight: 500;
}
.header-user-badge i { color: var(--gold); font-size: 0.85rem; }
.header-balance {
  color: var(--gold); font-weight: 700;
  font-family: 'Space Grotesk', sans-serif; letter-spacing: 0.03em;
}

/* ── Main Content ── */
.main-content { padding: 16px; }

.section-title {
  font-size: 1.25rem; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.section-title i { color: var(--red-bright); }

/* ── Cards ── */
.card-dark {
  background: linear-gradient(180deg, rgba(30,8,14,0.9) 0%, rgba(10,4,6,0.95) 100%);
  border-radius: var(--radius-md); border: var(--border-glass);
  padding: 18px; margin-bottom: 14px; position: relative; overflow: hidden;
}
.card-dark::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--grad-primary); opacity: 0.6;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 0.9rem; transition: all 0.2s; width: 100%;
}
.btn-red {
  background: var(--grad-primary); color: var(--gold);
  border: 1.5px solid rgba(232,197,71,0.3); box-shadow: var(--shadow-red);
}
.btn-red:active { transform: scale(0.97); }
.btn-outline {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(232,197,71,0.2); color: var(--gold);
}
.btn-outline:active { background: rgba(232,197,71,0.06); }

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(6, 3, 4, 0.9);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(200,16,46,0.18);
  display: flex; justify-content: space-around; align-items: flex-end;
  padding: 8px 8px 18px; z-index: 100;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted); font-size: 0.65rem; font-weight: 500; flex: 1;
  padding: 6px 0; transition: color 0.3s;
}
.nav-item i { font-size: 1.15rem; transition: all 0.3s; }
.nav-item.active { color: var(--gold); }
.nav-item.active i {
  color: var(--gold); transform: translateY(-2px);
  filter: drop-shadow(0 0 6px rgba(232,197,71,0.4));
}

/* Play Button */
.nav-play-wrap {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.nav-play-btn {
  position: relative; top: -24px; width: 72px; height: 72px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,16,46,0.4) 0%, rgba(10,4,6,0.8) 80%);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(200,16,46,0.6); transition: transform 0.2s;
  box-shadow: 0 0 40px rgba(200,16,46,0.9), inset 0 0 20px rgba(200,16,46,0.6);
  z-index: 10;
}
.nav-play-btn img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(200,16,46,1)); transform: scale(1.15); }
.nav-play-btn:active { transform: scale(0.92); }
.nav-play-label {
  color: var(--gold); font-size: 0.68rem; font-weight: 700;
  margin-top: -16px; position: relative; z-index: 11;
  text-shadow: 0 0 8px rgba(232,197,71,0.6);
}

/* ── Forms ── */
.input-glass {
  width: 100%; background: rgba(0,0,0,0.4);
  border: 1px solid rgba(232,197,71,0.15); padding: 12px 14px;
  border-radius: var(--radius-sm); color: #fff; font-family: inherit;
  font-size: 0.9rem; outline: none; transition: border-color 0.2s;
}
.input-glass:focus { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }

/* ── Match Table ── */
.table-shell {
  width: 100%;
  overflow-x: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}
.match-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.72rem;
  table-layout: fixed;
}
.match-table th {
  background: linear-gradient(180deg, rgba(200,16,46,0.15) 0%, rgba(30,8,14,0.8) 100%);
  color: var(--gold);
  font-weight: 700;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(232,197,71,0.25);
  text-align: center;
  white-space: nowrap;
  font-size: 0.7rem;
}
.match-table td {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #f8fafc;
  vertical-align: middle;
  background: rgba(10, 4, 6, 0.7);
  text-align: center;
  word-break: break-word;
}
.match-table tbody tr:nth-child(even) td {
  background: rgba(20, 8, 12, 0.85);
}
.match-table tr:hover td {
  background: rgba(40, 16, 24, 0.9);
}
.match-table tbody tr:last-child td {
  border-bottom: none;
}

/* Football table column widths */
.football-table th:nth-child(1),
.football-table td:nth-child(1) { width: 14%; }
.football-table th:nth-child(2),
.football-table td:nth-child(2) { width: 46%; text-align: left; }
.football-table th:nth-child(3),
.football-table td:nth-child(3) { width: 18%; }
.football-table th:nth-child(4),
.football-table td:nth-child(4) { width: 22%; }

/* Boxing table column widths */
.boxing-table th:nth-child(1),
.boxing-table td:nth-child(1) { width: 12%; }
.boxing-table th:nth-child(2),
.boxing-table td:nth-child(2) { width: 30%; text-align: left; }
.boxing-table th:nth-child(3),
.boxing-table td:nth-child(3) { width: 26%; }
.boxing-table th:nth-child(4),
.boxing-table td:nth-child(4) { width: 32%; text-align: left; }
.team-cell {
  min-width: 0;
}
.team-line {
  display: flex;
  align-items: center;
  gap: 5px;
}
.team-line + .team-line {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed rgba(255,255,255,0.12);
}
.team-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 1px;
  flex: 0 0 16px;
}
.team-name {
  color: #fff;
  font-weight: 600;
  line-height: 1.25;
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.team-name-away {
  color: #dbeafe;
}
.time-chip {
  display: inline-block;
  text-align: center;
  padding: 3px 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.1);
  font-weight: 700;
  font-size: 0.68rem;
}
.match-score { color: var(--gold); font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.match-score-box {
  display: inline-block;
  text-align: center;
  padding: 4px 6px;
  border-radius: 6px;
  background: #111827;
  border: 1px solid rgba(250, 204, 21, 0.35);
  color: #facc15;
  font-weight: 700;
  font-size: 0.72rem;
  font-family: 'Space Grotesk', sans-serif;
}
.odds-chip {
  display: inline-block;
  text-align: center;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(200,16,46,0.15);
  color: #fca5a5;
  border: 1px solid rgba(200,16,46,0.3);
  font-weight: 700;
  font-size: 0.68rem;
  word-break: break-all;
}
.match-live { color: var(--red-bright); font-weight: 700; font-size: 0.7rem; }

/* ── Boxing Card ── */
.boxing-fight {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.boxing-fight:last-child { border-bottom: none; }
.fighter-name { font-size: 0.7rem; font-weight: 600; word-break: break-word; line-height: 1.3; }
.fighter-red { color: #fecaca; text-align: left; min-width: 0; }
.fighter-blue { color: #bfdbfe; text-align: left; min-width: 0; }
.fight-result {
  text-align: center; min-width: 0; font-size: 0.65rem;
  font-weight: 600; color: var(--gold); padding: 4px 6px;
  background: rgba(232,197,71,0.08); border-radius: var(--radius-pill);
}
.event-row td {
  background: linear-gradient(90deg, rgba(232,197,71,0.15) 0%, rgba(10,4,6,0.9) 100%) !important;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.7rem;
  border-bottom: 1px solid rgba(232,197,71,0.3) !important;
}
.result-chip {
  display: inline-block;
  text-align: center;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255,255,255,0.15);
  font-weight: 700;
  font-size: 0.65rem;
}
.weight-chip {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #cbd5e1;
  font-size: 0.6rem;
}
.boxing-odds {
  min-width: 0;
  font-size: 0.68rem;
}

/* ── Lotto Styles ── */
.lotto-table th,
.lotto-table td {
  font-size: 0.76rem;
}
.lotto-table td {
  white-space: nowrap;
}
.lotto-highlight-row td {
  background: linear-gradient(135deg, rgba(200,16,46,0.18), rgba(232,197,71,0.12)) !important;
}
.lotto-last2 {
  min-width: 48px;
}
.lotto-prize-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; margin-bottom: 6px; background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.04);
}
.lotto-prize-label { color: var(--text-muted); font-size: 0.8rem; }
.lotto-prize-value {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem;
  font-weight: 700; color: var(--gold); letter-spacing: 0.1em;
}
.lotto-prize-row.prize-first {
  background: linear-gradient(135deg, rgba(200,16,46,0.06), rgba(232,197,71,0.06));
  border-color: rgba(232,197,71,0.2);
}
.lotto-prize-row.prize-first .lotto-prize-label { color: var(--gold); font-weight: 700; }
.lotto-prize-row.prize-first .lotto-prize-value { font-size: 1.4rem; color: #fde047; }

.tip-hot-ball {
  width: 48px; height: 48px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fde047 0%, #eab308 40%, #a16207 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 700;
  color: #1a1a1a; box-shadow: 0 0 18px rgba(234,179,8,0.25);
}
.tip-ticket {
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(200,16,46,0.1), rgba(232,197,71,0.1));
  border: 1px solid rgba(232,197,71,0.3); color: var(--gold);
  font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem;
  font-weight: 700; letter-spacing: 0.12em;
}

/* ── Loading ── */
.loader-spinner {
  width: 24px; height: 24px;
  border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--red-bright);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Animations ── */
.tab-content { display: none; }
.tab-content.active { display: block; animation: slideUp 0.35s ease-out forwards; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.hover-lift { transition: transform 0.2s, box-shadow 0.2s; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

@keyframes pulseRed {
  0% { box-shadow: 0 0 12px rgba(200,16,46,0.3); }
  50% { box-shadow: 0 0 22px rgba(200,16,46,0.5); }
  100% { box-shadow: 0 0 12px rgba(200,16,46,0.3); }
}
.pulse-red { animation: pulseRed 2.5s infinite; }
