@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap');

/* =========================================================================
   1. THEME & GLOBAL STYLES
   ========================================================================= */

/* Define the color palette, typography, and shared sizing variables for the entire application. */
:root {
  /* Palette */
  --bg: #09111c;
  --bg-2: #101b31;
  --panel: rgba(15, 26, 42, 0.88);
  --panel2: rgba(26, 39, 61, 0.96);
  --bdr: rgba(132, 163, 255, 0.18);
  --text: #eef4ff;
  --muted: #acb9d8;
  --row-alt: #081320;
  /* Used for navbar, buttons, and selected tiles */
  --primary: #84eaff;
  --primary-soft: rgba(132, 234, 255, 0.14);
  --primary-2: #ff9fc0;
  --glow: rgba(132, 234, 255, 0.3);
  --shadow-lg: 0 26px 68px rgba(0, 0, 0, 0.28);
  --surface-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);

  /* Typography */
  --font-sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --shell-max: 1240px;
  --shell-gutter: 24px;
  --shell-gutter-mobile: 16px;
  --shell-stack-space: 24px;
  --shell-stack-space-mobile: 16px;
  --nav-pad-x: 20px;
  --nav-pad-y: 14px;
  --panel-pad-x: clamp(1.2rem, 1.8vw, 1.55rem);
  --panel-pad-y: clamp(0.95rem, 1.2vw, 1.15rem);
  --hero-pad-x: clamp(1.45rem, 3vw, 2.35rem);
  --hero-pad-y: clamp(1.15rem, 1.9vw, 1.6rem);

  /* Shared sizing */
  --tile-gap: 12px;
  --mine-tile: clamp(64px, 7.2vw, 104px);
  --keno-tile: clamp(58px, 6.6vw, 92px);

  /* Plinko specific */
  --plinko-input-col: 300px;
  --plinko-mini-w: 140px;
  --plinko-mini-h: 96px;
}

/* Basic body styles and a global scrollbar hide. */
html,
body {
  height: 100%;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(132, 234, 255, 0.14), transparent 24%),
    radial-gradient(circle at right 18%, rgba(255, 159, 192, 0.12), transparent 20%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(22px);
  opacity: 0.72;
  z-index: 0;
}

body::before {
  top: -5rem;
  left: -5rem;
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(132, 234, 255, 0.2), transparent 70%);
  animation: shellFloat 18s ease-in-out infinite;
}

body::after {
  right: -7rem;
  top: 20rem;
  width: 22rem;
  height: 22rem;
  background: radial-gradient(circle, rgba(255, 159, 192, 0.18), transparent 70%);
  animation: shellFloat 22s ease-in-out infinite reverse;
}

/* Hide scrollbars globally, but keep scrolling functionality. */
* {
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* =========================================================================
   2. APP LAYOUT & NAVIGATION
   ========================================================================= */

/* Main application container with padding to account for the fixed navbar. */
#app-container {
  padding: 80px var(--shell-gutter) var(--shell-stack-space);
  position: relative;
  z-index: 1;
  transition: opacity 140ms ease-in-out;
}

#app-container.fade-out {
  opacity: 0;
}

/* Fixed navigation bar at the top of the page. */
#navbar-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--shell-stack-space) var(--shell-gutter) 0;
  display: flex;
  justify-content: center;
  background: transparent;
}

#navbar-container nav {
  width: 100%;
  max-width: var(--shell-max);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 18px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid var(--bdr);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(9, 18, 32, 0.82);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

/* Styling for the navigation list and its items. */
#navbar-container nav ul,
#navbar {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

#navbar-container nav li a,
#navbar li a {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-align: center;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 600;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
  border-radius: 12px;
  border: 1px solid transparent;
}

#navbar-container nav li a::after,
#navbar li a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

#navbar-container nav li a:hover,
#navbar-container nav li a.active,
#navbar li a:hover,
#navbar li a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--bdr);
  transform: translateY(-1px);
}

#navbar-container nav li a:hover::after,
#navbar-container nav li a.active::after,
#navbar li a:hover::after,
#navbar li a.active::after {
  transform: scaleX(1);
}

/* =========================================================================
   3. GENERIC CONTENT & UI COMPONENTS
   ========================================================================= */

/* Styles for generic informational containers (e.g., FAQ, About pages). */
.info-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

.info-container h2 {
  color: var(--primary);
}

.info-container a {
  color: var(--primary);
  text-decoration: none;
}

.info-container a:hover {
  text-decoration: underline;
}

.info-container .container {
  background: var(--panel);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  padding-top: 0.1rem;
  /* Safety for long strings */
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  
}

/* Modernized page layout helpers */
.sa-page {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  display: grid;
  gap: 1.75rem;
  position: relative;
  z-index: 1;
}

.sa-page-wide {
  width: 100%;
  max-width: 1400px;
}

.sa-section {
  display: grid;
  gap: 1.5rem;
}

