/* Hex Dash visual system. Layout and feature rules remain in HexDashStyles.css. */
:root {
  --bg: #151814;
  --panel: #1d211c;
  --panel-2: #292e27;
  --line: #465044;
  --text: #f5f3e8;
  --muted: #bbc2af;
  --cyan: #a9d6cc;
  --yellow: #f3c76a;
  --red: #ef7868;
  --green: #a6d88a;
  --purple: #c1afd9;
}

body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

button {
  border-color: var(--line);
  border-radius: 4px;
  background: #30362e;
  box-shadow: none;
  font-weight: 700;
  transition: background-color 140ms ease, border-color 140ms ease, transform 100ms ease;
}

button:hover:not(:disabled) {
  border-color: #778371;
  background: #3a4237;
  box-shadow: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.app-shell.in-lobby {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell.in-lobby .ad-panel {
  display: none;
}

.arena-shell,
.topbar,
.statusbar,
.ad-panel {
  background: var(--bg);
}

.topbar,
.statusbar {
  border-color: var(--line);
}

.topbar {
  min-height: 70px;
  padding-inline: clamp(14px, 2vw, 30px);
}

.brand-mark {
  width: 22px;
  height: 22px;
  background: var(--yellow);
}

.brand strong {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand small {
  font-size: 0.76rem;
}

.beta-badge,
.beta-badge-title {
  border: 1px solid var(--yellow);
  border-radius: 3px;
  background: transparent;
  color: var(--yellow);
  box-shadow: none;
}

.match-strip,
.actions,
.status-pill,
.phase-badge {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.actions {
  gap: 3px;
  padding: 3px;
}

.actions button {
  border-radius: 3px;
  color: var(--text);
}

.match-strip {
  color: var(--text);
}

.status-pill,
.phase-badge {
  color: var(--text);
}

.start-overlay {
  width: 100%;
  max-width: 100%;
  padding: clamp(12px, 3vw, 28px);
  background: var(--bg);
  backdrop-filter: none;
  overflow: visible;
}

.start-panel {
  width: min(1100px, 100%);
  max-height: none;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.8fr);
  gap: 16px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  padding: 0 0 46px;
  background: transparent;
  box-shadow: none;
}

.start-hero {
  grid-column: 1 / -1;
  gap: 10px;
  border-bottom: 2px solid var(--text);
  padding: 14px 0 25px;
}

.start-panel h1 {
  font-family: "Arial Black", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: clamp(2.9rem, 6.5vw, 6.25rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.95;
}

.start-panel h1 .beta-badge-title {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 12px;
  letter-spacing: 0;
}

.start-hero p {
  color: var(--muted);
  font-size: 0.92rem;
}

.play-menu-card {
  grid-column: 1;
  border-top: 4px solid var(--yellow);
  background: #24291f;
}

.utility-menu-card {
  grid-column: 2;
  background: var(--panel);
}

.online-panel {
  grid-column: 1 / -1;
}

.lobby-card,
.online-section,
.ranked-match-card,
.public-room-row,
.room-control-section {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: none;
}

.lobby-card {
  gap: 18px;
  padding: clamp(18px, 2.4vw, 28px);
}

.lobby-card-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
}

.lobby-card-heading span,
.online-heading small {
  color: var(--yellow);
  font-size: 0.83rem;
  letter-spacing: 0.06em;
}

.lobby-card-heading small,
.start-panel p,
.menu-field,
.muted-copy {
  font-size: 0.89rem;
}

.menu-field input,
.menu-field select,
.menu-field button,
.color-picker-summary,
.online-fields input,
.online-fields select {
  border-color: var(--line);
  border-radius: 4px;
  background: #171c17;
  box-shadow: none;
}

.color-summary-swatch {
  box-shadow: none;
}

.primary-action,
.start-panel .primary-action {
  border: 1px solid var(--yellow);
  border-radius: 4px;
  background: var(--yellow);
  color: #171b14;
  box-shadow: none;
  font-weight: 900;
}

.primary-action:hover:not(:disabled),
.start-panel .primary-action:hover:not(:disabled) {
  border-color: #ffe0a1;
  background: #ffe0a1;
  box-shadow: none;
}

.ranked-action,
.ranked-action:hover:not(:disabled) {
  border-color: var(--cyan);
  border-radius: 4px;
  background: #28433c;
  color: #e7f6ed;
  box-shadow: none;
}

.start-ad-slot[hidden],
.ad-slot[hidden] {
  display: none;
}

.ad-panel {
  min-height: 0;
  border-color: var(--line);
}

.match-ranking,
.result-ranking-list {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.ranking-row {
  border-color: #3b4439;
  border-radius: 2px;
  background: #282e26;
}

.ranking-row.local {
  border-color: var(--yellow);
  background: #363524;
}

.result-overlay {
  background: rgba(13, 17, 13, 0.9);
}

.countdown-badge {
  border-color: var(--line);
  border-radius: 4px;
  background: #171b17;
}

.tutorial-overlay {
  background: rgba(8, 11, 8, 0.88);
  backdrop-filter: none;
}

.tutorial-panel {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.tutorial-panel h1,
.shop-panel-header h2,
.shop-layout h3 {
  font-weight: 900;
  letter-spacing: -0.04em;
}

.modal-heading-row h1 {
  letter-spacing: -0.04em;
}

.practice-pad {
  border-radius: 4px;
  background-color: #151c17;
}

.practice-player,
.practice-player.shooting {
  box-shadow: none;
}

.tutorial-panel li,
.profile-summary,
.friends-panel,
.friend-row,
.friend-search-card,
.friend-profile-card {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--panel-2);
  box-shadow: none;
}

.google-auth-button,
.google-auth-button:hover:not(:disabled) {
  border-color: #aab5a8;
  border-radius: 4px;
  background: #eceee8;
  color: #1b211c;
  box-shadow: none;
}

.google-auth-button.google-logout-button {
  border-color: var(--red);
  background: transparent;
  color: var(--red);
}

.shop-panel {
  border-color: var(--line);
  border-radius: 4px;
  background: #20251f;
  box-shadow: none;
}

.shop-layout section,
.friends-tabs button,
.room-player-list li {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: none;
}

.shop-panel-header > strong,
.shop-category-tab,
.shop-category-tab.active,
.shop-category-tab[aria-selected="true"] {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--panel-2);
  box-shadow: none;
}

.shop-category-tab.active,
.shop-category-tab[aria-selected="true"] {
  border-color: var(--yellow);
  color: var(--yellow);
}

.shop-item,
.inventory-category,
.color-choice {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: none;
}

.shop-item.equipped {
  border-color: var(--yellow);
}

.shop-action,
.color-open-button {
  border-radius: 4px;
}

.meter-track,
.meter-fill,
.profile-xp-track,
.profile-xp-track span {
  border-radius: 2px;
}

.meter-fill,
.profile-xp-track span {
  background: var(--yellow);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .ad-panel {
    min-height: 0;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 12px;
    overflow: visible;
  }

  .match-ranking {
    min-height: 0;
    max-height: none;
  }
}

@media (max-width: 900px) {
  .start-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .start-hero,
  .play-menu-card,
  .utility-menu-card,
  .online-panel {
    grid-column: 1;
  }
}

@media (max-width: 560px) {
  .start-overlay {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    overflow: visible;
  }

  .start-panel {
    width: 100%;
    padding: 0 0 28px;
    border-radius: 0;
  }

  .start-hero {
    padding: 12px 0 21px;
  }

  .start-panel h1 {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .start-panel p,
  .lobby-card-heading small,
  .menu-field,
  .muted-copy {
    font-size: 0.87rem;
  }

  .topbar {
    gap: 8px;
    padding: 10px 12px;
  }

  .brand {
    flex: 1 1 115px;
  }

  .brand strong {
    font-size: 0.96rem;
  }

  .actions button {
    min-height: 40px;
    padding-inline: 10px;
    font-size: 0.875rem;
  }

  .match-strip {
    font-size: 0.81rem;
  }

  .tutorial-overlay {
    align-items: start;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .tutorial-panel {
    max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 18px 14px;
    overscroll-behavior: contain;
  }

  .shop-category-tabs {
    gap: 6px;
  }

  .shop-category-tab {
    min-height: 44px;
    padding: 8px 6px;
    font-size: 0.875rem;
  }

  .ad-panel {
    display: none;
  }
}

@media (max-width: 380px) {
  .shop-category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
