/* ROAD TRIP BINGO - MOBILE CASUAL GAME STYLESHEET */

:root {
  --bg-navy-dark: #070D1B;
  --bg-card-dark: #0F172A;
  --bg-card-medium: #1E293B;
  --color-yellow: #FBBF24;
  --color-yellow-light: #FEF08A;
  --color-orange: #F97316;
  --color-green: #10B981;
  --color-blue: #2563EB;
  --color-teal: #0D9488;
  --text-white: #FFFFFF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-navy-dark);
  color: var(--text-white);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  transition: background-image 0.4s ease-in-out;
}

body.main-home-theme, #app.main-home-theme {
  background-image: url('bg_main_home.jpg');
  background-size: cover;
  background-position: center;
}

body.settings-theme, #app.settings-theme {
  background-image: url('bg_settings.jpg');
  background-size: cover;
  background-position: center;
}

body.leaderboard-theme, #app.leaderboard-theme {
  background-image: url('bg_leaderboard.jpg');
  background-size: cover;
  background-position: center;
}

body.stats-theme, #app.stats-theme {
  background-color: #000000;
  background-image: none;
}

#app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

main {
  flex: 1;
  padding: 16px;
  padding-bottom: 104px;
}

/* USER HEADER */
.user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card-dark);
  padding: 6px 14px;
  border-radius: 22px;
  border: 2.5px solid var(--color-yellow);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

.currency-pill {
  background: var(--bg-card-dark);
  padding: 6px 14px;
  border-radius: 18px;
  border: 2px solid var(--color-yellow);
  font-weight: 900;
  color: var(--color-yellow);
  font-size: 13.5px;
}

/* BUTTONS & CARDS */
.btn {
  width: 100%;
  border: none;
  border-radius: 18px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn-mockup-play {
  background: #FFFBEB;
  color: #0F172A;
  border: 2.5px solid #FDE68A;
  font-size: 22px;
  min-height: 68px;
}

.btn-beveled {
  background: var(--color-yellow);
  color: #0F172A;
  border-bottom: 5px solid #D97706;
}

.btn-teal {
  background: var(--color-teal);
  color: white;
  border-bottom: 5px solid #0F766E;
}

.btn-orange {
  background: var(--color-orange);
  color: white;
  border-bottom: 5px solid #C2410C;
}

.btn-outline {
  background: var(--bg-card-medium);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: white;
}

.road-sign-card {
  border-radius: 22px;
  padding: 16px;
  border: 2.5px solid rgba(255,255,255,0.85);
  box-shadow: 0 10px 24px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}

.sign-blue {
  background: linear-gradient(180deg, #2563EB, #1D4ED8);
}

.sign-teal {
  background: linear-gradient(180deg, #0D9488, #0F766E);
}

.sign-badge {
  background: var(--color-orange);
  color: white;
  font-weight: 900;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 8px;
}

.safety-banner-pill {
  background: linear-gradient(90deg, #F97316, #EA580C);
  border: 2px solid rgba(255,255,255,0.8);
  border-radius: 20px;
  padding: 12px 20px;
  text-align: center;
  font-weight: 900;
  font-size: 17px;
  color: white;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.card {
  background: var(--bg-card-medium);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.card-gradient-teal {
  background: linear-gradient(180deg, #0D9488, #1E293B);
  border: 2px solid var(--color-yellow);
}

/* BINGO GAME GRID */
.bingo-header-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

.bingo-h {
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.8);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.h-b { background: linear-gradient(180deg, #EF4444, #B91C1C); }
.h-i { background: linear-gradient(180deg, #F59E0B, #B45309); }
.h-n { background: linear-gradient(180deg, #10B981, #047857); }
.h-g { background: linear-gradient(180deg, #06B6D4, #0E7490); }
.h-o { background: linear-gradient(180deg, #8B5CF6, #6D28D9); }

.bingo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  aspect-ratio: 1;
  width: 100%;
}

.tile {
  background: linear-gradient(180deg, #0284C7, #0369A1, #075985);
  border-radius: 18px;
  border: 2px solid #0284C7;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px;
  font-weight: 900;
  color: white;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.22;
  letter-spacing: 0.8px;
}

.tile::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 4px;
  right: 4px;
  height: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.05));
  border-radius: 16px 16px 8px 8px;
  pointer-events: none;
}

.tile:active {
  transform: scale(0.94);
}

.tile.completed {
  background: linear-gradient(180deg, #4ADE80, #10B981, #047857);
  border-color: #86EFAC;
  transform: scale(1.02);
}

.tile.center {
  background: linear-gradient(180deg, #FFF066, #F59E0B, #D97706);
  border-color: #FDE047;
  color: #0F172A;
  font-size: 13px;
}

/* UNBOUNDED STAR EXPLOSION PARTICLES */
.star-particle {
  position: fixed;
  font-size: 22px;
  pointer-events: none;
  z-index: 9999;
  animation: explodeBurst 0.95s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes explodeBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.3) rotate(360deg);
  }
}

/* PROGRESS BAR */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-card-medium);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-green);
  transition: width 0.3s ease;
}

/* NAVIGATION FOOTER */
.app-footer {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 440px;
  height: 64px;
  background: var(--bg-card-medium);
  border-radius: 28px;
  border: 2px solid rgba(251, 191, 36, 0.8);
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  z-index: 100;
}

.app-footer button {
  background: none;
  border: none;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.app-footer button.active {
  background: var(--color-yellow);
  color: #0F172A;
}

.nav-icon-wrapper {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.back-pill {
  background: var(--bg-card-medium);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
}

.pill-badge-yellow {
  background: var(--color-yellow);
  color: #0F172A;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 8px;
}