.sa-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.sa-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.sa-hero {
  display: grid;
  gap: 1.5rem;
  padding: var(--hero-pad-y) var(--hero-pad-x);
  border-radius: 1.25rem;
  background: linear-gradient(135deg, rgba(33, 55, 67, 0.85), rgba(26, 44, 56, 0.95));
  border: 1px solid rgba(85, 112, 134, 0.5);
  box-shadow: 0 20px 40px rgba(4, 14, 22, 0.45);
}

.sa-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 .4rem;
}

.sa-hero-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.sa-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
  margin-top: 1.25rem;
}

.sa-eyebrow {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .75rem;
  color: var(--primary);
  margin-bottom: .5rem;
}

.sa-muted {
  color: var(--muted);
  font-size: .95rem;
}

.sa-center {
  text-align: center;
}

.sa-media {
  background: rgba(7, 29, 42, 0.65);
  border: 1px solid rgba(85, 112, 134, 0.6);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, .35);
}

.sa-media img {
  display: block;
  width: 100%;
  height: auto;
}

.sa-stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 1.25rem;
}

.sa-stat {
  padding: 1rem;
  border-radius: .85rem;
  background: rgba(7, 29, 42, 0.6);
  border: 1px solid rgba(85, 112, 134, 0.4);
}

.sa-stat span {
  display: block;
}

.sa-stat-label {
  color: var(--muted);
  font-size: .85rem;
}

.sa-stat-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.sa-list {
  padding-left: 1.1rem;
  margin: .75rem 0 0;
}

.sa-note {
  padding: .75rem 1rem;
  border-radius: .75rem;
  background: rgba(7, 29, 42, 0.6);
  border: 1px solid rgba(85, 112, 134, 0.4);
  color: var(--muted);
  font-size: .95rem;
}

.sa-address-grid {
  display: grid;
  gap: .75rem;
}

@media (min-width: 900px) {
  .sa-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: start;
  }

  .sa-hero__header {
    grid-column: 1 / -1;
  }
}

/* Reusable button styles. */
.sa-btn {
  width: -moz-available;
  width: -webkit-fill-available;
  max-width: 400px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: .75rem 1.5rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
  transition: transform 220ms var(--ease-smooth), filter 220ms var(--ease-smooth), border-color 220ms var(--ease-smooth), box-shadow 220ms var(--ease-smooth), background-color 220ms var(--ease-smooth);
}

.sa-btn-inline {
  width: auto;
  max-width: none;
  align-self: flex-start;
}

.sa-btn:hover {
  filter: brightness(1.04);
  border-color: rgba(132, 234, 255, 0.22);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
}

.sa-btn:active {
  transform: translateY(1px);
}

.sa-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.sa-btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.sa-btn-primary {
  background: linear-gradient(135deg, var(--primary), #9dc7ff 58%, var(--primary-2));
  color: #07131a;
  border-color: transparent;
}

/* Styling for code snippets. */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* =========================================================================
   4. SEED ANALYZER LAYOUT
   ========================================================================= */

/* Main layout containers and cards for the seed analyzer tool. */
.sa-container {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
}

.sa-card {
  background: var(--panel);
  border: 1px solid rgba(85, 112, 134, 0.6);
  border-radius: 1rem;
  padding: var(--panel-pad-y) var(--panel-pad-x);
  box-shadow: 0 15px 30px rgba(0, 0, 0, .18);
}

.sa-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
}

/* Copyable address + toast for About page */
.copyable-address {
  cursor: pointer;
  background-color: rgba(73, 80, 87, 0.6);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  display: inline-block;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.copyable-address:hover {
  background-color: rgba(108, 117, 125, 0.75);
  color: #f8fafc;
}

.copy-pill {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(10px);
  background: #e2e8f0;
  color: #212529;
  border: 1px solid #ced4da;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
  transition: opacity .18s ease, transform .18s ease;
}

.copy-pill.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Flexbox layout for the main tool interface. */
.sa-layout-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sa-top-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.sa-seed-panel {
  flex: 1 1 320px;
}

#gamesWrap {
  flex: 2 1 450px;
  display: flex;
  flex-direction: column;
}

/* Columnar layout and styled input boxes. */
.sa-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sa-box {
  background: rgba(0, 0, 0, .1);
  border: 1px solid var(--bdr);
  border-radius: .75rem;
  padding: 1.25rem;
}

/* Shared styles for form labels, inputs, and select dropdowns. */
.sa-label {
  display: block;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: .5rem;
  font-size: .875rem;
}

.sa-input,
.sa-select {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--bdr);
  color: var(--text);
  border-radius: .5rem;
  padding: .75rem 1rem;
  font-size: 1rem;
  box-sizing: border-box;
}

/* =========================================================================
   5. GAME-SPECIFIC UI STYLES
   ========================================================================= */

/* --- Game Picker Grid --- */
#gamePickerGridWrap {
  overflow-y: auto;
  flex-grow: 1;
  margin-top: 1rem;
  max-height: 240px;
  padding: .5rem;
  box-sizing: border-box;
}

#gamePickerGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 1rem;
}

