/* Shared visual rules for the public website. */
.game-site {
  --bg: #0c131b;
  --surface: #141f29;
  --surface-2: #1b2a35;
  --line: #ffffff20;
  --text: #f1f3f5;
  --muted: #b7c4ce;
  --accent: #ffa357;
  --accent-2: #ffd587;
  --site-gold: #ffd587;
  --site-edge: #ffffff20;
  --site-radius: 20px;
  --radius: var(--site-radius);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--muted);
}

.game-site .site-nav {
  background: #0c131bf5;
  border-bottom-color: var(--site-edge);
}
.game-site .logo__img { height: 56px; }
.game-site .site-nav .nav-link {
  padding: .55rem .65rem !important;
  font-size: .88rem;
}
.game-site .site-nav .nav-link.active {
  color: var(--site-gold);
  background: #ffd58712;
  box-shadow: inset 0 -2px var(--site-gold);
}
.game-site .site-nav .navbar-toggler-icon { filter: none; }
.game-site__main { padding-block: clamp(1rem, 3vw, 2.6rem) clamp(2rem, 5vw, 4rem); }
.game-site .site-footer { background: #0c131bf5; border-top-color: var(--site-edge); }
.game-site .site-footer .balls img { animation: none; }
.game-site :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--site-gold);
  outline-offset: 3px;
}

.game-page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: clamp(1.15rem, 3vw, 2rem);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border: 1px solid var(--site-edge);
  border-radius: var(--site-radius);
  background: linear-gradient(115deg, #152330 42%, #233328);
}
.game-page-title__text { min-width: 0; }
.game-page-title h1 {
  color: #fff;
  font-size: clamp(1.6rem, 4.5vw, 3.1rem);
  margin: 0;
  overflow-wrap: anywhere;
}
.game-page-title p { color: var(--muted); margin: .45rem 0 0; }
.site-icon { display: block; width: 1em; height: 1em; flex: none; }
.stat-card__symbol {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff0d;
  font-size: 30px;
}
.stat-card__symbol--account { color: #8dcaff; }
.stat-card__symbol--warrior { color: #a9e6b4; }
.stat-card__symbol--power { color: var(--site-gold); }
.game-site .stat-card img { object-fit: contain; }
.game-page-title__icon, .download-card__icon {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--site-gold);
  border: 1px solid #ffd58742;
  background: #ffd5870d;
}
.game-page-title__icon {
  width: clamp(48px, 10vw, 96px);
  aspect-ratio: 1;
  border-radius: clamp(12px, 2vw, 22px);
  font-size: clamp(28px, 5.5vw, 54px);
}
.game-page-title__icon .emblem { width: 60%; height: auto; }

.game-info-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1.5rem;
}
.game-info-nav a {
  padding: .55rem .85rem;
  border: 1px solid var(--site-edge);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.game-info-nav a:hover, .game-info-nav a[aria-current="page"] {
  color: var(--site-gold);
  border-color: var(--site-gold);
}
.game-info-article section { scroll-margin-top: 6rem; }
.game-info-article section + section { margin-top: 2rem; }
.game-info-article section > :last-child { margin-bottom: 0; }
.game-info-toc li + li { margin-top: .65rem; }
.planet-card--0 { --character-scene: url("../img/profile-scenes/earth.jpg"); }
.planet-card--1 { --character-scene: url("../img/profile-scenes/namek.jpg"); }
.planet-card--2 { --character-scene: url("../img/profile-scenes/xayda.jpg"); }
.planet-card__stage {
  position: relative;
  display: grid;
  place-items: center;
  align-self: stretch;
  min-height: 144px;
  margin-bottom: .35rem;
  overflow: hidden;
  border: 1px solid var(--site-edge);
  border-radius: 12px;
  background-color: #1b2633;
}
.char-stage, .planet-card__stage { isolation: isolate; }
.char-stage::before, .planet-card__stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -5px;
  background: var(--character-scene, none) center / cover no-repeat;
  filter: blur(2.5px) brightness(.83);
  pointer-events: none;
}
.planet-card__stage::before { background-position: center 65%; }
.char-stage__figure { animation: character-idle 2.4s ease-in-out infinite; }
@keyframes character-idle {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -3px); }
}
.planet-portrait {
  position: relative;
  display: block;
  flex: none;
  width: var(--portrait-size, 138px);
  aspect-ratio: 1;
  overflow: hidden;
}
.planet-portrait::before {
  content: "";
  position: absolute;
  inset: 84% 30% 8%;
  border-radius: 50%;
  background: #090e14a0;
}
.planet-portrait img {
  position: relative;
  display: block;
  width: 200%;
  max-width: none;
  height: 100%;
  animation: planet-idle 1.2s steps(1, end) infinite;
}
@keyframes planet-idle {
  0%, 100% { transform: translateX(0); }
  38% { transform: translate(-50%, -1px); }
}
@media (prefers-reduced-motion: reduce) {
  .planet-portrait img, .char-stage__figure { animation: none; }
}
.account-character-date summary { color: var(--site-gold); cursor: pointer; }

