/* Color palette – reference throughout */
:root {
  --deep-blue: #00062B;
  --white: #ffffff;
  --navy: #00247f;
  --purple: #591dff;
  --blue: #008cff;
  --cyan: #42d3e2;
  --green: #23a54e;
  --yellow: #ffba0d;
  --orange: #ff5917;
  --red: #ff1038;
  --pink: #ff5a96;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  background: var(--deep-blue);
}

/* Brickwork grid: container for tile elements (populated by JS on game page) */
.grid-pattern {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.grid-pattern.has-tiles {
  pointer-events: auto;
}

.grid-pattern.grid-pattern--battle {
  inset: auto;
  left: 50%;
  top: 50%;
  width: 832px;
  height: 730px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.battle-hex-grid {
  width: 100%;
  height: 100%;
  display: block;
}

.battle-hex {
  cursor: pointer;
}

.grid-tile {
  position: absolute;
  width: 64px;
  height: 64px;
  background-image: url("test-assets/grid-cell.svg");
  background-size: 64px 64px;
  background-repeat: no-repeat;
  transition: opacity 0.22s ease-out;
  cursor: pointer;
}

.grid-tile--filled {
  background-image: none;
  opacity: 1 !important;
}

.grid-tile--filled svg {
  display: block;
  width: 100%;
  height: 100%;
}

.grid-tile--filled.grid-tile--bounce-in {
  transform-origin: center;
  animation: grid-tile-bounce-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes grid-tile-bounce-in {
  0% {
    transform: scale(0.6);
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

/* Background layer: behind grid and UI */
.starfield {
  position: fixed;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

.star-layer {
  position: absolute;
  inset: 0;
}

.star-layer[data-parallax] {
  transition: transform 0.55s ease-out;
}

/* Hexlin tool: character + refresh button, centered on screen */
.hexlin-tool-wrap {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.hexlin-container {
  width: 256px;
  height: 256px;
  position: relative;
  pointer-events: none;
  overflow: visible;
}

.hexlin-container.hexlin-bounce-in {
  animation: hexlin-bounce-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes hexlin-bounce-in {
  0% {
    transform: scale(0.6);
    opacity: 0.6;
  }
  70% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.hexlin-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hexlin-refresh-btn,
.hexlin-play-btn,
.hexlin-battle-btn {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #00062B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.hexlin-bottom-actions {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.hexlin-refresh-btn:hover,
.hexlin-play-btn:hover,
.hexlin-battle-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.hexlin-refresh-btn:active,
.hexlin-play-btn:active,
.hexlin-battle-btn:active {
  transform: scale(0.98);
}

.hexlin-refresh-icon,
.hexlin-play-icon,
.hexlin-battle-icon {
  display: block;
}

/* Game page: back button */
.game-back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #00062B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}
.game-back-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.game-back-btn:active {
  transform: scale(0.98);
}
.game-back-btn svg {
  display: block;
}

.hexlin-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hexlin-layer img,
.hexlin-layer svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: var(--white);
  transform: translate(-50%, -50%);
}

.star--twinkle {
  animation: star-twinkle 2.8s ease-in-out infinite;
}

@keyframes star-twinkle {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(0.08); }
}

.star--tiny {
  width: 1px;
  height: 1px;
}

.star--small {
  width: 2px;
  height: 2px;
}

.star--large {
  width: 4px;
  height: 4px;
}

/* ========== Test links (dev only, top-left) ========== */
.test-links {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 20;
  font-size: 0.85rem;
}

.test-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.test-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.test-links-sep {
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.4);
}

/* ========== Main menu (landing) ========== */
.main-menu-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.main-menu {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
}

/* Splash logo: viewport-scaled (80 design = 8vh); center on screen; moves up to 128 from top on login */
.main-menu-loading {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 8vh;   /* 80 design @ 1000 */
  letter-spacing: -0.02em;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  transition: top 0.5s ease-out, transform 0.5s ease-out, opacity 0.8s ease-out;
  z-index: 2;
}

.main-menu-loading--login {
  top: 12.8vh;   /* 128 from top */
  transform: translate(-50%, 0);
}

.loading-letter {
  display: inline-block;
  transition: none;
  animation: loading-bounce-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}

@keyframes loading-bounce-in {
  0% {
    opacity: 0;
    transform: translateY(48px) scale(0.4);
  }
  70% {
    opacity: 1;
    transform: translateY(-6px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loading-fade-out {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.splash-click-prompt {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 6.4vh;   /* 64 design @ 1000 */
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 2.4vh;   /* 24 design */
  line-height: 2.4vh;
  color: #fff;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  -webkit-font-smoothing: antialiased;
  font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  transition: opacity 0.8s ease-out;
}

.splash-click-prompt--hidden {
  display: none;
}

.splash-click-prompt--visible {
  pointer-events: auto;
  animation: splash-prompt-fade-in 0.5s ease-out forwards,
             splash-prompt-pulse 2.5s ease-in-out 0.5s infinite;
}

@keyframes splash-prompt-fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes splash-prompt-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.48; }
}

.main-menu-content--hidden {
  display: none;
}

.main-menu-content:not(.main-menu-content--hidden) {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: login-fade-in 0.4s ease-out forwards;
  transition: opacity 0.8s ease-out;
}

/* Unify fade-out: stop animations so opacity transition can run, then fade all in unison */
.main-menu--leaving .main-menu-loading,
.main-menu--leaving .main-menu-content,
.main-menu--leaving .splash-click-prompt {
  opacity: 0;
}

.main-menu--leaving .main-menu-content {
  animation: none;
}

.main-menu--leaving .main-menu-content .login-hexlin-deco {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

@keyframes login-fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* Form items fade in after logo has moved up */
.main-menu-login-form .login-field-wrap:nth-child(1),
.main-menu-login-form .login-field-wrap:nth-child(3),
.main-menu-login-form .launch-btn-wrap {
  opacity: 0;
  animation: login-item-fade-in 0.45s ease-out forwards;
}

.main-menu-login-form .login-field-wrap:nth-child(1) { animation-delay: 0.08s; }
.main-menu-login-form .login-field-wrap:nth-child(3) { animation-delay: 0.18s; }
.main-menu-login-form .launch-btn-wrap { animation-delay: 0.28s; }

@keyframes login-item-fade-in {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Decorative hexlin on login screen: 800x800 (80vh); Figma Y=808 so top at 80.8vh – mostly below view */
.login-hexlin-deco {
  position: fixed;
  top: 80.8vh;
  left: 50%;
  width: 80vh;
  height: 80vh;
  transform: translate(-50%, 3vh);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.login-hexlin-deco--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.login-hexlin-deco--hidden {
  opacity: 0;
  transform: translate(-50%, 3vh);
}

.login-hexlin-deco svg {
  width: 100%;
  height: 100%;
  display: block;
}

.main-menu-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.main-menu-login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6vh;   /* 16 between each of the three components */
  width: 44vh;   /* 440 design */
}

.main-menu-login-form .launch-btn-wrap {
  margin-top: 0;
}

/* Error message under field: 16 fill (16% opacity), 16 text, 16 padding, 8 radius */
.login-error {
  width: 44vh;
  padding: 1.6vh;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.6vh;
  line-height: 1.6vh;
  color: #ff1038;
  background: rgba(255, 16, 56, 0.16);
  border-radius: 0.8vh;
  box-sizing: border-box;
  display: none;
}

.login-error:not(:empty) {
  display: block;
}

/* Input wrapper: 24 L/R padding, 16 vertical; border-radius 16; inactive purple, active (focus) cyan */
.login-field-wrap {
  display: flex;
  align-items: center;
  width: 44vh;
  height: 6.4vh;
  padding: 1.6vh 2.4vh;
  border: 2px solid #591dff;
  border-radius: 1.6vh;
  background: #00062b;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.login-field-wrap:focus-within {
  border-color: #42d3e2;
}

.login-field-icon {
  flex-shrink: 0;
  width: 3.2vh;
  height: 3.2vh;
  font-size: 3.2vh;
  color: #591dff;
  margin-right: 0.8vh;
  transition: color 0.2s;
}

.login-field-wrap:focus-within .login-field-icon {
  color: #42d3e2;
}

.login-field {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 2.4vh !important;
  line-height: 3.2vh !important;
  color: #591dff;
  background: transparent;
  border: none;
  outline: none;
  transition: color 0.2s;
  box-sizing: border-box;
}

.login-field::placeholder {
  font-weight: 600;
  font-size: 2.4vh;
  line-height: 3.2vh;
  color: rgba(89, 29, 255, 0.4);
}

.login-field:focus {
  color: #42d3e2;
}

.login-field:focus::placeholder {
  color: rgba(66, 211, 226, 0.4);
}

/* Error state: neutral = red; when user focuses the field, normal active (cyan). Placed after defaults so it wins. */
.login-field-wrap--error {
  border-color: #ff1038;
}

.login-field-wrap--error .login-field-icon,
.login-field-wrap--error .login-field {
  color: #ff1038;
}

.login-field-wrap--error .login-field::placeholder {
  color: rgba(255, 16, 56, 0.5);
}

.login-field-wrap--error:focus-within {
  border-color: #42d3e2;
}

.login-field-wrap--error:focus-within .login-field-icon,
.login-field-wrap--error:focus-within .login-field {
  color: #42d3e2;
}

.login-field-wrap--error:focus-within .login-field::placeholder {
  color: rgba(66, 211, 226, 0.4);
}

/* Keep our styling when browser autofill/autocomplete is applied */
.login-field:-webkit-autofill,
.login-field:-webkit-autofill:hover {
  -webkit-text-fill-color: #591dff;
  -webkit-box-shadow: 0 0 0 1000px #00062b inset;
  box-shadow: 0 0 0 1000px #00062b inset;
  transition: background-color 5000s ease-in-out 0s;
  font-size: 2.4vh !important;
  line-height: 6.4vh !important;
}

.login-field:focus:-webkit-autofill,
.login-field:-webkit-autofill:focus,
.login-field:-webkit-autofill:active {
  -webkit-text-fill-color: #42d3e2;
  -webkit-box-shadow: 0 0 0 1000px #00062b inset;
  box-shadow: 0 0 0 1000px #00062b inset;
  font-size: 2.4vh !important;
  line-height: 6.4vh !important;
}

/* Start button: neutral purple, active cyan; label + icon deep blue; text center, icon right; 24 horizontal padding; Semi Bold */
.launch-btn {
  position: relative;
  width: 44vh;
  height: 6.4vh;
  padding: 0 2.4vh;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 2.4vh;
  line-height: 6.4vh;
  color: #00062b;
  background: #591dff;
  border: none;
  border-radius: 1.6vh;
  cursor: pointer;
  outline: none;
  transition: background 0.2s, color 0.2s;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.launch-btn__label {
  color: #00062b;
}

.launch-btn__icon {
  position: absolute;
  right: 2.4vh;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
  width: 3.2vh;
  height: 3.2vh;
  font-size: 3.2vh;
  color: #00062b;
}

.launch-btn__spinner {
  position: absolute;
  right: 2.4vh;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  flex-shrink: 0;
  width: 3.2vh;
  height: 3.2vh;
  font-size: 3.2vh;
  color: #00062b;
  animation: launch-spinner-spin 0.8s linear infinite;
}

.launch-btn--loading .launch-btn__icon {
  display: none;
}

.launch-btn--loading .launch-btn__spinner {
  display: block;
}

.launch-btn:disabled {
  cursor: default;
  opacity: 0.24;
  color: #00062b;
  background: #591dff;
}

.launch-btn--loading:disabled {
  opacity: 1;
  background: #591dff;
  cursor: wait;
}

@keyframes launch-spinner-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

.launch-btn:not(:disabled):hover,
.launch-btn:not(:disabled):focus {
  background: #42d3e2;
  color: #00062b;
}

.launch-btn:not(:disabled):hover .launch-btn__label,
.launch-btn:not(:disabled):focus .launch-btn__label,
.launch-btn:not(:disabled):hover .launch-btn__icon,
.launch-btn:not(:disabled):focus .launch-btn__icon {
  color: #00062b;
}

.main-menu-hexlin-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 8px 0;
}

.main-menu-hexlin-wrap .hexlin-container {
  width: 100%;
  height: 100%;
}

.main-menu-hexlin-wrap .hexlin-refresh-btn {
  position: absolute;
  bottom: -8px;
  right: -8px;
}

.main-menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.main-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--deep-blue);
  background: var(--white);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.main-menu-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.main-menu-btn:active {
  transform: scale(0.98);
}

.main-menu-btn--primary {
  background: var(--blue);
  color: var(--white);
}

.main-menu-btn--secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--deep-blue);
}

.main-menu-btn-icon {
  font-size: 0.9em;
}


.main-menu-auth {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.auth-guest,
.auth-signed-in {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.auth-user-email {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  margin-right: 8px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== Auth modal ========== */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 6, 43, 0.85);
  cursor: pointer;
}

.auth-modal-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 24px;
  background: var(--deep-blue);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.auth-modal-title {
  margin: 0 0 16px;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
}

.auth-modal-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.auth-tab {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.auth-tab:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.auth-tab--active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

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

.auth-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.auth-input {
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.auth-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(29, 99, 255, 0.3);
}

.auth-error {
  margin: 0;
  font-size: 0.85rem;
  color: var(--red);
}

/* ========== Hexlin setup (first-time flow) ========== */
.hexlin-setup-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.hexlin-setup {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 24px 24px 0;
  box-sizing: border-box;
}

.hexlin-setup-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

.hexlin-setup-wrap {
  position: relative;
  width: 100%;
  height: 512px;
  margin: 8px 0;
}

.hexlin-rarity-stamp {
  position: absolute;
  left: calc(50% - 256px - 112px);
  top: -44px;
  transform: rotate(-15deg);
  transform-origin: center center;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 24px;
  padding: 24px 32px;
  background: transparent;
  color: #fff;
  pointer-events: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hexlin-setup-wrap .hexlin-rarity-stamp {
  z-index: 2;
}

.hexlin-rarity-stamp__border {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: inherit;
}

.hexlin-rarity-stamp__label {
  position: relative;
  z-index: 1;
}

.hexlin-rarity-stamp--common { color: #ffffff; }
.hexlin-rarity-stamp--unusual { color: #008cff; }
.hexlin-rarity-stamp--rare { color: #42d3e2; }
.hexlin-rarity-stamp--exotic { color: #23a54e; }
.hexlin-rarity-stamp--epic { color: #ffba0d; }
.hexlin-rarity-stamp--legendary { color: #ff5917; }
.hexlin-rarity-stamp--mythic { color: #ff1038; }
.hexlin-rarity-stamp--eternal { color: #ff5a96; }

.hexlin-rarity-stamp.stamp-pop {
  animation: stamp-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hexlin-rarity-stamp.stamp-pop-delay {
  animation: stamp-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s forwards;
  opacity: 0;
}

@keyframes stamp-pop {
  0% { transform: rotate(-15deg) scale(0.8); opacity: 0.9; }
  60% { transform: rotate(-15deg) scale(1.08); opacity: 1; }
  100% { transform: rotate(-15deg) scale(1); opacity: 1; }
}

.hexlin-setup-wrap .hexlin-glow {
  position: absolute;
  left: 50%;
  top: 256px;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle, #008cff 0%, rgba(0, 140, 255, 0.4) 45%, rgba(0, 140, 255, 0) 65%, rgba(0, 140, 255, 0) 100%);
  animation: hexlin-glow-float 4s 0.2s ease-out infinite,
             hexlin-glow-pulse 3.5s ease-in-out infinite;
}

@keyframes hexlin-glow-float {
  0% { transform: translate(-50%, -50%) translateY(0); animation-timing-function: ease-out; }
  50% { transform: translate(-50%, -50%) translateY(-16px); animation-timing-function: ease-in; }
  100% { transform: translate(-50%, -50%) translateY(0); }
}

@keyframes hexlin-glow-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.hexlin-setup-wrap .hexlin-container {
  position: absolute;
  left: 50%;
  top: 0;
  width: 512px;
  height: 512px;
  transform: translateX(-50%);
  z-index: 1;
  animation: hexlin-float 4s ease-out infinite;
}

@keyframes hexlin-float {
  0% { transform: translateX(-50%) translateY(0) scale(1); animation-timing-function: ease-out; }
  50% { transform: translateX(-50%) translateY(-16px) scale(1); animation-timing-function: ease-in; }
  100% { transform: translateX(-50%) translateY(0) scale(1); animation-timing-function: ease-out; }
}

.hexlin-setup-wrap .hexlin-container.hexlin-bounce-in {
  animation: hexlin-setup-bounce-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             hexlin-float 4s 0.55s ease-out infinite;
}

@keyframes hexlin-setup-bounce-in {
  0% {
    transform: translateX(-50%) scale(0.6);
    opacity: 0.6;
  }
  70% {
    transform: translateX(-50%) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

.hexlin-setup-wrap .hexlin-refresh-btn {
  position: absolute;
  left: calc(50% + 256px + 64px);
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fff;
  color: #00062b;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hexlin-setup-wrap .hexlin-refresh-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hexlin-setup-wrap .hexlin-refresh-btn:active {
  transform: translateY(-50%) scale(0.98);
}

.hexlin-setup-wrap .hexlin-refresh-btn.hexlin-refresh-btn--loading {
  opacity: 0.7;
  cursor: wait;
  animation: none;
}

.hexlin-setup-wrap .hexlin-refresh-btn.hexlin-refresh-btn--bounce {
  animation: hexlin-refresh-bounce 1.2s ease-in-out infinite;
}

@keyframes hexlin-refresh-bounce {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.12); }
}

.hexlin-setup-wrap .hexlin-refresh-icon {
  width: 40px;
  height: 40px;
  stroke: #00062b;
  display: block;
}

.hexlin-setup-continue {
  margin-top: auto;
  margin-bottom: 64px;
  height: 72px;
  padding: 24px 24px 24px 32px;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 24px;
  color: #00062b;
  background: #591dff;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.hexlin-setup-continue:hover:not(:disabled) {
  background: #42d3e2;
}

.hexlin-setup-continue:disabled {
  cursor: wait;
  opacity: 0.24;
  background: #591dff;
}

.hexlin-setup-continue__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  stroke: #00062b;
}

.hexlin-setup-continue__spinner {
  display: none;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  stroke: #00062b;
  animation: launch-spinner-spin 0.8s linear infinite;
}

.hexlin-setup-continue--loading .hexlin-setup-continue__icon {
  display: none;
}

.hexlin-setup-continue--loading .hexlin-setup-continue__spinner {
  display: block;
}

.hexlin-setup-continue--loading:disabled .hexlin-setup-continue__spinner {
  stroke: #00062b;
}

/* ========== Dashboard ========== */
.dashboard-page {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100vh;
  min-height: 100vh;
  padding: 40px 244px 122px 244px;
  gap: 40px;
  box-sizing: border-box;
  overflow: hidden;
}

.dashboard-header {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.dashboard-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 8px;
  box-sizing: border-box;
  background: #00062b;
  border: none;
  border-radius: 16px;
  box-shadow: 0 0 0 2px rgba(84, 29, 255, 0.16);
}

.dashboard-nav__group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.dashboard-nav__group--left .dashboard-tab--left {
  border-radius: 8px 0 0 8px;
}

.dashboard-nav__group--left .dashboard-tab--right {
  border-radius: 0 8px 8px 0;
}

.dashboard-nav__group--right .dashboard-tab--left {
  border-radius: 8px 0 0 8px;
}

.dashboard-nav__group--right .dashboard-tab--right {
  border-radius: 0 8px 8px 0;
}

.dashboard-content-panel {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
  border: 2px solid rgba(84, 29, 255, 0.16);
  border-radius: 16px;
}

.dashboard-inventory-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-profile {
  flex-shrink: 0;
  height: 144px;
  width: 100%;
  box-sizing: border-box;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: rgba(0, 6, 43, 0.2);
  background-image: linear-gradient(to top, rgba(84, 29, 255, 0.04) 0%, transparent 100%);
  border-bottom: 2px solid rgba(84, 29, 255, 0.16);
}

.dashboard-profile-avatar {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #00062b;
  border: 2px solid rgba(84, 29, 255, 0.16);
}

.dashboard-profile-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.dashboard-profile-username {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 24px;
  color: #fff;
  text-align: left;
}

.dashboard-profile-userid {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 16px;
  color: #42d3e2;
  text-align: left;
}

.dashboard-content-row {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.dashboard-inventory-section {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #00062b;
  background-image: linear-gradient(to bottom, rgba(84, 29, 255, 0.04) 0%, transparent 100%);
}

.dashboard-inventory {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  width: 100%;
  padding: 32px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #591dff transparent;
}

.dashboard-inventory::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.dashboard-inventory::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-inventory::-webkit-scrollbar-thumb {
  background: #591dff;
  border-radius: 4px;
}

.dashboard-inventory::-webkit-scrollbar-thumb:hover {
  background: #7a3cfd;
}

.dashboard-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 168px);
  gap: 16px;
  justify-content: center;
}

.dashboard-inventory-slot {
  width: 168px;
  height: 168px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background-size: 136px 136px;
  background-repeat: no-repeat;
  background-position: center;
}

.dashboard-inventory-slot--placeholder {
  background-color: rgba(84, 29, 255, 0.16);
  mask-image: url("test-assets/grid-cell.svg");
  mask-size: 136px 136px;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("test-assets/grid-cell.svg");
  -webkit-mask-size: 136px 136px;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.dashboard-inventory-slot--hexlin {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dashboard-inventory-slot--hexlin .hexlin-slot-inner {
  width: 136px;
  height: 136px;
  position: relative;
  pointer-events: none;
}

.dashboard-inventory-slot--hexlin .hexlin-slot-inner--img {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-inventory-slot--hexlin .hexlin-slot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.dashboard-inventory-slot--hexlin .hexlin-slot-inner [data-layer] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.dashboard-inventory-slot--hexlin .hexlin-slot-inner [data-layer] svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dashboard-content--hidden {
  display: none !important;
}

.dashboard-battle-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-properties {
  flex: 0 0 0;
  min-width: 0;
  overflow: hidden;
  background: #00062b;
  background-image: linear-gradient(to top, rgba(84, 29, 255, 0.04) 0%, transparent 100%);
  border-left: 2px solid rgba(84, 29, 255, 0.16);
  border-left-width: 0;
  transition: flex 0.2s ease, border-left-width 0.2s ease;
}

.dashboard-properties--visible {
  flex: 0 0 384px;
  border-left-width: 2px;
}

.dashboard-properties {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dashboard-properties-header {
  flex-shrink: 0;
  height: 80px;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.dashboard-properties-close {
  margin-left: 0;
  margin-right: auto;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #591dff;
  outline: none;
}

.dashboard-properties-close-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  stroke: #591dff;
}

.dashboard-properties-preview {
  flex-shrink: 0;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-properties-preview-hexlin {
  width: 200px;
  height: 200px;
  position: relative;
  opacity: 0;
  transform: scale(0.8);
  transform-origin: center center;
}

.dashboard-properties-preview-hexlin--img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-properties-preview-hexlin-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dashboard-properties-preview-hexlin-img--visible {
  opacity: 1;
}

.dashboard-properties--preview-visible .dashboard-properties-preview-hexlin {
  animation: properties-hexlin-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes properties-hexlin-pop {
  0% { opacity: 0; transform: scale(0.8); }
  70% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

.dashboard-properties-preview-hexlin [data-layer] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.dashboard-properties-preview-hexlin [data-layer] svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dashboard-properties-stats {
  flex-shrink: 0;
  padding: 32px 16px 16px;
  box-sizing: border-box;
}

.dashboard-properties-stats-chart {
  width: 100%;
  height: 152px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-properties-stats-chart-wrap {
  position: relative;
  width: 152px;
  height: 152px;
  flex-shrink: 0;
}

.dashboard-properties-stats-chart-wrap svg {
  display: block;
  width: 152px;
  height: 152px;
  overflow: visible;
}

.dashboard-properties-stats-chart-icon {
  position: absolute;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.dashboard-properties-stats-chart-icon .ti {
  font-size: 16px;
  width: 16px;
  height: 16px;
  display: block;
}

.dashboard-properties-stats-chart-icon-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  white-space: nowrap;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  color: #fff;
  background: rgba(0, 6, 43, 0.95);
  padding: 8px 12px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 10;
}

.dashboard-properties-stats-chart-icon:hover .dashboard-properties-stats-chart-icon-tooltip {
  opacity: 1;
  visibility: visible;
}

.dashboard-battle-wrap {
  position: relative;
}

.dashboard-battle-wrap .grid-pattern {
  position: absolute;
  inset: 0;
}

.dashboard-play-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.play-p1-section,
.play-p2-section {
  flex: 0 0 280px;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: 48px;
  gap: 16px;
  background: #00062b;
  background-image: linear-gradient(to bottom, rgba(84, 29, 255, 0.04) 0%, transparent 100%);
  border: none;
  overflow: hidden;
  box-sizing: border-box;
}

.play-p1-section {
  border-right: 2px solid rgba(84, 29, 255, 0.16);
}

.play-p2-section {
  border-left: 2px solid rgba(84, 29, 255, 0.16);
}

.play-section-preview {
  flex-shrink: 0;
  height: 184px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-section-preview-hexlin {
  width: 184px;
  height: 184px;
  position: relative;
}

.play-section-preview-hexlin [data-layer] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.play-section-preview-hexlin [data-layer] svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.play-section-preview-hexlin--img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-section-preview-hexlin-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-section-preview-hexlin-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(84, 29, 255, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.play-section-preview-hexlin-spinner--visible {
  opacity: 1;
}

.play-section-preview-hexlin-spinner svg {
  width: 32px;
  height: 32px;
  animation: launch-spinner-spin 0.8s linear infinite;
}

.play-section-preview-hexlin-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.play-section-preview-hexlin-img--visible {
  opacity: 1;
}

.play-section-stats-chart {
  flex-shrink: 0;
  width: 100%;
  height: 152px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 0 16px;
  box-sizing: border-box;
}

.play-section-stats-chart .dashboard-properties-stats-chart-wrap,
.play-section-stats-chart .dashboard-properties-stats-chart-wrap svg {
  width: 152px;
  height: 152px;
}

.play-section-stats-chart .dashboard-properties-stats-chart-icon {
  position: absolute;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.play-section-stats-chart .dashboard-properties-stats-chart-icon .ti {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.play-section-stats-chart .dashboard-properties-stats-chart-icon-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  white-space: nowrap;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  color: #fff;
  background: rgba(0, 6, 43, 0.95);
  padding: 8px 12px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 10;
}

.play-section-stats-chart .dashboard-properties-stats-chart-icon:hover .dashboard-properties-stats-chart-icon-tooltip {
  opacity: 1;
  visibility: visible;
}

.play-board {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: rgba(0, 6, 43, 0.64);
  background-image: linear-gradient(to top, rgba(84, 29, 255, 0.04) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.play-board-hex--disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.play-board-hex--disabled:hover {
  fill: rgba(0, 6, 43, 0.4);
  stroke: rgba(29, 99, 255, 0.5);
}

.play-board-start-btn {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 24px;
  color: #00062b;
  background: #591dff;
  border: none;
  border-radius: 16px;
  padding: 24px 32px;
  cursor: pointer;
  outline: none;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: box-shadow 0.15s ease;
}

.play-board-start-btn.is-visible {
  display: flex;
  animation: play-board-start-bounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.play-board-start-btn.is-exiting {
  display: flex;
  pointer-events: none;
  animation: play-board-start-exit 0.35s ease forwards;
}

.play-board-start-btn:hover {
  box-shadow: 0 4px 12px rgba(84, 29, 255, 0.4);
}

.play-board-start-btn__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  stroke: #00062b;
}

.play-board-again-btn {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 24px;
  color: #00062b;
  background: #591dff;
  border: none;
  border-radius: 16px;
  padding: 24px 32px;
  cursor: pointer;
  outline: none;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: box-shadow 0.15s ease;
}

.play-board-again-btn.is-visible {
  display: flex;
  animation: play-board-start-bounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.play-board-again-btn.is-exiting {
  display: flex;
  pointer-events: none;
  animation: play-board-start-exit 0.35s ease forwards;
}

.play-board-again-btn:hover {
  box-shadow: 0 4px 12px rgba(84, 29, 255, 0.4);
}

@keyframes play-board-start-bounce {
  0% { opacity: 0; transform: translateX(-50%) translateY(24px); }
  70% { opacity: 1; transform: translateX(-50%) translateY(-4px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes play-board-start-exit {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(24px); }
}

.play-board-hexlin-fo {
  overflow: visible;
  pointer-events: none;
}

.play-board-hexlin {
  width: 100%;
  height: 100%;
  position: relative;
  pointer-events: none;
}

.play-board-hexlin [data-layer] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.play-board-result-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 32px;
  line-height: 1.2;
  color: #42d3e2;
  text-align: center;
  pointer-events: none;
  z-index: 10;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.play-board-hexlin [data-layer] svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.play-board-hexlin--pop {
  transform-origin: center center;
  animation: play-board-hexlin-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.play-board-hexlin--img-wrap {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}

.play-board-hexlin-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(84, 29, 255, 0.6);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.play-board-hexlin-spinner--visible {
  opacity: 1;
}

.play-board-hexlin-spinner svg {
  width: 32px;
  height: 32px;
  animation: launch-spinner-spin 0.8s linear infinite;
}

.play-board-hexlin-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.2s ease;
  display: block;
}

.play-board-hexlin-img--visible {
  opacity: 1;
}

@keyframes play-board-hexlin-pop {
  0% { opacity: 0; transform: scale(0.6); }
  70% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

.play-board-svg-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.play-board-svg-wrap svg {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.play-board-hex {
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.play-board-hex:hover {
  fill: rgba(0, 6, 43, 0.7);
  stroke: rgba(0, 219, 255, 0.6);
}

.dashboard-tab {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 16px;
  text-align: center;
  padding: 0;
  border: none;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 48px;
  box-sizing: border-box;
  transition: color 0.2s, background 0.2s;
}

/* Pair buttons (Hexlins/Test and Test/Sign out): inactive = 16% purple fill + purple text */
.dashboard-tab--pair {
  color: #591dff;
  background: rgba(84, 29, 255, 0.16);
}

.dashboard-tab--pair:hover {
  color: #42d3e2;
}

.dashboard-tab--pair.dashboard-tab--active {
  color: #42d3e2;
  background: rgba(0, 219, 255, 0.16);
}

.dashboard-tab--pair.dashboard-tab--active:hover {
  color: #42d3e2;
  background: rgba(0, 219, 255, 0.16);
}

/* Sign out: same as pair styling but never gets --active; hover text #E2233E */
.dashboard-tab--sign-out {
  color: #591dff;
  background: rgba(84, 29, 255, 0.16);
}

.dashboard-tab--sign-out:hover {
  color: #ff1038;
}

/* Center Battle button: inactive = solid purple, dark text */
.dashboard-tab--center {
  color: #00062b;
  background: #591dff;
  border-radius: 8px;
}

.dashboard-tab--center:hover {
  background: #42d3e2;
}

.dashboard-tab--center.dashboard-tab--active {
  background: #42d3e2;
  color: #00062b;
}

.dashboard-tab--center.dashboard-tab--active:hover {
  background: #42d3e2;
  color: #00062b;
}

.dashboard {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  flex: 1;
  padding: 0;
  box-sizing: border-box;
}

.dashboard-placeholder {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}