.gameCard {
  position: relative;
  width: 100%;
  height: 118px;
  border-radius: .5rem;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: border-color .2s;
}

.gameCard .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .2s;
}

.gameCard:hover .bg {
  transform: scale(1.05);
}

.gameCard .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, 0) 70%);
}

.gameCard .name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .5rem;
  font-size: .875rem;
  font-weight: 600;
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, .7);
}

.gameCard.active {
  border-color: var(--primary);
}

.gameCard.disabled {
  cursor: not-allowed;
  filter: grayscale(1) brightness(.6);
}

.gameCard .coming {
  position: absolute;
  top: .5rem;
  right: .5rem;
  background: #f43f5e;
  color: #fff;
  font-size: .7rem;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 2;
}

/* Dim non-selected games when one is active. */
.app-has-selection #gamePickerGrid .gameCard {
  opacity: .55;
  filter: saturate(.9) contrast(.95);
  transition: opacity .2s;
}

.app-has-selection #gamePickerGrid .gameCard.active {
  opacity: 1;
  filter: none;
}

.app-has-selection #gamePickerGrid .gameCard.disabled {
  filter: grayscale(1) brightness(.6);
}

/* --- Generic Game UI Container --- */
/* By default, game containers shrink to their content. */
#game-ui-container {
  width: fit-content;
  max-width: 100%;
}

/* For specific games like Plinko and Dice, allow the container to fill available width. */
#game-ui-container:has(.plinko-dynamic-layout),
#game-ui-container:has(.game-dice-root) {
  width: 100%;
  width: -moz-available;
  /* Firefox */
  width: -webkit-fill-available;
  /* Chrome/Safari */
  max-width: none;
  margin-inline: 0;
  min-width: 0;
  /* Flexbox safety */
}

/* --- Mines & Keno Grids --- */
#gameGrid .grid25,
#gameGrid .grid40 {
  display: grid;
  gap: 12px;
  justify-content: start;
  width: 100%;
  margin-top: 1rem;
}

#gameGrid .grid25 {
  grid-template-columns: repeat(5, clamp(64px, 7.2vw, 104px));
}

#gameGrid .grid40 {
  grid-template-columns: repeat(8, clamp(58px, 6.6vw, 92px));
}

#gameGrid .tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel2);
  color: var(--text);
  border-radius: .375rem;
  cursor: pointer;
  font-size: .9rem;
  min-width: 0;
  aspect-ratio: 1 / 1;
  width: auto;
  /* Let grid column width control size */
  height: auto;
}

#gameGrid .tile.on {
  background: var(--row-alt);
}

.mines-footer,
.keno-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--muted);
}

.mines-footer .mines-stats-row {
  display: flex;
  gap: 16px;
  align-items: center;
  white-space: nowrap;
  overflow-x: auto;
}

.mines-footer .mines-stats-row span {
  white-space: nowrap;
}

.mines-footer .mines-clear,
.keno-footer .keno-clear {
  align-self: flex-start;
}

.keno-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
}

.keno-selected {
  white-space: nowrap;
  margin-right: 12px;
}

.keno-multis {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  justify-content: flex-start;
}

.keno-multi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 48px;
  height: 48px;
  background: var(--panel2);
  border: 1px solid var(--bdr);
  border-radius: 6px;
  text-align: center;
  position: relative;
}

.keno-multi .k-top {
  font-weight: 700;
  font-size: .8rem;
}

.keno-multi .k-bot {
  font-size: .75rem;
  opacity: .9;
}

.keno-multi .tip-i {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  pointer-events: auto;
  z-index: 2;
}

/* --- Dice --- */
.sa-game-inputs.game-dice {
  width: fit-content;
}

.dice-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--bdr);
  border: 1px solid var(--bdr);
  border-radius: .5rem;
  overflow: hidden;
  margin-top: 1.5rem;
}

.dice-info-box {
  background: var(--panel);
  padding: .75rem 1rem;
}

.dice-info-box .sa-label {
  margin-bottom: .25rem;
}

.sa-input-static {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  padding: .75rem 0;
  font-size: 1rem;
  box-sizing: border-box;
}

.dice-mode-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.dice-mode-btn:hover {
  color: var(--text);
}

.dice-slider-wrap {
  margin-top: .75rem;
}

.dice-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  width: 100%;
  padding: 0 8px;
  margin-bottom: 6px;
  pointer-events: none;
  user-select: none;
}

.dice-track-wrap {
  background: var(--panel2);
  height: 30px;
  border-radius: 999px;
  position: relative;
  user-select: none;
  display: flex;
  align-items: center;
  padding: 0 19px;
}

.dice-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 19px;
  right: 19px;
  height: 14px;
  border-radius: 999px;
  background: #32424b;
  overflow: hidden;
}

.dice-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  background: transparent;
  outline: none;
  position: relative;
  z-index: 2;
  touch-action: none;
}

.dice-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  margin-top: -5px;
  width: 22px;
  height: 22px;
  background: #071d2a;
  cursor: pointer;
  border-radius: 4px;
  border: none;
  box-shadow: 0 0 0 3px #557086;
}

