/* =====================================================
   ShadowBet App Shell Styles
   Extends theme.css — do not redefine root variables.
   ===================================================== */

.app-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* === NAV === */
.app-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  height: 60px;
  background: rgba(11, 11, 15, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-brand {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white-glow);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-sports {
  display: flex;
  gap: 4px;
}

.sport-tab {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(234,234,255,0.5);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sport-tab:hover {
  color: var(--white-glow);
  background: rgba(110,68,255,0.08);
}

.sport-tab.active {
  background: rgba(110,68,255,0.15);
  border-color: rgba(110,68,255,0.35);
  color: var(--white-glow);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.wallet-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(76,201,240,0.08);
  border: 1px solid rgba(76,201,240,0.2);
  border-radius: 100px;
  padding: 5px 12px 5px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sky-blue);
}

.coin-icon { font-size: 1rem; }

.daily-btn {
  background: linear-gradient(135deg, var(--ghost-purple), var(--sky-blue));
  border: none;
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.daily-btn:hover { opacity: 0.85; }
.daily-btn:disabled { opacity: 0.35; cursor: default; }

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(234,234,255,0.6);
}

/* === MAIN LAYOUT === */
.app-main {
  flex: 1;
  position: relative;
}

/* === AUTH GATE === */
.auth-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(20px);
}

.auth-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth-sub {
  font-size: 0.9rem;
  color: rgba(234,234,255,0.5);
  margin-bottom: 28px;
  line-height: 1.6;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: rgba(234,234,255,0.45);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.auth-tab.active {
  color: var(--white-glow);
  border-bottom-color: var(--ghost-purple);
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(234,234,255,0.55);
  text-transform: uppercase;
}

.form-group input {
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(110,68,255,0.2);
  border-radius: 10px;
  color: var(--white-glow);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: rgba(110,68,255,0.5);
}

.form-error {
  font-size: 0.82rem;
  color: #ff6b6b;
  min-height: 18px;
}

.btn-primary {
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--ghost-purple), #8b68ff);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-full { width: 100%; }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(110,68,255,0.25);
  border-radius: 8px;
  color: rgba(234,234,255,0.55);
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  border-color: rgba(110,68,255,0.5);
  color: var(--white-glow);
}

.btn-sm { padding: 5px 12px; font-size: 0.8rem; }

.hidden { display: none !important; }

/* === APP CONTENT LAYOUT === */
#appContent {
  display: flex;
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* === GAMES COLUMN === */
.games-col {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(110,68,255,0.3) transparent;
}

.games-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sport-label {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ff4444;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #ff4444;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loading-state {
  color: rgba(234,234,255,0.4);
  text-align: center;
  padding: 40px;
  font-size: 0.9rem;
}

/* === GAME CARD === */
.game-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px 20px;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s;
}

.game-card:hover { border-color: rgba(110,68,255,0.3); }

.game-time {
  font-size: 0.72rem;
  color: rgba(234,234,255,0.4);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.game-matchup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}

.team-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  flex: 1;
  line-height: 1.3;
}

.matchup-vs {
  font-size: 0.7rem;
  color: rgba(234,234,255,0.3);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.odds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.odds-group { display: flex; flex-direction: column; gap: 4px; }

.odds-label {
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(234,234,255,0.35);
  margin-bottom: 2px;
}

.odds-pair { display: flex; gap: 4px; }

.odds-btn {
  flex: 1;
  background: rgba(110,68,255,0.07);
  border: 1px solid rgba(110,68,255,0.12);
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Space Grotesk', sans-serif;
}

.odds-btn:hover {
  background: rgba(110,68,255,0.18);
  border-color: rgba(110,68,255,0.35);
}

.odds-btn.selected {
  background: rgba(110,68,255,0.28);
  border-color: var(--ghost-purple);
  box-shadow: 0 0 12px rgba(110,68,255,0.25);
}

.odds-team {
  display: block;
  font-size: 0.62rem;
  color: rgba(234,234,255,0.45);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
  margin-left: auto;
  margin-right: auto;
}

.odds-value {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white-glow);
}