.game-site .panel { background: var(--surface); border-radius: var(--site-radius); }
.game-site .panel__title { font-size: 1.05rem; }
.game-site .btn-comic--red { --btn-bg: var(--grad); }
.game-site .form-control, .game-site .form-select { background-color: #0e1720; }
.game-site .news-card {
  background: #192733;
  border: 1px solid var(--site-edge);
  border-radius: 14px;
}
.game-site .news-card:hover { border-color: var(--site-gold); }
.game-site .article { padding: clamp(1.2rem, 4vw, 3rem); }
.game-site .article h1 { overflow-wrap: anywhere; }
.game-site .comic-tabs { gap: .35rem; }

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.download-card { display: flex; flex-direction: column; align-items: flex-start; }
.download-card__icon {
  width: 56px;
  height: 56px;
  font-size: 32px;
  margin-bottom: 1rem;
  border-radius: 11px;
}
.download-card__icon--windows { color: #82caff; }
.download-card__icon--android { color: #a3eba3; }
.download-card__icon--ios { color: #e4e9ff; }
.download-card__icon--java { color: #ffb780; }
.download-card h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 .4rem; }
.download-card p { color: var(--muted); }
.download-card .btn { margin-top: auto; }

/* Impact feedback for the primary actions, inspired by Sakuga VFX. */
.game-site :is(.home-hero__actions, .download-card) .btn-comic--red {
  position: relative;
}
.game-site :is(.home-hero__actions, .download-card) .btn-comic--red:active {
  transform: scale(.96);
}
.game-site :is(.home-hero__actions, .download-card) .btn-comic--red:active::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid var(--site-gold);
  border-radius: inherit;
  pointer-events: none;
  animation: site-impact .32s ease-out both;
}
@keyframes site-impact {
  from { opacity: .8; transform: scale(.94); }
  to { opacity: 0; transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .game-site :is(.home-hero__actions, .download-card) .btn-comic--red { transition: none; }
  .game-site :is(.home-hero__actions, .download-card) .btn-comic--red:active { transform: none; }
  .game-site :is(.home-hero__actions, .download-card) .btn-comic--red:active::after { content: none; }
}

@media (min-width: 1200px) {
  .game-site .site-nav .site-nav__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: .65rem;
  }
  .game-site .site-nav .navbar-collapse { display: contents !important; }
  .game-site .site-nav .logo { justify-self: start; }
  .game-site .site-nav__account { justify-self: end; }
}
@media (max-width: 1199.98px) {
  .game-site .site-nav .navbar-collapse { padding-top: .5rem; }
  .game-site .site-nav .navbar-collapse.show { max-height: 75vh; overflow-y: auto; }
}
@media (max-width: 575.98px) {
  .game-page-title { gap: .5rem; }
  .game-site .site-nav .logo__img { height: 48px; }
  .game-site .kv { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .game-site .kv dd + dt { margin-top: .55rem; }
  .game-site .stat-card { flex-wrap: wrap; gap: .45rem; }
  .stat-card__symbol { width: 34px; height: 34px; font-size: 25px; }
}