.dice-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: #071d2a;
  cursor: pointer;
  border-radius: 4px;
  border: none;
  box-shadow: 0 0 0 1px #ffffff;
}

.dice-slider::-webkit-slider-runnable-track,
.dice-slider::-moz-range-track {
  background: transparent;
  border: none;
}

/* --- Plinko --- */
.plinko-dynamic-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.plinko-dynamic-layout>.plinko-left-col {
  flex: 0 0 300px;
}

.plinko-dynamic-layout>.sa-game-inputs {
  flex: 0 0 300px;
}

.plinko-left-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plinko-dynamic-layout>.plinko-board-wrapper {
  flex: 1 1 0;
  /* Allow board to grow and fill space */
  min-width: 0;
  /* Flexbox safety */
}

.plinko-board-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  width: 100%;
  max-width: none;
  /* Allow it to scale with the wrapper */
  margin: 0 auto;
}

.plinko-board-col .plinko-svg {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto clamp(-28px, -3.2vw, -14px);
  /* Vertical alignment */
}

.plinko-multi-grid {
  display: grid;
  grid-template-columns: repeat(var(--plinko-cols, 17), minmax(0, 1fr));
  gap: 2px;
}

.plinko-multi-tile {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 2px;
  border-radius: 4px;
  color: #fff;
  font-size: clamp(8px, 2.8vw, 12px);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .5);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #9fb2c1;
}

#resultsTable td.c-result .mini-plinko {
  width: 140px;
  height: 96px;
  flex: 0 0 auto;
}

#resultsTable td.c-result .mini-plinko .plinko-svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
  max-width: none !important;
  max-height: none !important;
  overflow: visible;
}

.plinko-svg .plinko-pin {
  fill: #9fb2c1;
  opacity: .9;
}

.plinko-svg .plinko-path {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .95;
}

.plinko-svg .plinko-ball {
  fill: #071d2a;
  stroke: #0f1c24;
  stroke-width: 1.5px;
}

.plinko-bucket-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.plinko-bucket-strip .bucket {
  min-width: 48px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  background: var(--panel2);
  border: 1px solid var(--bdr);
  border-radius: 6px;
  font-weight: 700;
  font-size: .875rem;
}

.plinko-bucket-strip .bucket.on {
  outline: 2px solid #fb923c;
}

.plinko-sim-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.plinko-sim-layer .plinko-sim-ball {
  fill: #38bdf8;
  stroke: #071d2a;
  stroke-width: .25px !important;
  filter: drop-shadow(0 .25px .5px rgba(0, 0, 0, .45)) !important;
  opacity: .95;
  transition: opacity .12s linear;
}

/* =========================================================================
   6. TABLES & UTILITIES
   ========================================================================= */

/* Shared styles for results tables. */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.table th,
.table td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--bdr);
}

.table th {
  font-weight: 600;
  color: var(--muted);
}

#resultsTable td.c-result {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* General utility classes. */
.sa-game-inputs,
#gameGrid {
  min-width: 0;
  /* Flexbox safety */
}

/* Remove arrows from number input fields. */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Small tooltip icon style. */
.tip-i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #c6d6e5;
  background: #1e313c;
  border: 1px solid #3a515c;
  vertical-align: middle;
  user-select: none;
}

/* =========================================================================
   7. RESPONSIVE MEDIA QUERIES
   ========================================================================= */

/* For medium tablets and smaller */
@media (max-width: 860px) {
  .plinko-dynamic-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .plinko-dynamic-layout>.plinko-left-col,
  .plinko-dynamic-layout>.sa-game-inputs {
    flex-basis: auto;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }

  .plinko-dynamic-layout>.plinko-board-wrapper {
    max-width: 500px;
    width: auto;
    margin: 0 auto;
  }
}