.odds-value.pos { color: #4ade80; }
.odds-value.neg { color: var(--sky-blue); }

/* === BET SLIP === */
.bet-slip {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  background: rgba(11,11,15,0.7);
}

.slip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.slip-header h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.clear-slip {
  background: transparent;
  border: none;
  color: rgba(234,234,255,0.35);
  font-size: 0.78rem;
  cursor: pointer;
  transition: color 0.2s;
}

.clear-slip:hover { color: rgba(234,234,255,0.7); }

.slip-selections {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slip-empty {
  text-align: center;
  color: rgba(234,234,255,0.3);
  font-size: 0.85rem;
  padding: 30px 20px;
  line-height: 1.6;
}

/* Individual slip item */
.slip-item {
  background: rgba(110,68,255,0.08);
  border: 1px solid rgba(110,68,255,0.18);
  border-radius: 10px;
  padding: 12px;
  position: relative;
}

.slip-item-matchup {
  font-size: 0.78rem;
  color: rgba(234,234,255,0.55);
  margin-bottom: 4px;
}

.slip-item-pick {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.slip-item-odds {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sky-blue);
}

.slip-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: rgba(234,234,255,0.3);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  transition: color 0.2s;
}

.slip-remove:hover { color: #ff6b6b; }

.slip-footer {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stake-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stake-row label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(234,234,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.stake-row input {
  width: 120px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(110,68,255,0.25);
  border-radius: 8px;
  color: var(--white-glow);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  outline: none;
}

.stake-row input:focus { border-color: rgba(110,68,255,0.5); }

.payout-preview {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(234,234,255,0.5);
}

.payout-num {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #4ade80;
}

/* === MY BETS PANEL === */
.my-bets-panel {
  position: fixed;
  top: 60px;
  right: 0;
  width: 360px;
  height: calc(100vh - 60px);
  background: rgba(11,11,15,0.97);
  border-left: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-header h3 { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; }

.panel-close {
  background: transparent;
  border: none;
  color: rgba(234,234,255,0.4);
  cursor: pointer;
  font-size: 1rem;
}

.bets-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bet-item {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
}

.bet-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.bet-status {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
}

.bet-status.pending { background: rgba(255,200,0,0.15); color: #ffc107; }
.bet-status.won { background: rgba(74,222,128,0.15); color: #4ade80; }
.bet-status.lost { background: rgba(255,107,107,0.15); color: #ff6b6b; }

.bet-matchup {
  font-size: 0.8rem;
  color: rgba(234,234,255,0.55);
  margin-bottom: 4px;
}

.bet-pick { font-size: 0.88rem; font-weight: 600; }

.bet-coins {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(234,234,255,0.45);
  margin-top: 6px;
}

.bet-coins span:last-child { color: #4ade80; font-weight: 600; }

/* === FAB === */
.fab-bets {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, var(--ghost-purple), var(--sky-blue));
  border: none;
  border-radius: 100px;
  padding: 12px 20px;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(110,68,255,0.4);
  z-index: 150;
  transition: transform 0.2s, box-shadow 0.2s;
}

.fab-bets:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(110,68,255,0.5);
}

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(42,42,53,0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white-glow);
  z-index: 999;
  backdrop-filter: blur(12px);
  animation: toastIn 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.toast.success { border-color: rgba(74,222,128,0.4); color: #4ade80; }
.toast.error { border-color: rgba(255,107,107,0.4); color: #ff6b6b; }

@keyframes toastIn {
  from { opacity: 0; bottom: 60px; }
  to { opacity: 1; bottom: 80px; }
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .bet-slip { width: 260px; }
}

@media (max-width: 720px) {
  #appContent { flex-direction: column; height: auto; overflow: visible; }
  .bet-slip { width: 100%; border-left: none; border-top: 1px solid var(--border-subtle); }
  .games-col { height: auto; overflow: visible; }
  .my-bets-panel { width: 100%; }
  .nav-sports { gap: 2px; }
  .sport-tab { padding: 5px 10px; font-size: 0.8rem; }
  .nav-user span { display: none; }
}

@media (max-width: 480px) {
  .app-nav { padding: 0 12px; gap: 8px; }
  .wallet-chip { padding: 4px 10px; font-size: 0.8rem; }
  .auth-card { padding: 28px 20px; }
}
