:root {
  --bg1: #0b2a5a;
  --bg2: #0a1532;
  --card: rgba(255, 255, 255, .10);
  --stroke: rgba(255, 255, 255, .18);
  --txt: #eef3ff;
  --shadow: 0 18px 60px rgba(0, 0, 0, .35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--txt);
}

a {
  color: inherit;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.small {
  opacity: .85;
  font-size: 12px;
  line-height: 1.35;
}

.tr {
  text-align: right;
}

label {
  display: block;
  font-size: 12px;
  opacity: .9;
  margin: 10px 0 6px;
}

input,
select,
textarea {
  width: 100%;
  background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  color: var(--txt);
  padding: 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 255, 255, .28);
}

input::placeholder,
textarea::placeholder {
  color: rgba(238, 243, 255, .55);
  opacity: 1;
}

input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--txt);
  transition: background-color 9999s ease-out 0s;
  box-shadow: 0 0 0px 1000px rgba(0, 0, 0, .22) inset;
}

select option {
  background: var(--bg2);
  color: var(--txt);
}

.bg {
  position: fixed;
  inset: 0;
  background: url("./images/wallpaper.png") center center / cover no-repeat;
  z-index: -1;
  pointer-events: none;
}

.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 0;
}

/* Floating sprites (background swimmers) */
#sperm-sprites {
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* Swimmers above UI tiles, but kept subtle for readability */
  z-index: 999;
  contain: layout paint;
  isolation: isolate;
}

.sperm-swimmer {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  transform-origin: var(--ox, 30%) 50%;
  contain: layout paint;
  opacity: 1;
}

.sperm-sprite {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  user-select: none;
  pointer-events: none;
  /* Make swimmers readable on top of tiles */
  opacity: .92;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .42)) contrast(1.08);
  transform-origin: var(--ox, 30%) 50%;
}

/* bubbly overlay */
.bubbles {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, .25), transparent 22%),
    radial-gradient(circle at 30% 70%, rgba(255, 255, 255, .18), transparent 22%),
    radial-gradient(circle at 70% 40%, rgba(255, 255, 255, .22), transparent 22%),
    radial-gradient(circle at 85% 75%, rgba(255, 255, 255, .18), transparent 22%);
  opacity: .9;
  animation: floaty 9s ease-in-out infinite;
}

@keyframes floaty {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero {
  overflow: hidden;
}

.heroInner {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.logo {
  width: min(980px, 96%);
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, .35));
}

.spriteStrip {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 4px 0 2px;
}

.sprite {
  width: 92px;
  height: auto;
  image-rendering: auto;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .35));
  opacity: .98;
}

.flipX {
  transform: scaleX(-1);
}

.sceneStrip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}

.sceneShot {
  width: 100%;
  height: 220px;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .18);
}