/* For small tablets and mobile devices */
@media (max-width: 768px) {

  /* Navbar */
  #navbar-container nav li a,
  #navbar li a {
    padding: 12px 14px;
    font-size: 16px;
  }

  #app-container {
    padding-top: 96px;
  }

  /* Main game container fills the screen width */
  #game-ui-container {
    width: -webkit-fill-available;
    /* Chrome/Safari */
    width: -moz-available;
    /* Firefox */
    width: 100%;
    /* Fallback */
  }

  /* Game Grids */
  .sa-box.sa-game-inputs.game-keno,
  .sa-box.sa-game-inputs.game-mines {
    width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
  }

  #gameGrid .grid25 {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }

  #gameGrid .grid40 {
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
  }

  #gameGrid .tile {
    font-size: .75rem;
  }

  .keno-row {
    flex-wrap: wrap;
  }

  .keno-multis {
    gap: 6px;
  }

  .keno-multi {
    min-width: 40px;
    height: 40px;
  }

  .keno-multi .k-top {
    font-size: 0.75rem;
  }

  .keno-multi .k-bot {
    font-size: 0.7rem;
  }

  /* UPDATED: Simplified Responsive Table */
  #tableWrapper {
    overflow-x: auto;
  }

  /* 1. Use a more specific selector to override JS styles. */
  /* Use Flexbox for the sticky header for maximum stability. */
  table#resultsTable.table thead tr {
    display: flex;
    width: 100%;
    min-width: 500px;
    /* Set a total width to enable scrolling */
  }

  table#resultsTable.table thead th:nth-child(1) {
    flex: 0 0 80px;
  }

  /* Nonce */
  table#resultsTable.table thead th:nth-child(2) {
    flex: 1 1 auto;
  }

  /* Result */
  table#resultsTable.table thead th:nth-child(3) {
    flex: 0 0 110px;
  }

  /* Multiplier */
  table#resultsTable.table thead th:nth-child(4) {
    flex: 0 0 110px;
  }

  /* Profit */

  /* 2. Use the Grid layout for the body rows. */
  table#resultsTable.table tbody tr {
    /* These values MUST align with the flexbox widths above */
    display: grid;
    grid-template-columns: 80px 1fr 110px 110px;
    min-width: 500px;
  }

  /* 3. General cell styling for mobile */
  table#resultsTable.table th,
  table#resultsTable.table td {
    padding: 10px 8px;
    font-size: 0.9rem;
  }

  table#resultsTable.table td.c-result {
    justify-content: center;
  }
}

/* =========================================================================
   8. REFINED APP SHELL
   ========================================================================= */

:root {
  --bg: #0b1220;
  --bg-2: #151a34;
  --panel: rgba(15, 23, 39, 0.9);
  --panel2: rgba(18, 28, 46, 0.96);
  --bdr: rgba(137, 165, 255, 0.16);
  --text: #f5f7ff;
  --muted: #b2bcdd;
  --row-alt: #0b1220;
  --primary: #85ebff;
  --primary-soft: rgba(133, 235, 255, 0.14);
  --primary-2: #ff9ac2;
  --glow: rgba(133, 235, 255, 0.3);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.24);
  --surface-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

html {
  min-height: 100%;
  background-color: var(--bg);
  background:
    radial-gradient(circle at top left, rgba(133, 235, 255, 0.12), transparent 24%),
    radial-gradient(circle at right 20%, rgba(255, 154, 194, 0.1), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover, cover, cover;
  overscroll-behavior-y: none;
}

body {
  position: relative;
  min-height: 100%;
  background: transparent;
  color: var(--text);
  overscroll-behavior-y: none;
}

a {
  color: var(--primary);
}

.app-shell {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.app-shell__orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.75;
}

.app-shell__orb--one {
  width: 28rem;
  height: 28rem;
  top: -8rem;
  left: -7rem;
  background: radial-gradient(circle, rgba(133, 235, 255, 0.22), transparent 72%);
  animation: shellFloat 18s ease-in-out infinite;
}

.app-shell__orb--two {
  width: 34rem;
  height: 34rem;
  right: -12rem;
  top: 18%;
  background: radial-gradient(circle, rgba(255, 154, 194, 0.16), transparent 70%);
  animation: shellFloat 24s ease-in-out infinite reverse;
}

.app-shell__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.2;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 78%);
}

@keyframes shellFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(2rem, 1.5rem, 0) scale(1.04);
  }
}

#app-container {
  position: relative;
  z-index: 1;
  padding: 132px var(--shell-gutter) var(--shell-stack-space);
}

#navbar-container {
  padding: var(--shell-stack-space) var(--shell-gutter) 0;
  background: transparent;
  border-bottom: none;
}

#navbar-container nav {
  width: 100%;
  margin: 0 auto;
  position: relative;
  isolation: isolate;
  overflow: visible;
  padding: var(--nav-pad-y) var(--nav-pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--bdr);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    var(--panel);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

#navbar-container nav::before {
  content: none;
  position: absolute;
  left: 18px;
  top: 10px;
  z-index: 0;
  font-size: clamp(2.4rem, 4.6vw, 3.35rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
  font-weight: 800;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.038);
  text-shadow: 0 0 26px rgba(133, 235, 255, 0.08);
  pointer-events: none;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.86) 42%, transparent 86%);
}

#navbar-container nav::after {
  content: "";
  position: absolute;
  right: -4.5rem;
  top: -4rem;
  width: 17rem;
  height: 11rem;
  z-index: 0;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(133, 235, 255, 0.08), transparent 72%);
  opacity: 0.72;
  pointer-events: none;
}

#navbar-container nav > * {
  position: relative;
  z-index: 1;
}

#navbar-container nav ul,
#navbar {
  margin-left: auto;
  gap: 0.5rem;
}

#navbar-container nav li a,
#navbar li a {
  position: relative;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  border: 1px solid transparent;
}

#navbar-container nav li a::after,
#navbar li a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

#navbar-container nav li a:hover,
#navbar li a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: var(--bdr);
}

#navbar-container nav li a.active,
#navbar li a.active {
  background: linear-gradient(135deg, rgba(133, 235, 255, 0.18), rgba(158, 167, 255, 0.14), rgba(255, 154, 194, 0.1));
  color: var(--text);
  border-color: rgba(133, 235, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 24px rgba(0, 0, 0, 0.16);
}

