:root {
  color-scheme: dark;
  --bg: #090806;
  --panel: #151109;
  --panel2: #1c160b;
  --gold: #d9ad4c;
  --gold-bright: #ffe39b;
  --gold-muted: #a7833d;
  --text: #f6edda;
  --muted: #a99b7c;
  --line: rgba(218,175,83,.3);
  --shadow: 0 12px 35px rgba(0,0,0,.35);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(138,91,20,.17), transparent 48%),
    linear-gradient(155deg, #100d08 0%, #080706 65%, #100b06 100%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button { font: inherit; color: inherit; }

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    repeating-linear-gradient(60deg, transparent 0 48px, rgba(203,159,65,.08) 49px, transparent 50px),
    repeating-linear-gradient(-60deg, transparent 0 48px, rgba(203,159,65,.06) 49px, transparent 50px);
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.app-shell {
  position: relative;
  width: min(100%, 620px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: auto;
  padding: 0 15px calc(102px + env(safe-area-inset-bottom));
}

.topbar {
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(218,175,83,.13);
}

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

.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 12px;
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(218,175,83,.12), inset 0 0 14px rgba(218,175,83,.08);
}

.brand-name { font: 800 16px Georgia, serif; letter-spacing: 3px; }
.brand-name span { color: var(--gold); }
.brand-subtitle { margin-top: 3px; color: var(--muted); font-size: 8px; letter-spacing: 2.1px; }

.icon-button {
  width: 39px;
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  font-size: 17px;
}

.app-view { padding: 19px 0 20px; }

.eyebrow {
  margin: 2px 0 12px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.profile-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 142px;
  padding: 17px 15px;
  overflow: hidden;
  border: 1px solid var(--gold);
  border-radius: 25px;
  background:
    radial-gradient(circle at 10% 0%, rgba(215,170,65,.2), transparent 48%),
    linear-gradient(135deg, #211708, #0c0a07 72%);
  box-shadow: var(--shadow), inset 0 0 25px rgba(215,170,65,.035);
}

.profile-card:after {
  content: "✧";
  position: absolute;
  top: -16px;
  right: 88px;
  color: rgba(255,222,145,.13);
  font-size: 110px;
  pointer-events: none;
}

.avatar {
  flex: 0 0 91px;
  width: 91px;
  height: 91px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid #eac35f;
  border-radius: 50%;
  outline: 1px solid rgba(255,230,160,.6);
  background: linear-gradient(145deg, #965a37, #e49c68);
  color: white;
  font-size: 33px;
  font-weight: 750;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-info { min-width: 0; flex: 1; }
.profile-name {
  overflow: hidden;
  color: var(--gold-bright);
  font: 700 21px Georgia, serif;
  letter-spacing: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-username { margin-top: 6px; color: #d8ad59; font-size: 13px; }

.profile-balance {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-width: 86px;
  text-align: right;
}
.balance-number { color: var(--gold-bright); font: 800 26px Georgia, serif; }
.balance-caption { margin-top: 7px; color: #dfc58b; font-size: 10px; letter-spacing: 1px; }
.balance-caption + .balance-caption { margin-top: 9px; }

.section { margin-top: 20px; }
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 12px;
}
.section-title { color: #dfc58b; font-size: 13px; font-weight: 750; letter-spacing: 1.5px; }
.section-action { border: 0; background: none; color: var(--gold); font-size: 11px; }

.theme-panel, .content-panel {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: linear-gradient(145deg, rgba(29,22,11,.96), rgba(12,10,7,.98));
  box-shadow: var(--shadow);
}

.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.theme-option {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(218,175,83,.17);
  border-radius: 19px;
  background: #100d09;
  text-align: center;
  cursor: pointer;
}
.theme-option.selected { border: 2px solid #e8bf4f; padding: 8px; box-shadow: 0 0 17px rgba(227,180,65,.1); }
.theme-preview {
  position: relative;
  height: 91px;
  padding: 10px;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(140deg,#34230a,#090806);
}
.theme-preview:before, .theme-preview:after {
  content: "";
  display: block;
  height: 22px;
  margin-bottom: 8px;
  border: 1px solid rgba(255,222,150,.53);
  border-radius: 12px;
  background: linear-gradient(100deg,rgba(255,255,255,.08),rgba(224,177,63,.13));
}
.theme-preview:after { width: 75%; height: 24px; }
.theme-preview.neon { background: linear-gradient(140deg,#242033,#09080e); }
.theme-preview.neon:before, .theme-preview.neon:after { border-color:#8f7bff; background:rgba(141,115,255,.28); }
.theme-preview.ios { background:linear-gradient(140deg,#bfc8f5,#6854ba); }
.theme-preview.ios:before, .theme-preview.ios:after { border-color:rgba(255,255,255,.8); background:rgba(255,255,255,.28); }
.theme-preview.aurora { background:linear-gradient(140deg,#37b9a4,#163e67); }
.theme-preview.aurora:before, .theme-preview.aurora:after { border-color:#a7f5ed; background:rgba(192,255,247,.25); }
.theme-name { margin-top: 9px; font-size: 12px; font-weight: 750; }

.theme-option.selected:after { content: "✓"; color: #130e05; background: #f3ca5e; width: 22px; height: 22px; display: grid; place-items:center; border-radius:50%; position:absolute; }

.stats-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.stat-card {
  padding: 14px;
  border: 1px solid rgba(218,175,83,.2);
  border-radius: 17px;
  background: rgba(23,17,9,.85);
}
.stat-label { color: var(--muted); font-size: 11px; }
.stat-value { margin-top: 7px; color: var(--gold-bright); font-size: 22px; font-weight: 800; }

.game-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.game-card {
  display: flex;
  flex-direction: column;
  min-height: 164px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg,#21190c,#100d09);
}
.game-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(223,181,89,.32);
  border-radius: 16px;
  background: rgba(225,177,69,.09);
  font-size: 28px;
}
.game-title { margin-top: 12px; font-size: 14px; font-weight: 800; }
.game-description { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.gold-button {
  min-height: 39px;
  margin-top: auto;
  padding: 9px 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(110deg,#9e7628,#f1d27b,#b18a39);
  color: #1a1205;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.info-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(140deg,#20170b,#100d08);
}
.info-card h2 { margin: 0 0 9px; color: var(--gold-bright); font: 700 21px Georgia,serif; }
.info-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }

.back-button {
  margin-bottom: 14px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.bottom-nav {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 620px);
  padding: 9px 9px calc(9px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border: 1px solid rgba(218,175,83,.28);
  border-bottom: 0;
  border-radius: 23px 23px 0 0;
  background: rgba(14,11,7,.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 -8px 32px rgba(0,0,0,.35);
}
.nav-item {
  min-width: 0;
  min-height: 57px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #a99569;
  cursor: pointer;
}
.nav-item span { font-size: 21px; line-height: 1; }
.nav-item small { font-size: 9px; font-weight: 750; }
.nav-item.active {
  background: linear-gradient(140deg,#f9e29a,#d3a740);
  color: #1b1305;
  box-shadow: 0 0 19px rgba(224,178,71,.2);
}

.empty-state { padding: 28px 15px; color: var(--muted); text-align: center; font-size: 13px; }
.footer-note { margin: 20px 0 4px; color: #88734c; font-size: 10px; text-align: center; }

body[data-theme="neon"] {
  --gold: #9c87ff; --gold-bright: #c7baff; --gold-muted: #7764d8;
  --line: rgba(156,135,255,.3);
}
body[data-theme="ios"] {
  --gold: #b6bcff; --gold-bright: #e4e8ff; --gold-muted: #9189d9;
  --line: rgba(190,193,255,.35);
}
body[data-theme="aurora"] {
  --gold: #70d9c8; --gold-bright: #c2fff4; --gold-muted: #399d9a;
  --line: rgba(112,217,200,.3);
}

@media (max-width: 360px) {
  .app-shell { padding-left: 11px; padding-right: 11px; }
  .avatar { flex-basis: 75px; width: 75px; height: 75px; }
  .profile-card { gap: 10px; padding: 13px 10px; }
  .profile-name { font-size: 17px; letter-spacing: 2px; }
  .balance-number { font-size: 22px; }
  .game-grid { gap: 8px; }
}

/* Lucky Wheel */
.wheel-info { margin-top: 10px; }
.wheel-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(218,175,83,.07);
  color: var(--muted);
  font-size: 11px;
}
.wheel-balance strong {
  color: var(--gold-bright);
  font-size: 16px;
}
.wheel-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  margin: 25px auto 15px;
  padding: 17px 0;
}
.wheel-disc {
  display: block;
  width: min(82vw, 340px);
  height: auto;
  aspect-ratio: 1;
  border: 8px solid #d9b45c;
  border-radius: 50%;
  background: #171006;
  box-shadow:
    0 0 0 5px rgba(213,170,79,.14),
    0 0 32px rgba(218,175,83,.2),
    0 14px 35px rgba(0,0,0,.5);
  transform: rotate(0deg);
}
.wheel-pointer {
  position: absolute;
  z-index: 2;
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffe39b;
  font-size: 34px;
  line-height: 1;
  text-shadow: 0 3px 12px rgba(0,0,0,.8);
}
.wheel-status {
  margin: 10px 0;
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}
.wheel-error, .wheel-result {
  margin: 12px 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  text-align: center;
  font-size: 13px;
}
.wheel-error { color: #ffad9f; }
.wheel-result {
  color: var(--gold-bright);
  font-size: 17px;
  font-weight: 850;
}
.wheel-spin-button {
  display: block;
  width: min(100%, 330px);
  min-height: 48px;
  margin: 17px auto;
  font-size: 14px;
}
.wheel-spin-button:disabled {
  opacity: .48;
  cursor: not-allowed;
  filter: grayscale(.35);
}



/* EMPIRE GAMES — Coin Flip */
.coin-info { margin-top: 10px; }

.coin-game-stage {
  margin: 20px 0 16px;
  padding: 20px 12px 16px;
  border: 1px solid rgba(211,174,91,.22);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(189,145,56,.14), transparent 58%),
    linear-gradient(145deg, rgba(255,255,255,.025), rgba(0,0,0,.16));
  text-align: center;
  overflow: hidden;
}

.coin-stage-label {
  color: var(--gold-bright);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 3px;
}

.coin-perspective {
  display: grid;
  place-items: center;
  min-height: 270px;
  perspective: 1000px;
  perspective-origin: 50% 45%;
}

.coin-3d {
  position: relative;
  width: min(66vw, 248px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  will-change: transform;
  filter: drop-shadow(0 17px 20px rgba(0,0,0,.55));
}

.coin-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 7px solid #e6c77c;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow:
    inset 0 0 0 3px rgba(255,255,255,.18),
    inset 0 0 22px rgba(0,0,0,.4),
    0 0 0 3px rgba(0,0,0,.45);
}

.coin-face-orel {
  background:
    radial-gradient(circle at 32% 25%, #ffe9a4, #bd8c32 48%, #54370e 100%);
  border-color: #e9c66d;
}

.coin-face-reshka {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 32% 25%, #e4f8ff, #4389ac 48%, #102b43 100%);
  border-color: #a8d9f0;
}

.coin-face img {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.coin-face-fallback {
  display: flex;
  width: 84%;
  height: 84%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 50%;
  color: #fff0bc;
  text-shadow: 0 2px 5px rgba(0,0,0,.65);
  box-shadow: inset 0 0 0 5px rgba(0,0,0,.13);
}

.coin-face-reshka .coin-face-fallback {
  color: #e2f7ff;
}

.coin-crown {
  font-size: 55px;
  line-height: 1;
}

.coin-face-fallback b {
  font-family: Georgia, serif;
  font-size: 24px;
  letter-spacing: 3px;
}

.coin-face-fallback small {
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 5px;
}

.coin-stage-caption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.coin-choice-section {
  margin: 18px 0;
}

.coin-section-title {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 2px;
  text-align: center;
}

.coin-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

.coin-choice {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 8px;
  border: 1px solid transparent;
  border-radius: 17px;
  color: #fff;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.coin-choice:active { transform: scale(.97); }

.coin-choice-orel {
  border-color: rgba(232,190,91,.38);
  background: linear-gradient(145deg, #5b4216, #241a0b);
  color: #ffe5a0;
}

.coin-choice-reshka {
  border-color: rgba(123,193,226,.38);
  background: linear-gradient(145deg, #174c6e, #102338);
  color: #d8f3ff;
}

.coin-choice.selected {
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(218,181,99,.12), 0 0 22px rgba(218,181,99,.16);
  transform: translateY(-2px);
}

.coin-choice-reshka.selected {
  box-shadow: 0 0 0 3px rgba(112,190,235,.12), 0 0 22px rgba(112,190,235,.19);
}

.coin-choice:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.coin-choice-icon {
  font-size: 30px;
  line-height: 1;
}

.coin-choice-name {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
}

.coin-choice small {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.5px;
  opacity: .8;
}

.coin-flip-button {
  display: block;
  width: 100%;
  min-height: 50px;
  margin: 15px auto 5px;
  font-size: 13px;
}

.coin-flip-button:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.4);
}

.coin-result-card {
  margin: 15px 0;
  padding: 19px 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel);
  text-align: center;
}

.coin-result-win { border-color: rgba(102,190,132,.55); }
.coin-result-loss { border-color: rgba(218,175,83,.35); }

.coin-result-symbol { font-size: 28px; }
.coin-result-title {
  margin-top: 7px;
  color: var(--gold-bright);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.5px;
}
.coin-result-value {
  margin-top: 5px;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 900;
}
.coin-result-detail {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.coin-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 9px;
  margin-top: 18px;
}

.coin-stat-card {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.coin-stat-card strong {
  color: var(--gold-bright);
  font-size: 21px;
  font-weight: 900;
}

.coin-stat-card span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.coin-stat-card .coin-stat-win { color: #80dba0; }
.coin-stat-card .coin-stat-loss { color: #e99a8c; }

@media (prefers-reduced-motion: reduce) {
  .coin-choice { transition: none; }
}


/* EMPIRE GAMES — Profile redesign */
.profile-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 19px;
  min-height: auto;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(226, 185, 91, .48);
  border-radius: 25px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(226,185,91,.18), transparent 52%),
    radial-gradient(ellipse at 100% 100%, rgba(80,128,168,.09), transparent 48%),
    linear-gradient(145deg, #21190d, #100e0a 68%, #0b0c10);
  box-shadow: var(--shadow), inset 0 0 28px rgba(226,185,91,.035);
}

.profile-identity {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.profile-hero .avatar {
  flex: 0 0 78px;
  width: 78px;
  height: 78px;
  border-width: 3px;
  font-size: 27px;
}

.profile-hero .profile-info {
  min-width: 0;
  flex: 1;
}

.profile-label {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 2px;
}

.profile-hero .profile-name {
  max-width: 100%;
  color: #fff0c9;
  font: 800 20px Georgia, serif;
  letter-spacing: .3px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.profile-hero .profile-username {
  margin-top: 5px;
  color: #dfb962;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  color: #a8b6a0;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #86c98b;
  box-shadow: 0 0 9px rgba(134,201,139,.65);
}

.profile-hero .profile-balance {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 15px;
  border-top: 1px solid rgba(226,185,91,.2);
  text-align: left;
}

.balance-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.balance-title {
  color: #d8c69f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.balance-currency {
  padding: 5px 10px;
  border: 1px solid rgba(226,185,91,.35);
  border-radius: 20px;
  color: var(--gold-bright);
  background: rgba(226,185,91,.09);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1px;
}

.balance-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.balance-coin {
  font-size: 25px;
}

.profile-hero .balance-number {
  color: var(--gold-bright);
  font: 800 35px Georgia, serif;
  overflow-wrap: anywhere;
}

.profile-hero .balance-caption {
  margin-top: 3px;
  color: #a99a79;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
}

.profile-stats .stat-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 15px 13px;
  border: 1px solid rgba(218,175,83,.22);
  background:
    linear-gradient(145deg, rgba(35,27,15,.96), rgba(15,13,10,.98));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}

.profile-stats .stat-label {
  min-height: 29px;
  line-height: 1.4;
  font-weight: 650;
}

.profile-stats .stat-value {
  font-size: 25px;
  overflow-wrap: anywhere;
}

.profile-stats .stat-hint {
  margin-top: 5px;
  color: #998d75;
  font-size: 9px;
}

@media (max-width: 360px) {
  .profile-hero {
    padding: 15px;
  }

  .profile-hero .avatar {
    flex-basis: 66px;
    width: 66px;
    height: 66px;
  }

  .profile-hero .profile-name {
    font-size: 17px;
  }

  .profile-stats .stat-card {
    padding: 12px 10px;
  }
}


/* EMPIRE GAMES — Premium Games Collection */
.games-intro {
  position: relative;
  margin-bottom: 19px;
  padding: 21px 18px;
  overflow: hidden;
  border: 1px solid rgba(218,175,83,.28);
  border-radius: 23px;
  background:
    radial-gradient(ellipse at 90% 0%, rgba(218,175,83,.17), transparent 48%),
    linear-gradient(145deg, #21190d, #0d0b08);
  box-shadow: var(--shadow);
}

.games-intro:after {
  content: "♛";
  position: absolute;
  right: 12px;
  top: 9px;
  color: rgba(226,185,91,.09);
  font: 100px Georgia, serif;
  pointer-events: none;
}

.games-intro .eyebrow {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}

.games-intro h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--gold-bright);
  font: 800 24px Georgia, serif;
  letter-spacing: 1px;
}

.games-intro > p {
  position: relative;
  z-index: 1;
  max-width: 290px;
  margin: 9px 0 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.games-intro-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.games-intro-meta span {
  padding: 7px 10px;
  border: 1px solid rgba(218,175,83,.2);
  border-radius: 20px;
  background: rgba(218,175,83,.07);
  color: #dfc58b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .8px;
}

.empire-game-grid {
  gap: 13px;
}

/* EMPIRE GAMES — clickable game cards */
.empire-game-card[data-game] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.empire-game-card[data-game]:active {
  transform: scale(.985);
  border-color: var(--gold-bright);
}


.empire-game-card {
  position: relative;
  min-width: 0;
  min-height: 205px;
  padding: 14px;
  overflow: hidden;
  border-color: rgba(218,175,83,.25);
  background:
    radial-gradient(circle at 100% 0%, rgba(218,175,83,.11), transparent 45%),
    linear-gradient(145deg, #21190e, #0e0c09 75%);
  box-shadow: 0 9px 24px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.025);
  transition: border-color .2s ease, transform .2s ease;
}

.empire-game-card.is-ready:active {
  transform: scale(.98);
  border-color: var(--gold-bright);
}

.game-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
}

.empire-game-card .game-icon {
  width: 57px;
  height: 57px;
  flex: 0 0 57px;
  border: 1px solid rgba(232,191,79,.36);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(218,175,83,.17), rgba(218,175,83,.035));
  box-shadow: inset 0 0 17px rgba(218,175,83,.06);
  font-size: 30px;
}

.game-status {
  padding: 5px 7px;
  border-radius: 20px;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .35px;
  white-space: nowrap;
}

.status-ready {
  border: 1px solid rgba(125,190,126,.25);
  background: rgba(80,150,83,.1);
  color: #9bd49b;
}

.status-disabled {
  border: 1px solid rgba(218,175,83,.2);
  background: rgba(218,175,83,.07);
  color: #d2b77a;
}

.empire-game-card .game-title {
  margin-top: 15px;
  color: var(--gold-bright);
  font: 800 15px Georgia, serif;
  overflow-wrap: anywhere;
}

.empire-game-card .game-description {
  min-height: 49px;
  margin-top: 7px;
  color: #aaa18e;
  font-size: 10px;
  line-height: 1.5;
}

.empire-game-card .game-play-button {
  width: 100%;
  min-height: 36px;
  margin-top: 13px;
  padding: 8px 5px;
  font-size: 9px;
  letter-spacing: .35px;
}

.empire-game-card .game-play-button:disabled {
  opacity: .43;
  cursor: not-allowed;
  filter: grayscale(.65);
}

.games-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin: 24px 0 8px;
  color: #99865f;
  text-align: center;
}

.games-footer span {
  color: var(--gold);
  font: 24px Georgia, serif;
}

.games-footer p {
  margin: 0;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

@media (max-width: 340px) {
  .empire-game-card {
    padding: 11px;
  }

  .game-status {
    padding: 4px 5px;
    font-size: 7px;
  }

  .empire-game-card .game-title {
    font-size: 13px;
  }
}


/* EMPIRE GAMES — Global Leaderboard */
.leaderboard-header {
  position: relative;
  padding: 21px 18px;
  overflow: hidden;
  border: 1px solid rgba(218,175,83,.3);
  border-radius: 23px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(218,175,83,.17), transparent 48%),
    linear-gradient(145deg,#21190d,#0c0a08);
  box-shadow: var(--shadow);
}

.leaderboard-header .eyebrow {
  margin-bottom: 10px;
}

.leaderboard-header h1 {
  margin: 0;
  color: var(--gold-bright);
  font: 800 24px Georgia,serif;
}

.leaderboard-header > p {
  margin: 8px 0 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.leaderboard-count {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid rgba(218,175,83,.25);
  border-radius: 20px;
  background: rgba(218,175,83,.08);
  color: #e4c783;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 1px;
}

.podium-section {
  margin-top: 21px;
}

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  align-items: end;
  gap: 8px;
}

.podium-card {
  min-width: 0;
  min-height: 164px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 11px 5px 13px;
  overflow: hidden;
  border: 1px solid rgba(218,175,83,.22);
  border-radius: 17px;
  background: linear-gradient(155deg,#21190e,#100d09);
  text-align: center;
}

.podium-rank-1 {
  min-height: 195px;
  border-color: rgba(239,197,85,.7);
  background:
    radial-gradient(ellipse at 50% 0%,rgba(239,197,85,.2),transparent 60%),
    linear-gradient(155deg,#30230e,#110e09);
  box-shadow: 0 0 22px rgba(218,175,83,.1);
}

.podium-rank-2 {
  border-color: rgba(190,198,210,.35);
}

.podium-rank-3 {
  border-color: rgba(192,133,80,.35);
}

.podium-medal {
  min-height: 28px;
  font-size: 23px;
}

.podium-avatar {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  margin: 5px 0 9px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: rgba(218,175,83,.12);
  color: var(--gold-bright);
  font: 800 19px Georgia,serif;
}

.podium-rank-1 .podium-avatar {
  width: 52px;
  height: 52px;
  font-size: 22px;
  border-color: #f2d174;
}

.podium-player-name {
  width: 100%;
  overflow: hidden;
  color: #f3e6c8;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-username {
  width: 100%;
  margin-top: 4px;
  overflow: hidden;
  color: #aa9874;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-score {
  margin-top: 10px;
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.podium-score span {
  font-size: 10px;
}

.podium-position {
  margin-top: 5px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
}

.leaderboard-section {
  margin-top: 23px;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(218,175,83,.2);
  border-radius: 16px;
  background: linear-gradient(120deg,#20180d,#100e0a);
}

.leaderboard-rank {
  flex: 0 0 25px;
  color: #d4b36d;
  font: 800 13px Georgia,serif;
  text-align: center;
}

.leaderboard-avatar {
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(218,175,83,.4);
  border-radius: 50%;
  background: rgba(218,175,83,.1);
  color: var(--gold-bright);
  font-weight: 850;
}

.leaderboard-player {
  flex: 1;
  min-width: 0;
}

.leaderboard-name {
  overflow: hidden;
  color: #f0e4cb;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-username {
  margin-top: 4px;
  overflow: hidden;
  color: #a99a7e;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score {
  flex: 0 0 auto;
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 900;
}

.leaderboard-score span {
  font-size: 10px;
}

@media (max-width: 340px) {
  .podium-grid {
    gap: 5px;
  }

  .podium-card {
    padding-left: 3px;
    padding-right: 3px;
  }

  .podium-player-name {
    font-size: 10px;
  }

  .podium-score {
    font-size: 11px;
  }
}


/* EMPIRE GAMES — Achievements */
.achievement-hero {
  position: relative;
  padding: 21px 18px;
  overflow: hidden;
  border: 1px solid rgba(218,175,83,.32);
  border-radius: 23px;
  background:
    radial-gradient(ellipse at 100% 0%,rgba(218,175,83,.19),transparent 50%),
    linear-gradient(145deg,#241b0e,#0d0b08);
  box-shadow: var(--shadow);
}

.achievement-hero h1 {
  margin: 7px 0;
  color: var(--gold-bright);
  font: 800 23px Georgia,serif;
}

.achievement-hero > p {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.achievement-overview {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 7px;
}

.achievement-overview > div {
  min-width: 0;
  padding: 12px 6px;
  border: 1px solid rgba(218,175,83,.21);
  border-radius: 14px;
  background: rgba(218,175,83,.06);
  text-align: center;
}

.achievement-overview strong {
  display: block;
  color: var(--gold-bright);
  font: 800 21px Georgia,serif;
  overflow-wrap: anywhere;
}

.achievement-overview span {
  display: block;
  margin-top: 6px;
  color: #b8a785;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .5px;
}

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

.achievement-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(218,175,83,.19);
  border-radius: 18px;
  background: linear-gradient(135deg,#20180d,#100e0a);
}

.achievement-card.unlocked {
  border-color: rgba(223,181,89,.55);
  background:
    radial-gradient(ellipse at 0% 0%,rgba(218,175,83,.11),transparent 60%),
    linear-gradient(135deg,#241c10,#100e0a);
}

.achievement-card.locked {
  opacity: .78;
}

.achievement-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(218,175,83,.27);
  border-radius: 15px;
  background: rgba(218,175,83,.09);
  font-size: 25px;
}

.achievement-card.locked .achievement-icon {
  filter: grayscale(.75);
}

.achievement-content {
  flex: 1;
  min-width: 0;
}

.achievement-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.achievement-category {
  color: #b9a477;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 1px;
}

.achievement-status {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .4px;
}

.achievement-status.earned {
  color: #9bd49b;
}

.achievement-status.pending {
  color: #c1a979;
}

.achievement-title {
  margin-top: 7px;
  color: var(--gold-bright);
  font: 800 15px Georgia,serif;
}

.achievement-description {
  margin-top: 5px;
  color: #a89d86;
  font-size: 10px;
  line-height: 1.5;
}

.achievement-progress {
  height: 6px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255,255,255,.09);
}

.achievement-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,#9e7628,#f1d27b);
  box-shadow: 0 0 9px rgba(218,175,83,.3);
}

.achievement-card.locked .achievement-progress-fill {
  opacity: .7;
}

.achievement-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: #998d77;
  font-size: 9px;
}

.achievement-games-panel {
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: linear-gradient(145deg,#20180d,#100e0a);
}

.achievement-game-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid rgba(218,175,83,.12);
}

.achievement-game-row:last-child {
  border-bottom: 0;
}

.achievement-game-icon {
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(218,175,83,.09);
  font-size: 19px;
}

.achievement-game-name {
  flex: 1;
  min-width: 0;
  color: #e9d9b5;
  font-size: 10px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.achievement-game-numbers {
  min-width: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.achievement-game-numbers strong {
  color: var(--gold-bright);
  font-size: 12px;
}

.achievement-game-numbers span {
  color: #998d77;
  font-size: 8px;
}

@media (max-width: 340px) {
  .achievement-overview {
    gap: 4px;
  }

  .achievement-overview strong {
    font-size: 18px;
  }

  .achievement-card {
    gap: 8px;
    padding: 11px;
  }

  .achievement-icon {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    font-size: 21px;
  }
}


/* EMPIRE GAMES — Premium Settings */
.settings-hero {
  padding: 21px 18px;
  border: 1px solid rgba(218,175,83,.3);
  border-radius: 23px;
  background:
    radial-gradient(ellipse at 100% 0%,rgba(218,175,83,.17),transparent 50%),
    linear-gradient(145deg,#21190d,#0d0b08);
  box-shadow: var(--shadow);
}

.settings-hero h1 {
  margin: 7px 0;
  color: var(--gold-bright);
  font: 800 24px Georgia,serif;
}

.settings-hero p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.settings-account {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(218,175,83,.25);
  border-radius: 19px;
  background: linear-gradient(140deg,#21190e,#100d09);
}

.settings-account-avatar {
  flex: 0 0 59px;
  width: 59px;
  height: 59px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: rgba(218,175,83,.12);
  color: var(--gold-bright);
  font: 800 20px Georgia,serif;
}

.settings-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-account-info {
  flex: 1;
  min-width: 0;
}

.settings-account-name {
  overflow-wrap: anywhere;
  color: #f1e2c2;
  font: 800 17px Georgia,serif;
}

.settings-account-username {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--gold);
  font-size: 11px;
}

.settings-account-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: #9fba9d;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 1px;
}

.settings-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(218,175,83,.26);
  border-radius: 17px;
  background: linear-gradient(110deg,rgba(218,175,83,.11),rgba(218,175,83,.025));
}

.settings-muted {
  color: #b6a47f;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 1.2px;
}

.settings-balance-value {
  margin-top: 6px;
  color: var(--gold-bright);
  font: 800 25px Georgia,serif;
}

.settings-balance-value span {
  font: 800 11px Arial,sans-serif;
  letter-spacing: 1px;
}

.settings-balance-icon {
  font-size: 31px;
}

.settings-stats {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}

.settings-stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 13px 5px;
  border: 1px solid rgba(218,175,83,.2);
  border-radius: 16px;
  background: linear-gradient(145deg,#21190e,#100d09);
  text-align: center;
}

.settings-stat > span {
  font-size: 20px;
}

.settings-stat strong {
  color: var(--gold-bright);
  font: 800 18px Georgia,serif;
  overflow-wrap: anywhere;
}

.settings-stat small {
  color: #a99a7e;
  font-size: 8px;
  line-height: 1.4;
}

.settings-section-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg,#21190e,#100d09);
}

.settings-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.settings-section-heading strong {
  color: #f0dfbb;
  font-size: 13px;
}

.settings-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.settings-current-theme {
  padding: 6px 9px;
  border: 1px solid rgba(218,175,83,.28);
  border-radius: 20px;
  color: var(--gold-bright);
  background: rgba(218,175,83,.08);
  font-size: 9px;
  font-weight: 800;
}

.settings-theme-grid .theme-option {
  position: relative;
}

.settings-theme-grid .theme-option.selected:after {
  top: 7px;
  right: 7px;
}

.settings-detail-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(218,175,83,.2);
  border-radius: 17px;
  background: linear-gradient(140deg,#21190e,#100d09);
}

.settings-detail-icon {
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(218,175,83,.1);
  font-size: 19px;
}

.settings-detail-info {
  flex: 1;
  min-width: 0;
}

.settings-detail-info strong {
  display: block;
  color: #ead9b5;
  font-size: 12px;
}

.settings-detail-info small {
  display: block;
  margin-top: 4px;
  color: #a99a7e;
  font-size: 9px;
  line-height: 1.4;
}

.settings-detail-value {
  color: var(--gold-bright);
  font-size: 10px;
  font-weight: 850;
}

.settings-about {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(218,175,83,.23);
  border-radius: 18px;
  background: linear-gradient(145deg,#21190e,#100d09);
}

.settings-about-logo {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 15px;
  color: var(--gold-bright);
  font: 29px Georgia,serif;
  box-shadow: inset 0 0 15px rgba(218,175,83,.08);
}

.settings-about strong {
  color: var(--gold-bright);
  font: 800 14px Georgia,serif;
  letter-spacing: 1px;
}

.settings-about p {
  margin: 5px 0;
  color: #d2c2a0;
  font-size: 10px;
}

.settings-about small {
  color: #998d77;
  font-size: 9px;
  line-height: 1.5;
}

@media (max-width: 340px) {
  .settings-stats {
    gap: 5px;
  }

  .settings-stat {
    padding: 10px 3px;
  }

  .settings-stat strong {
    font-size: 15px;
  }

  .settings-detail-card {
    gap: 7px;
    padding: 11px 9px;
  }

  .settings-detail-value {
    font-size: 9px;
  }
}