.heroMeta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.pill {
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.heroButtons {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.topRight {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.topRight .btn {
  white-space: nowrap;
  padding: 12px 14px;
  border-color: rgba(255, 255, 255, .30);
  background: rgba(255, 255, 255, .16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
}

.topRight .btn.primary {
  background: rgba(120, 210, 255, .55);
  border-color: rgba(120, 210, 255, .70);
}

.adminMenu {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.adminMenuPanel {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sectionTitle {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.subTitle {
  display: flex;
  justify-content: center;
  align-items: center;
}

.titleImg {
  display: block;
  width: auto;
  max-width: 100%;
  height: 58px;
  margin: 0 auto;
}

.subTitleImg {
  display: block;
  width: auto;
  max-width: 100%;
  height: 30px;
  margin: 0 auto;
}

.topRight .walletStatus {
  text-align: right;
}

.imgBtn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .30);
  cursor: pointer;
  user-select: none;
  font-weight: 1000;
  letter-spacing: .6px;
  transition: transform .08s ease, filter .12s ease;
}

/* Customize preview (base + head overlay) */
.sbPreviewWrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-top: 8px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .14);
}

#sbPreviewBase,
#sbPreviewOverlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.imgBtn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.imgBtn:active {
  transform: translateY(0px);
  filter: brightness(.98);
}

.ico {
  font-size: 20px;
}

.green {
  background: linear-gradient(180deg, rgba(60, 255, 160, .95), rgba(0, 170, 90, .92));
}

.pink {
  background: linear-gradient(180deg, rgba(255, 110, 220, .95), rgba(170, 40, 150, .92));
}

.gold {
  background: linear-gradient(180deg, rgba(255, 210, 80, .95), rgba(215, 120, 10, .92));
}

.section {
  padding: 14px 14px 16px;
}

.sectionTitle {
  margin: 0 0 10px;
  font-weight: 1000;
  letter-spacing: .8px;
  text-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}

.subTitle {
  font-weight: 900;
  letter-spacing: .7px;
  margin-bottom: 10px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.glass {
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  padding: 12px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .18);
  color: var(--txt);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
}

.btn:hover {
  background: rgba(255, 255, 255, .14);
}

.primary {
  background: rgba(120, 210, 255, .22);
  border-color: rgba(120, 210, 255, .28);
}

.tokenInfoTop {
  width: 100%;
}

.linkRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.chip {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
  padding: 8px 10px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .4px;
}

.tile {
  width: 100%;
  display: flex;
  justify-content: center;
}

.tileInner {
  margin: 32px 0 24px;
  width: 100%;
  max-width: 100%;
  padding: 18px 18px;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: #fff;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, .14);
}

.chartImg {
  max-width: 100%;
  height: auto;
  margin-bottom: 12px;
  border-radius: 12px;
}

.table {
  background: rgba(0, 0, 0, .16);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  overflow: hidden;
}

.trow {
  display: grid;
  grid-template-columns: 60px 1fr 120px;
  gap: 10px;
  padding: 12px 12px;
  align-items: center;
}

.thead {
  background: rgba(255, 255, 255, .08);
  font-weight: 900;
  letter-spacing: .6px;
}

.trow:nth-child(even) {
  background: rgba(255, 255, 255, .04);
}

.newsList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsItem {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 10px;
  font-weight: 800;
}

.history {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.histItem {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 10px;
  transition: background 0.2s, border-color 0.2s;
}

.histItem:hover {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .20);
}

.raceLink {
  color: #8cbeFF;
  text-decoration: underline;
}

.raceLink:hover {
  color: #aad0ff;
}

.pfpCanvas {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: radial-gradient(500px 500px at 30% 20%, rgba(120, 210, 255, .25), transparent 60%),
    radial-gradient(600px 600px at 70% 80%, rgba(255, 110, 220, .16), transparent 60%),
    rgba(0, 0, 0, .18);
}

.footer {
  text-align: center;
  padding: 6px 0 18px;
}

/* Admin gate overlay (shared with pump page) */
.adminGate {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.90));
  color: #fff;
  z-index: 999;
  padding: 24px;
  box-sizing: border-box;
}

.adminGateCard {
  background: rgba(10, 10, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 24px 20px;
  min-width: 280px;
  max-width: 360px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.adminGateTitle {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.adminGateMsg {
  font-size: 14px;
  color: #e5e5e5;
  margin-bottom: 14px;
}

.adminGateBtn {
  width: 100%;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 12px 10px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.adminGateBtn:hover {
  background: #f6f6f6;
}

.adminGateLink {
  display: block;
  margin-top: 12px;
  color: #9ad1ff;
  font-size: 13px;
  text-decoration: none;
}

.adminGateLink:hover {
  text-decoration: underline;
}

body.admin-locked .adminGate {
  display: flex;
}

body.admin-locked .bg,
body.admin-locked .topRight,
body.admin-locked main,
body.admin-locked .wrap,
body.admin-locked .card,
body.admin-locked .section {
  display: none !important;
}

/* Customize preview: base sperm.gif + head overlay */
.sbPreviewWrap {
  position: relative;
  width: 100%;
  max-width: 512px;
  border-radius: 8px;
  overflow: hidden;
}

.sbPreviewWrap img {
  display: block;
  width: 100%;
  height: auto;
}

#sbPreviewOverlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (max-width: 900px) {
  .heroButtons {
    grid-template-columns: 1fr;
  }

  .heroButtons {
    flex-direction: column;
    align-items: stretch;
  }

  .tileInner {
    width: 100%;
  }

  .sceneStrip {
    grid-template-columns: 1fr;
  }

  .sceneShot {
    height: 240px;
  }
}

.raceTabs {
  display: flex;
  flex-wrap: nowrap;
}

.raceTab {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: var(--txt);
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.9em;
  transition: all 0.2s;
}

.raceTab:hover {
  background: rgba(255, 255, 255, 0.2);
}

.raceTab.active {
  background: var(--prm);
  color: #000;
  border-color: var(--prm);
  font-weight: bold;
}
/* Wallet Selection Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modalContent {
  max-width: 90%;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.walletOption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.walletOption:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.walletIcon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.walletName {
  font-weight: 700;
  font-size: 15px;
}