#navbar-container nav li a.active::after,
#navbar li a.active::after,
#navbar-container nav li a:hover::after,
#navbar li a:hover::after {
  transform: scaleX(1);
}

.sa-brand {
  display: grid;
  gap: 0.18rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  overflow: visible;
  padding: 8px 10px 10px 2px;
}

.sa-brand__wordmark {
  position: relative;
  display: inline-block;
  overflow: visible;
  padding: 0.2em 0.56em 0.28em 0;
  line-height: 1.02;
  white-space: nowrap;
}

.sa-brand__wordmark-depth,
.sa-brand__wordmark-main {
  display: inline-block;
  font-size: clamp(1.4rem, 2.15vw, 1.78rem);
  letter-spacing: -0.06em;
  font-weight: 800;
  line-height: 1.02;
  padding-right: 0.08em;
}

.sa-brand__wordmark-depth {
  position: absolute;
  inset: 0;
  color: rgba(133, 235, 255, 0.14);
  filter: blur(9px);
  transform: translate3d(6px, 4px, 0);
  text-shadow: 0 0 28px rgba(133, 235, 255, 0.18);
}

.sa-brand__wordmark-main {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #ffffff 0%, #d6e3ff 42%, var(--primary) 70%, var(--primary-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 10px 30px rgba(133, 235, 255, 0.1);
}

.sa-brand__tagline {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  padding-left: 0.2rem;
}

.sa-page {
  gap: 1.5rem;
}

.sa-card,
.sa-hero,
.sa-showcase-card {
  --sa-lift-y: 0px;
  --sa-shift-x: 0px;
  --sa-shift-y: 0px;
  --sa-rotate-x: 0deg;
  --sa-rotate-y: 0deg;
  --sa-reveal-y: 0px;
  --sa-reveal-scale: 1;
  --sa-reveal-opacity: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  opacity: var(--sa-reveal-opacity);
  transform: perspective(1200px) translate3d(var(--sa-shift-x), calc(var(--sa-lift-y) + var(--sa-shift-y) + var(--sa-reveal-y)), 0) scale(var(--sa-reveal-scale)) rotateX(var(--sa-rotate-x)) rotateY(var(--sa-rotate-y));
  transform-style: preserve-3d;
  transition: opacity 260ms var(--ease-smooth), transform 260ms var(--ease-smooth), border-color 260ms var(--ease-smooth), box-shadow 260ms var(--ease-smooth), background-color 260ms var(--ease-smooth);
  will-change: opacity, transform;
}

.sa-card {
  background:
    var(--surface-sheen),
    rgba(9, 21, 30, 0.84);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}

.sa-card--tool {
  padding: var(--panel-pad-y) var(--panel-pad-x);
}

.sa-tool-shell {
  display: grid;
  gap: 1.35rem;
}

.sa-tool-hero__copy {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.sa-tool-header {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.sa-tool-header--about {
  margin-bottom: 0.7rem;
}

.sa-tool-header--about .sa-tool-header__brandmark {
  display: inline-block;
  width: 100%;
  overflow: visible;
  padding: 0.18em 0.22em 0.42em 0;
  line-height: 1.06;
}

.sa-tool-header__brandmark {
  position: relative;
  display: inline-grid;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 0.12em 0.18em 0.2em 0;
  line-height: 0.9;
  white-space: nowrap;
}

.sa-tool-header__brandmark--multiline {
  width: 100%;
  line-height: 1.02;
  white-space: normal;
  overflow: visible;
}

.sa-tool-header__brandmark--multiline .sa-tool-header__brandmark-depth,
.sa-tool-header__brandmark--multiline .sa-tool-header__brandmark-main {
  display: block;
  line-height: 1.06;
  padding: 0 0.08em 0.12em 0;
  white-space: normal;
  text-wrap: balance;
}

.sa-tool-header__brandmark-depth,
.sa-tool-header__brandmark-main {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.075em;
  font-weight: 800;
}

.sa-tool-header__brandmark-depth {
  position: absolute;
  inset: 0;
  color: rgba(133, 235, 255, 0.14);
  filter: blur(10px);
  transform: translate3d(7px, 5px, 0);
  text-shadow: 0 0 28px rgba(133, 235, 255, 0.18);
  pointer-events: none;
}

.sa-tool-header__brandmark-main {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #ffffff 0%, #d6e3ff 42%, var(--primary) 70%, var(--primary-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 10px 30px rgba(133, 235, 255, 0.1);
}

.sa-tool-header__summary {
  margin: 0;
  max-width: 56ch;
  color: #b6cad5;
}

.sa-card--feature {
  position: relative;
  overflow: hidden;
}

.sa-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(133, 235, 255, 0.08), transparent 40%, rgba(255, 154, 194, 0.08));
  opacity: 0;
  transition: opacity 260ms var(--ease-smooth);
  pointer-events: none;
}

