:root{
  /* palette derived from the MAD logo */
  --bg: #0b0420; /* deep purple */
  --purple: #3A0F8E;
  --purple-2: #120936;
  --accent: #FF8C2B; /* orange */
  --accent-2: #FFB84D; /* light orange */
  --muted: #9aa6b0;
  --card-top: #141126;
  --card-bottom: #0f0a1a;
  --phone-top: #21143a;
  --phone-bottom: #120926;
  --nav-h: 48px;
}

html, body {
  margin: 0;
  padding: 0;
}

/* ensure header sits at the very top (remove any accidental gap) */
.site-header { margin-top: 0 }

body {
  font-family: Arial, sans-serif;
  /* restore original deep purple page background */
  background: var(--bg);
  color: #fff;
  /* reserve space for the fixed header so content isn't hidden */
  padding-top: 220px;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 18px }

.site-header { padding: 28px 0 8px }
.site-header h1 { margin: 0; font-size: 28px; color: #e6eef7 }
.site-header .subtitle { margin: 6px 0 0; color: #9aa6b0 }

/* hero header with background image */
.site-header.site-hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1300;
  padding: 0;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background image with dark overlay (image sits behind overlay) */
  background-color: rgba(4,3,10,0.95); /* fallback */
  background-image: url('../img/headerballistic.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  color: #fff;
}
.site-header.site-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* strong dark overlay to guarantee contrast */
  background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0.55));
  z-index: 1;
}
.site-header.site-hero .wrap { position: relative; z-index: 2; width: 100%; max-width: 1100px; margin: 0 auto; text-align: center; padding: 0 18px }
.site-header.site-hero h1 { font-size: 30px; color: #fff; margin: 0 }
.site-header.site-hero .subtitle { color: rgba(255,255,255,0.92); margin: 0 0 6px }

/* logo inside header */
.site-logo { display: block; height: 110px; width: auto; margin: 0 auto }

/* responsive tweaks for small screens so the hero stays balanced */
@media (max-width: 520px) {
  .site-header.site-hero { height: 160px }
  .site-header.site-hero h1 { font-size: 22px }
  .site-logo { height: 80px }
  body { padding-top: 160px }
}

.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.btn {
  padding: 12px 24px;
  background: crimson;
  color: white;
  text-decoration: none;
  margin-top: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 40px;
}

.card {
  background: #1a1a1a;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: white;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-5px);
}

.card img,
.profile {
  width: 100%;
  max-width: 200px;
  border-radius: 8px;
}

/* ==== New layout styles for players page ==== */
.feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 60px 8%;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.feature-row.feature-left .feature-phone { order: 0 }
.feature-row.feature-left .feature-text { order: 1 }
.feature-row.feature-right .feature-phone { order: 1 }
.feature-row.feature-right .feature-text { order: 0 }

.feature-text { max-width: 560px }
.feature-text h2 { font-size: 28px; margin: 0 0 12px; color: #e6eef7 }
.feature-text .lead { color: var(--muted); line-height: 1.5 }

.phone-card {
  width: 260px;
  height: 480px;
  border-radius: 28px;
  background: linear-gradient(180deg,var(--phone-top),var(--phone-bottom));
  box-shadow: 0 20px 40px rgba(10,6,30,0.7), inset 0 1px 0 rgba(255,255,255,0.02);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}
.phone-card img { width: 100%; height: 100%; object-fit: cover; display: block }
.phone-meta { position: absolute; top: 12px; left: 12px; color: #cfe7ff; font-weight:600 }
.card-overlay { position: absolute; bottom: 12px; left: 12px; right: 12px; color: white; backdrop-filter: blur(6px); background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.4)); padding: 12px; border-radius: 12px }
.btn { padding: 10px 16px; background: #00b4d8; color: #012; text-decoration: none; border-radius: 10px; display: inline-block }
.btn.small { padding: 8px 12px; font-size: 14px }

.main-idea .big-character .phone-card { width: 340px; height: 520px }

.content { padding: 40px 0 80px }
.players-grid {
  /* horizontal scrolling row */
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-top: 24px;
  padding: 12px 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

/* player card styles injected by JS */
.player-card { display: flex; flex-direction: column; /* cards: lighter/brighter orange gradient */ background: linear-gradient(180deg, rgba(255,200,120,0.20) 0%, rgba(255,184,77,0.20) 18%, var(--accent-2) 55%, var(--accent) 100%); border-radius: 16px; overflow: hidden; box-shadow: 0 12px 30px rgba(10,6,30,0.75), inset 0 8px 20px rgba(255,255,255,0.06); color: #fff; text-decoration: none; height: 360px; transition: transform 220ms ease, box-shadow 220ms ease; flex: 0 0 260px; scroll-snap-align: center }
.player-card { position: relative }
.player-card .player-image { flex: 2; min-height: 0 }
.player-card .player-image img { width: 100%; height: 100%; object-fit: cover; display: block }

.player-card .player-info { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; align-items: center; 
  /* orange band inspired by logo colors (kept subtle) */
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  text-align: center;
}
.player-card h3 { margin: 0 0 6px; font-size: 18px; color: #fff; text-align: center }
.player-card p { margin: 0; color: rgba(255,255,255,0.95); text-align: center }

/* platform icon next to nick */
.player-card h3 { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px }
.player-card .platform-icon { width: 18px; height: 18px; object-fit: contain; display: block; margin: 0 auto; filter: invert(1); }
.player-card .nick-text { display: inline-block }

/* numeric rank badge (replaces stars) */
.player-rank {
  position: absolute;
  left: 14px;
  /* position near the image/info junction: 2/3 from top minus half badge height */
  top: calc(66.666% - 28px);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg,var(--purple),var(--purple-2));
  border: 3px solid var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.45);
}
.player-rank span { font-weight: 700; color: var(--accent-2); font-size: 20px; line-height: 1 }

@media (max-width: 900px) {
  .player-rank { top: calc(66.666% - 24px); width: 48px; height: 48px }
  .player-rank span { font-size: 18px }
}

/* player meta row (platform + apetrecho) */
.player-meta { display: flex; gap: 10px; justify-content: flex-start; align-items: center; margin: 8px 0 }
.meta-item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,0.02); font-size: 13px; color: rgba(255,255,255,0.92); font-weight: 500; text-transform: none }
.meta-platform, .meta-apetrecho, .meta-funcao { background: rgba(255,255,255,0.02); color: rgba(255,255,255,0.92); font-weight: 500 }

@media (max-width: 900px) {
  .meta-item { padding: 6px 8px; font-size: 12px }
}

/* estrelas: contorno e preenchimento via SVG */
.stars { display: flex; justify-content: center; gap: 4px; margin-bottom: 6px }
.star svg { width: 14px; height: 14px }
.star svg path { stroke: rgba(255,255,255,0.85); stroke-width: 1; fill: none }
.star.filled svg path { fill: #ffffff; stroke: #ffffff }
.star:not(.filled) svg path { fill: none; stroke: rgba(255,255,255,0.7) }

.player-card:hover { transform: translateY(-8px); box-shadow: 0 22px 50px rgba(2,6,23,0.85) }
.carousel-title { font-size: 20px; color: var(--accent-2); margin: 8px 0 6px; text-align: left; font-weight: 700 }
.player-card, .player-card a { color: inherit }
.player-card { text-decoration: none }

@media (max-width: 900px) {
  .players-grid { padding: 12px 6px }
  .player-card { height: 320px; flex: 0 0 84%; }
}

/* hide native scrollbar but keep scrollable */
.players-grid::-webkit-scrollbar { height: 10px }
.players-grid::-webkit-scrollbar-track { background: transparent }
.players-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px }

/* bottom navigation */
.bottom-nav {
  position: fixed;
  right: 0;
  left: 0;
  bottom: 0;
  background: rgba(10,8,16,0.7);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255,255,255,0.04);
  /* reduced vertical padding to make the bar shorter */
  /* nudge the bar slightly lower so it doesn't feel "high" on some screens */
  padding: calc(4px + env(safe-area-inset-bottom)) 0 0;
  transform: translateY(4px);
  transition: transform 180ms ease;
  z-index: 1200;
}
.bottom-nav__inner { display: flex; gap: 4px; align-items: center; justify-content: space-between; padding: 6px 8px }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #cfd8e3; text-decoration: none; padding: 6px 6px; flex: 1; font-size: 11px }
.nav-item svg { margin-bottom: 0; color: #cfd8e3; width: 20px; height: 20px }
.nav-item span { display: none }
.nav-item.active { color: var(--accent-2) }
.nav-item.active svg { color: var(--accent-2) }
.nav-item:focus { outline: none; background: rgba(255,255,255,0.02); border-radius: 8px }

@media (min-width: 900px) {
  .bottom-nav__inner { max-width: 1100px; margin: 0 auto }
}

/* ensure content above nav isn't hidden - reduce spacer so nav is smaller */
.wrap { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px) }