.sa-card--feature::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(132, 234, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.sa-card:hover,
.sa-showcase-card:hover {
  --sa-lift-y: -4px;
  border-color: rgba(132, 234, 255, 0.18);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.26);
}

.sa-card:hover::before {
  opacity: 1;
}

.sa-card-kicker {
  margin-bottom: 0.85rem;
  color: #9cdcca;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
}

.sa-text-link {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
}

.sa-text-link:hover {
  color: #9bf8de;
}

.sa-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(132, 234, 255, 0.14), transparent 35%),
    linear-gradient(135deg, rgba(9, 24, 34, 0.95), rgba(10, 31, 42, 0.84));
  border-radius: 28px;
}

.sa-hero__main {
  display: grid;
  gap: 1.1rem;
  align-content: start;
}

.sa-hero__header {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.sa-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 34%, transparent 72%, rgba(132, 234, 255, 0.08));
  opacity: 0.72;
  pointer-events: none;
}

.sa-hero--spotlight::after {
  content: "";
  position: absolute;
  inset: auto -4rem -4rem auto;
  width: 16rem;
  height: 16rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(155, 214, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.sa-hero:hover {
  --sa-lift-y: -4px;
  border-color: rgba(132, 234, 255, 0.2);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
}

.sa-hero-title {
  max-width: none;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0;
}

.sa-hero-subtitle {
  max-width: 60ch;
  color: #b6cad5;
}

.sa-showcase-card {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: 1.35rem;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(132, 234, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(8, 20, 29, 0.82);
}

.sa-showcase-card__label {
  color: #c8fff1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}

.sa-feature-stack {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.sa-feature-stack li {
  display: grid;
  gap: 0.4rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sa-feature-stack strong {
  color: #fff;
  font-size: 1rem;
}

.sa-feature-stack span {
  color: var(--muted);
}

.sa-donate-panel {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem 1.15rem;
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(132, 234, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(8, 20, 29, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sa-donate-panel .sa-hero-subtitle,
.sa-donate-panel .sa-note {
  margin: 0;
}

.sa-address-grid--hero {
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.sa-donate-item {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.sa-donate-label {
  color: #f3fbff;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sa-donate-panel .copyable-address {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.9rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
}

.sa-stat-grid {
  gap: 0.9rem;
}

.sa-stat {
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sa-stat-label {
  color: #95aec0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sa-stat-value {
  margin-top: 0.2rem;
  color: #fff;
}

.sa-btn {
  width: auto;
  max-width: none;
  padding: 0.92rem 1.35rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: #f4fbff;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
  transition: transform 220ms var(--ease-smooth), filter 220ms var(--ease-smooth), border-color 220ms var(--ease-smooth), box-shadow 220ms var(--ease-smooth), background-color 220ms var(--ease-smooth);
}

.sa-hero-actions {
  margin-top: 1rem;
  gap: 0.75rem;
}

.sa-card--feature {
  gap: 0.95rem;
}

.sa-btn-primary {
  background: linear-gradient(135deg, rgba(133, 235, 255, 0.3), rgba(158, 167, 255, 0.2), rgba(255, 154, 194, 0.14));
  border-color: rgba(133, 235, 255, 0.24);
  color: var(--text);
}

.sa-btn:hover {
  filter: brightness(1.02);
  border-color: rgba(132, 234, 255, 0.22);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

#navbar-container nav {
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), border-color 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

#navbar-container nav:hover {
  transform: translateY(-2px);
  border-color: rgba(132, 234, 255, 0.18);
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.34);
}

#navbar-container nav li a,
#navbar li a,
.sa-brand,
.sa-brand__wordmark-main,
.sa-brand__wordmark-depth,
.sa-tool-header__brandmark-main,
.sa-tool-header__brandmark-depth,
.sa-media,
.sa-site-footer__inner {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sa-brand:hover {
  transform: translateY(-1px);
}

.sa-brand:hover .sa-brand__wordmark-depth {
  transform: translate3d(9px, 6px, 0);
  color: rgba(133, 235, 255, 0.18);
}

.sa-brand:hover .sa-brand__wordmark-main {
  filter: brightness(1.04);
}

.sa-media:hover {
  --sa-lift-y: -3px;
  border-color: rgba(132, 234, 255, 0.18);
}

.sa-site-footer__inner:hover {
  border-color: rgba(132, 234, 255, 0.16);
}

.sa-reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition: opacity 720ms var(--ease-smooth), transform 720ms var(--ease-smooth);
  will-change: opacity, transform;
}

.sa-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.sa-card.sa-reveal,
.sa-hero.sa-reveal,
.sa-showcase-card.sa-reveal,
.sa-media.sa-reveal {
  --sa-reveal-opacity: 0;
  --sa-reveal-y: 26px;
  --sa-reveal-scale: 0.985;
  opacity: var(--sa-reveal-opacity);
  transform: perspective(1200px) translate3d(var(--sa-shift-x), calc(var(--sa-lift-y) + var(--sa-shift-y) + var(--sa-reveal-y)), 0) scale(var(--sa-reveal-scale)) rotateX(var(--sa-rotate-x)) rotateY(var(--sa-rotate-y));
  transition: opacity 720ms var(--ease-smooth), transform 720ms var(--ease-smooth), border-color 260ms var(--ease-smooth), box-shadow 260ms var(--ease-smooth), background-color 260ms var(--ease-smooth);
}

.sa-card.sa-reveal.is-visible,
.sa-hero.sa-reveal.is-visible,
.sa-showcase-card.sa-reveal.is-visible,
.sa-media.sa-reveal.is-visible {
  --sa-reveal-opacity: 1;
  --sa-reveal-y: 0px;
  --sa-reveal-scale: 1;
  opacity: var(--sa-reveal-opacity);
}

.sa-reveal-delay-1 {
  transition-delay: 70ms;
}

.sa-reveal-delay-2 {
  transition-delay: 140ms;
}

.sa-reveal-delay-3 {
  transition-delay: 210ms;
}

.sa-media {
  --sa-lift-y: 0px;
  --sa-shift-x: 0px;
  --sa-shift-y: 0px;
  --sa-rotate-x: 0deg;
  --sa-rotate-y: 0deg;
  border-radius: 24px;
  background: rgba(4, 15, 22, 0.7);
  transform: perspective(1200px) translate3d(var(--sa-shift-x), calc(var(--sa-lift-y) + var(--sa-shift-y)), 0) rotateX(var(--sa-rotate-x)) rotateY(var(--sa-rotate-y));
  transform-style: preserve-3d;
}

.sa-media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.copyable-address {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.sa-card--404 {
  padding: 4rem 1.5rem;
}

.sa-site-footer {
  position: relative;
  z-index: 1;
  padding: 0 var(--shell-gutter) var(--shell-stack-space);
}

.sa-site-footer__inner {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 14px 18px;
  border: 1px solid var(--bdr);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    var(--panel);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.sa-motion-surface {
  will-change: transform;
}

@media (max-width: 1080px) {
  #navbar-container nav {
    flex-wrap: nowrap;
    justify-content: space-between;
    overflow-x: auto;
    overflow-y: hidden;
  }

  #navbar-container nav::before {
    display: none;
  }

  .sa-brand {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-start;
    text-align: left;
  }

  #navbar-container nav ul,
  #navbar {
    width: auto;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    margin-left: 0;
    gap: 0.35rem;
  }

  .sa-brand__tagline {
    display: none;
  }

}

@media (max-width: 768px) {
  #app-container {
    padding: 126px var(--shell-gutter-mobile) var(--shell-stack-space-mobile);
  }

  #navbar-container {
    padding: var(--shell-stack-space-mobile) var(--shell-gutter-mobile) 0;
  }

  #navbar-container nav {
    padding: 12px 14px;
    border-radius: 20px;
    gap: 10px 12px;
  }

  #navbar-container nav::before {
    display: none;
  }

  #navbar-container nav::after {
    right: -4rem;
    left: auto;
    top: -4.5rem;
    width: 14rem;
    height: 9rem;
    transform: none;
    opacity: 0.58;
  }

  #navbar-container nav ul,
  #navbar {
    justify-content: flex-start;
  }

  #navbar-container nav li a,
  #navbar li a {
    padding: 9px 10px;
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .sa-brand__wordmark-depth,
  .sa-brand__wordmark-main {
    font-size: clamp(1.08rem, 5.5vw, 1.28rem);
  }

  .sa-tool-header__brandmark-depth,
  .sa-tool-header__brandmark-main {
    font-size: clamp(1.35rem, 8vw, 2rem);
  }

  .sa-hero-title {
    max-width: none;
    font-size: clamp(2.1rem, 9vw, 3rem);
  }

  .sa-site-footer {
    padding: 0 var(--shell-gutter-mobile) var(--shell-stack-space-mobile);
  }

  .sa-site-footer__inner {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.76rem;
    white-space: nowrap;
    overflow-x: auto;
  }

  .sa-page,
  .sa-section,
  .sa-card,
  .sa-hero,
  .sa-showcase-card,
  .sa-stat,
  .sa-feature-stack li,
  .sa-address-grid,
  .sa-address-grid p {
    min-width: 0;
  }

  .sa-card h2,
  .sa-card p,
  .sa-note,
  .sa-hero-title,
  .sa-hero-subtitle,
  .sa-showcase-card__label,
  .sa-feature-stack span,
  .sa-feature-stack strong,
  .sa-stat-label,
  .sa-stat-value,
  .sa-text-link {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .sa-address-grid p {
    margin: 0;
  }

  .copyable-address {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body::before {
    width: 14rem;
    height: 14rem;
    left: -3rem;
  }

  body::after {
    width: 15rem;
    height: 15rem;
    right: -4rem;
    top: 16rem;
  }
}

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

  .sa-reveal {
    opacity: 1;
    transform: none;
  }

  .sa-motion-surface,
  .sa-card,
  .sa-hero,
  .sa-showcase-card,
  .sa-media {
    transform: none !important;
  }
}
