*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

:root {
  --bg-base: #131313;
  --bg-surface: #161616;
  --bg-elevated: #1e1e1e;
  --border: #2a2a2a;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.55);
  --gold: #f5c518;
  --gold-light: #ffd966;
  --green-start: #4ade80;
  --green-end: #22c55e;
  --red-start: #f87171;
  --red-end: #ef4444;
  --sidebar-width: 240px;
  --header-height: 58px;
  --announcement-height: 34px;
  --bottom-nav-height: 58px;
  --bottom-nav-float: 24px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.4;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

body::-webkit-scrollbar {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
label:focus {
  outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(245, 197, 24, 0.65);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  user-select: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  background: rgba(22, 22, 22, 0.96);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem 1rem;
  padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2.5rem 1.35rem;
  min-height: 72px;
}

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

.sidebar-logo {
  width: 120px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.sidebar-close {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: #ffffff;
  background: transparent;
  padding: 0;
}

.sidebar-close svg {
  width: 24px;
  height: 24px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-right: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  background: transparent;
  transition: background-color 0.2s ease, filter 0.2s ease;
}

.nav-item:not(.nav-item--promo):not(.nav-item--deposit):not(.nav-item--withdraw):hover,
.nav-item:not(.nav-item--promo):not(.nav-item--deposit):not(.nav-item--withdraw).is-active {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.nav-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}

.nav-item--promo {
  background: linear-gradient(135deg, #ffffff 0%, #d4d4d4 100%);
  color: #111;
}

.nav-item--promo:hover,
.nav-item--promo.is-active {
  background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
  color: #111;
}

.nav-item--deposit {
  background: linear-gradient(135deg, var(--green-start) 0%, var(--green-end) 100%);
  color: #052e16;
}

.nav-item--deposit:hover,
.nav-item--deposit.is-active {
  background: linear-gradient(135deg, #86efac 0%, var(--green-end) 100%);
  color: #052e16;
}

.nav-item--withdraw {
  background: linear-gradient(135deg, var(--red-start) 0%, var(--red-end) 100%);
  color: #450a0a;
}

.nav-item--withdraw:hover,
.nav-item--withdraw.is-active {
  background: linear-gradient(135deg, #fca5a5 0%, var(--red-end) 100%);
  color: #450a0a;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem 0.25rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.sidebar-logout {
  display: none;
  align-items: center;
  justify-content: center;
  width: 50%;
  margin: 0 auto;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  background: rgb(116, 1, 1);
  color: #ffffff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #ffffff;
}

body.is-logged-in .sidebar-logout {
  display: flex;
}

.auth-guest {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.auth-guest .btn {
  width: 90px;
  flex-shrink: 0;
}

body.is-logged-in .auth-guest {
  display: none;
}

.auth-user {
  display: none;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

body.is-logged-in .auth-user {
  display: flex;
}

body.is-logged-in .site-header {
  grid-template-columns: 44px auto 1fr;
}

body.is-logged-in .header-logo {
  justify-self: start;
}

body.is-logged-in .header-actions {
  width: 100%;
  min-width: 0;
}

.header-balance {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0.45rem 0.3rem 0.35rem;
  border-radius: var(--radius-pill);
  background: rgba(17, 17, 17, 0.55);
  border: 1px solid rgb(73, 73, 73);
}

.header-balance__coin {
  display: block;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.header-balance__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: right;
}

.header-balance__refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgb(255, 255, 255);
  cursor: pointer;
  transition: color 0.2s ease;
}

.header-balance__refresh:hover {
  color: #fff;
}

.header-balance__refresh svg {
  width: 14px;
  height: 14px;
}

.header-balance__refresh.is-spinning svg {
  animation: header-balance-spin 0.65s linear;
}

.header-wallet-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

.header-wallet-group .header-balance {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

.header-balance--promotion {
  border-color: rgba(245, 197, 24, 0.55);
  box-shadow: 0 0 8px rgba(245, 197, 24, 0.12);
}

.header-promotion-balance--mobile {
  flex-shrink: 0;
  min-width: 118px;
  max-width: 168px;
}

@media (min-width: 901px) {
  .header-promotion-balance--mobile {
    display: none !important;
  }

  .header-wallet-group .header-balance {
    flex: 0 1 auto;
    min-width: 128px;
    max-width: 168px;
  }
}

@media (max-width: 900px) {
  .header-promotion-balance--desktop {
    display: none !important;
  }
}

@media (min-width: 901px) {
  .header-wallet-group .header-balance__value {
    font-size: 0.82rem;
  }
}

@keyframes header-balance-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.header-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.9);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.header-profile:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.header-profile svg {
  width: 18px;
  height: 18px;
}

.profile-page {
  padding: 1rem 0.75rem 2rem;
  max-width: 480px;
  margin: 0 auto;
}

.profile-card {
  padding: 1.35rem 1rem 1.15rem;
  border-radius: 1rem;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-card__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.profile-card__logo img {
  height: 38px;
  width: auto;
}

.profile-card__title {
  margin: 0 0 1.15rem;
  padding-bottom: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-info {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-info__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-info__row:last-child {
  border-bottom: none;
}

.profile-info__row dt {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  flex-shrink: 0;
}

.profile-info__row--bank dt {
  color: #8b9cff;
}

.profile-info__row dd {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-align: right;
  word-break: break-word;
}

.profile-info__value--username {
  color: #67e8f9;
}

.profile-info__value--balance {
  color: var(--gold);
  font-weight: 800;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.35rem;
}

.profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
}

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

.profile-btn--bank {
  background: linear-gradient(180deg, #7b8fd6 0%, #5a6bb8 100%);
}

.profile-btn--bank:hover {
  filter: brightness(1.06);
}

.profile-btn--password {
  background: linear-gradient(180deg, #9b2c2c 0%, #740101 100%);
}

.profile-btn--password:hover {
  filter: brightness(1.08);
}

.profile-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

.profile-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.profile-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.profile-btn[hidden] {
  display: none !important;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.profile-modal[hidden] {
  display: none;
}

.profile-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
}

.profile-modal__card {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  padding: 1.35rem 1.15rem 1.15rem;
  border-radius: 1rem;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-modal__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  color: #ffffff;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.profile-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.profile-message {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.profile-message[hidden] {
  display: none;
}

.profile-message--error {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.profile-message--success {
  background: rgba(74, 222, 128, 0.12);
  color: #86efac;
}

.auth-input--select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.55) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.55) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 2px),
    calc(100% - 12px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2rem;
  cursor: pointer;
}

.auth-input--select option {
  background: #1a1a1a;
  color: #ffffff;
}

body.profile-modal-open {
  overflow: hidden;
}

.game-alert-modal {
  z-index: 420;
}

.game-alert-modal__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: min(100%, 340px);
  padding: 1.5rem 1.35rem 1.25rem;
  text-align: center;
  border: 1px solid rgba(245, 197, 24, 0.22);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.game-alert-modal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: var(--gold);
  background: rgba(245, 197, 24, 0.1);
  border: 2px solid rgba(245, 197, 24, 0.42);
  box-shadow: 0 0 18px rgba(245, 197, 24, 0.12);
}

.game-alert-modal__icon svg {
  display: block;
  width: 28px;
  height: 28px;
}

.game-alert-modal__message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0 0.15rem;
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 255, 255, 0.95);
}

.game-alert-modal__message-line {
  display: block;
}

.game-alert-modal__message-line--warn {
  color: #fca5a5;
}

.game-alert-modal__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 0.15rem;
}

.game-alert-modal__ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  min-height: 44px;
  padding: 0.62rem 2.25rem;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #1a1400;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.game-alert-modal__ok:hover {
  filter: brightness(1.05);
}

.game-alert-modal__ok:active {
  transform: scale(0.98);
}

body.profile-bank-picker-open {
  overflow: hidden;
}

.bank-select {
  position: relative;
  width: 100%;
}

.bank-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 46px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  background: #1a1a1a;
  color: #ffffff;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bank-select-trigger:hover:not(:disabled) {
  border-color: rgba(245, 197, 24, 0.45);
}

.bank-select.is-open .bank-select-trigger,
.bank-select-trigger:focus-visible {
  border-color: rgba(245, 197, 24, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.12);
  outline: none;
}

.bank-select-value {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.bank-select-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.65);
  transition: transform 0.2s ease;
}

.bank-select.is-open .bank-select-chevron {
  transform: rotate(180deg);
}

.bank-select-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.92);
}

.bank-select-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}

.bank-select-icon--empty {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
}

.bank-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.bank-picker-modal[hidden] {
  display: none !important;
}

.bank-picker-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
}

.bank-picker-modal__card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(80vh, 560px);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.1rem 1rem;
  border-radius: 1rem;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bank-picker-modal__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
  color: #ffffff;
}

.bank-picker-modal__subtitle {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}

.bank-picker-modal__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  scrollbar-width: none;
}

.bank-picker-modal__list::-webkit-scrollbar {
  display: none;
}

.bank-picker-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  background: #1a1a1a;
  color: #ffffff;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.bank-picker-item:hover:not(:disabled),
.bank-picker-item.is-selected {
  border-color: rgba(245, 197, 24, 0.45);
  background: rgba(245, 197, 24, 0.08);
}

.bank-picker-item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.bank-picker-item__main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.bank-picker-item__check {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.bank-picker-item.is-selected .bank-picker-item__check {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: inset 0 0 0 4px #1a1a1a;
}

.bank-picker-modal__actions {
  display: flex;
  justify-content: center;
}

.nav-item--auth {
  display: none;
}

body.is-logged-in .nav-item--auth {
  display: flex;
}

.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #ef4444;
  color: #ef4444;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
}

body.sidebar-open {
  overflow: hidden;
}

/* ── Main wrapper ── */
.main-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ── */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000;
}

/* ── Header ── */
.site-header {
  display: grid;
  grid-template-columns: 44px auto 1fr;
  align-items: center;
  gap: 0.5rem;
  height: var(--header-height);
  padding: 0 0.75rem;
  background: rgba(24, 24, 24, 0.96);
}

.menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--text);
  grid-column: 1;
}

.menu-btn svg {
  width: 24px;
  height: 24px;
}

.header-logo {
  grid-column: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  max-width: 100%;
  min-width: 0;
}

.header-logo img {
  display: block;
  height: 35px;
  width: auto;
  max-width: none;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  grid-column: 3;
  justify-self: end;
  flex-shrink: 0;
  min-width: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  transition: filter 0.2s, transform 0.15s;
  width: 100px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-register {
  background: #ffffff;
  color: #111;
}

.btn-register:hover {
  filter: brightness(0.95);
}

.btn-login {
  background: var(--gold);
  color: #1a1400;
}

.btn-login:hover {
  background: var(--gold-light);
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: none;
  flex-shrink: 0;
  padding: 0;
  cursor: pointer;
  background: transparent;
}

.lang-switcher {
  position: relative;
  flex-shrink: 0;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  padding: 6px;
  border-radius: 10px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 1200;
}

.lang-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.lang-dropdown__item:hover,
.lang-dropdown__item.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.lang-dropdown__item img {
  border-radius: 50%;
  object-fit: cover;
}

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

/* ── Announcement ── */
.announcement-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  height: var(--announcement-height);
  padding: 0 0.75rem;
  background: #1a1a1a;
  overflow: hidden;
}

.announcement-bar__content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.announcement-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}

.announcement-track {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.announcement-text {
  display: flex;
  width: max-content;
  animation: marquee 24s linear infinite;
}

.announcement-text span {
  white-space: nowrap;
  padding-right: 3rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.header-promotion-balance--mobile {
  flex-shrink: 0;
  min-width: 118px;
  max-width: 168px;
}

.header-promotion-balance--mobile[hidden],
.header-promotion-balance--desktop[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  body:not(.page-home):not(.has-active-promotion) .announcement-bar {
    display: none;
  }

  body.is-logged-in.has-active-promotion .announcement-bar {
    display: flex;
  }

  body.is-logged-in .site-header {
    grid-template-columns: 40px minmax(0, 4.5rem) minmax(0, 1fr);
    gap: 0.3rem;
    padding: 0 0.45rem;
    height: 52px;
  }

  body.is-logged-in .header-logo img {
    height: 26px;
  }

  body.is-logged-in .header-actions {
    width: 100%;
    min-width: 0;
    gap: 0.3rem;
  }

  body.is-logged-in .auth-user {
    flex: 1;
    min-width: 0;
    gap: 0.3rem;
  }

  body.is-logged-in .header-wallet-group {
    flex: 1;
    min-width: 0;
  }

  body.is-logged-in .header-wallet-group > .header-balance:first-child {
    min-height: 34px;
    padding: 0.24rem 0.38rem 0.24rem 0.32rem;
    background: rgba(0, 0, 0, 0.72);
    border-color: rgba(115, 115, 115, 0.9);
  }

  body.is-logged-in .header-wallet-group > .header-balance:first-child .header-balance__value {
    color: #ffffff;
    font-size: 0.78rem;
  }

  body.is-logged-in .header-profile {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  body.is-logged-in .lang-btn {
    width: 34px;
    height: 34px;
  }

  body.is-logged-in .announcement-bar {
    height: 38px;
    padding: 0 0.45rem 0.35rem;
    background: #121212;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    gap: 0.25rem;
  }

  body.is-logged-in.has-active-promotion .announcement-bar {
    align-items: stretch;
    height: auto;
    min-height: 34px;
    padding: 0 0 0 0.45rem;
    border-top: none;
  }

  body.is-logged-in.has-active-promotion .announcement-bar__content {
    align-self: center;
  }

  body.is-logged-in.has-active-promotion .main-content {
    padding-top: 0;
  }

  body.is-logged-in .announcement-bar__content {
    gap: 0.35rem;
  }

  body.is-logged-in .announcement-icon {
    width: 18px;
    height: 18px;
  }

  body.is-logged-in .announcement-track {
    mask-image: linear-gradient(90deg, transparent, #000 3%, #000 90%, transparent);
  }

  body.is-logged-in .announcement-text span {
    font-size: 0.7rem;
  }

  body.is-logged-in .header-promotion-balance--mobile.header-balance--promotion {
    align-self: stretch;
    flex: 0 0 auto;
    width: auto;
    min-width: 120px;
    max-width: 42%;
    min-height: 34px;
    margin: 0;
    padding: 0.22rem 0.45rem 0.22rem 0.55rem;
    border-radius: 14px 0 0 14px;
    border: none;
    border-top: 2px solid #4d4d4d;
    border-bottom: 2px solid #4d4d4d;
    border-left: 2px solid #4d4d4d;
    background: rgba(26, 26, 26, 0.98);
    box-shadow: none;
    margin-bottom: 5px;
  }

  body.is-logged-in .header-promotion-balance--mobile .header-balance__coin {
    width: 20px;
    height: 20px;
  }

  body.is-logged-in .header-promotion-balance--mobile .header-balance__value {
    font-size: 12px;
    color: #ffffff;
  }

  body.is-logged-in .header-promotion-balance--mobile .header-balance__refresh {
    width: 20px;
    height: 20px;
  }

  body.is-logged-in .header-promotion-balance--mobile .header-balance__refresh svg {
    width: 13px;
    height: 13px;
  }

  body:not(.page-home) .main-content.main-content--auth {
    min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - var(--bottom-nav-float));
    min-height: calc(100dvh - var(--header-height) - var(--bottom-nav-height) - var(--bottom-nav-float));
  }

  body:not(.is-logged-in) .site-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.5rem;
  }

  body:not(.is-logged-in) .menu-btn {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: 40px;
    height: 40px;
  }

  body:not(.is-logged-in) .header-logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin-left: 2.5rem;
    max-width: 4.5rem;
  }

  body:not(.is-logged-in) .header-logo img {
    height: 28px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
  }

  body:not(.is-logged-in) .header-actions {
    display: contents;
  }

  body:not(.is-logged-in) .auth-guest {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: max-content;
    max-width: 100%;
  }

  body:not(.is-logged-in) .lang-btn {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    flex-shrink: 0;
  }

  body:not(.is-logged-in) .auth-guest .btn {
    width: 90px;
    padding: 0.34rem 0.5rem;
    font-size: 0.72rem;
  }
}

/* ── Main content ── */
.main-content {
  flex: 1;
  padding: 5px 5px 5px 5px;
  padding-bottom: calc(var(--bottom-nav-height) + var(--bottom-nav-float) + 1rem + env(safe-area-inset-bottom, 0px));
}

/* ── Page panels ── */
.page-panel {
  width: 100%;
}

.page-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 360px;
  padding: 2rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  text-align: center;
}

.page-placeholder__title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.page-placeholder__text {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 320px;
}

/* ── Hero banners ── */
.hero-banners {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.banner {
  position: relative;
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 5 / 2;
}

.banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.banner-media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
}

.banner:hover .banner-bg {
  transform: scale(1.03);
}

.banner:hover .banner-media {
  transform: scale(1.02);
  transition: transform 0.4s ease;
}

.banner-bg--olympus {
  background-image: linear-gradient(135deg, #1a0533 0%, #4c1d95 35%, #7c3aed 60%, #f59e0b 100%);
}

.banner-bg--casino {
  background-image: linear-gradient(135deg, #1c1917 0%, #7f1d1d 50%, #fbbf24 100%);
}

.banner-bg--slot {
  background-image: linear-gradient(135deg, #831843 0%, #db2777 45%, #fbcfe8 100%);
}

.banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 1rem 1.25rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
}

.banner-main h2 {
  font-size: 1rem;
  font-weight: 700;
  max-width: 220px;
  line-height: 1.35;
}

.banner-badge,
.banner-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.35rem;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: #1a1400;
  font-size: 0.85rem;
  font-weight: 800;
}

.banner-sub p {
  font-size: 0.85rem;
  font-weight: 700;
}

.banner-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.banner-carousel {
  position: relative;
  display: block;
  padding: 0;
}

.banner-carousel__track {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: inherit;
}

.banner-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.banner-carousel__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.banner-carousel__link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.banner-carousel__dots {
  position: absolute;
  left: 50%;
  bottom: 0.65rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transform: translateX(-50%);
}

.banner-carousel__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.banner-carousel__dot.is-active {
  background: var(--gold);
  transform: scale(1.15);
}

/* ── Game sections ── */
.game-section {
  margin-bottom: 1.75rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 0.75rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title h2 {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.section-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.section-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.view-all:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.game-row {
  overflow: hidden;
  padding-bottom: 0.35rem;
  width: 100%;
}

.game-row-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  will-change: transform;
}

.game-row--scroll-rtl .game-row-track {
  animation: game-scroll-rtl 45s linear infinite;
}

.game-row--scroll-ltr .game-row-track {
  animation: game-scroll-ltr 45s linear infinite;
}

.game-row--scroll-rtl:hover .game-row-track,
.game-row--scroll-ltr:hover .game-row-track {
  animation-play-state: paused;
}

@keyframes game-scroll-rtl {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes game-scroll-ltr {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .game-row--scroll-rtl .game-row-track,
  .game-row--scroll-ltr .game-row-track {
    animation: none;
  }

  .game-row {
    overflow-x: auto;
    mask-image: none;
    scrollbar-width: none;
  }

  .game-row::-webkit-scrollbar {
    display: none;
  }
}

.game-card {
  flex: 0 0 auto;
  width: 120px;
  transition: transform 0.2s;
}

.game-card:hover {
  transform: translateY(-3px);
}

.game-thumb {
  width: 120px;
  height: 160px;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  margin-bottom: 0.45rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.game-thumb--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

button.game-card {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: inherit;
}

.game-card--maintenance {
  position: relative;
  opacity: 0.72;
  cursor: not-allowed;
}

.game-card--maintenance .catalog-maintenance {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(8, 12, 20, 0.62);
  border-radius: var(--radius-md);
}

.game-row__placeholder {
  margin: 0;
  padding: 1rem 0.25rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

.game-card--skeleton {
  pointer-events: none;
}

.game-thumb--skeleton {
  position: relative;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.game-thumb--skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 35%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.08) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: game-skeleton-shimmer 1.35s ease-in-out infinite;
}

.game-name--skeleton {
  display: block;
  width: 72px;
  height: 10px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.game-name--skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.16) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: game-skeleton-shimmer 1.35s ease-in-out infinite;
  animation-delay: 0.15s;
}

@keyframes game-skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-thumb--skeleton::after,
  .game-name--skeleton::after {
    animation: none;
    opacity: 0.35;
    transform: none;
  }
}

.game-name {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Game thumb gradients */
.game-thumb--santa { background-image: linear-gradient(160deg, #7f1d1d, #dc2626, #fca5a5); }
.game-thumb--olympus { background-image: linear-gradient(160deg, #312e81, #6366f1, #fbbf24); }
.game-thumb--athena { background-image: linear-gradient(160deg, #1e3a5f, #38bdf8, #e0f2fe); }
.game-thumb--book { background-image: linear-gradient(160deg, #422006, #d97706, #fde68a); }
.game-thumb--sugar { background-image: linear-gradient(160deg, #831843, #ec4899, #fbcfe8); }
.game-thumb--buffalo { background-image: linear-gradient(160deg, #451a03, #b45309, #fcd34d); }
.game-thumb--wildwest { background-image: linear-gradient(160deg, #78350f, #ea580c, #fed7aa); }
.game-thumb--aztec { background-image: linear-gradient(160deg, #14532d, #16a34a, #bbf7d0); }
.game-thumb--sugar1000 { background-image: linear-gradient(160deg, #701a75, #e879f9, #fae8ff); }
.game-thumb--starlight { background-image: linear-gradient(160deg, #4c1d95, #a855f7, #f0abfc); }
.game-thumb--live1 { background-image: linear-gradient(160deg, #1c1917, #44403c, #d6d3d1); }
.game-thumb--live2 { background-image: linear-gradient(160deg, #450a0a, #991b1b, #fecaca); }
.game-thumb--live3 { background-image: linear-gradient(160deg, #1e1b4b, #4338ca, #c7d2fe); }
.game-thumb--live4 { background-image: linear-gradient(160deg, #713f12, #ca8a04, #fef08a); }
.game-thumb--live5 { background-image: linear-gradient(160deg, #134e4a, #0d9488, #99f6e4); }

/* ── Bottom nav (mobile) ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  padding: 0 0.15rem env(safe-area-inset-bottom, 0);
  background: rgba(24, 24, 24, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
  padding: 0 0.1rem 0.45rem;
  min-width: 0;
  font-size: 0.6rem;
  font-weight: 600;
  color: #ffffff;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  outline: none;
  -webkit-user-select: none;
  user-select: none;
}

.bottom-nav-item img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.bottom-nav-item:active,
.bottom-nav-item.is-active {
  color: var(--gold);
}

.bottom-nav-item.is-active img {
  filter: drop-shadow(0 0 6px rgba(245, 197, 24, 0.45));
}

.bottom-nav-item--center.is-active .bottom-nav-logo {
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.6);
}

.bottom-nav-item--center {
  position: relative;
  top: -5px;
  justify-content: flex-start;
  gap: 0.2rem;
  padding-bottom: 0;
}

.bottom-nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #2a2a2a, #0a0a0a);
  border: 2.5px solid var(--gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
}

.bottom-nav-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.bottom-nav-domain {
  font-size: 0.48rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ── Desktop layout ── */
@media (min-width: 901px) {
  .app {
    display: flex;
  }

  .sidebar {
    position: sticky;
    top: 0;
    flex-shrink: 0;
    transform: none !important;
  }

  .sidebar-close {
    display: none !important;
  }

  .sidebar-overlay {
    display: none !important;
  }

  .top-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    height: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
  }

  .site-header {
    display: flex;
    align-items: center;
    order: 2;
    flex-shrink: 0;
    height: auto;
    padding: 0;
    background: transparent;
    grid-template-columns: unset;
  }

  .menu-btn,
  .header-logo {
    display: none;
  }

  .header-actions {
    grid-column: unset;
  }

  .announcement-bar {
    order: 1;
    flex: 1;
    min-width: 0;
    height: auto;
    padding: 0;
    background: transparent;
  }

  .announcement-icon {
    width: 24px;
    height: 24px;
  }

  .announcement-text span {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
  }

  .btn {
    padding: 0.45rem 1.1rem;
    font-size: 0.82rem;
  }

  .lang-btn {
    width: 36px;
    height: 36px;
  }

  body.is-logged-in .auth-user {
    flex: 0 1 auto;
  }

  .header-profile {
    width: 36px;
    height: 36px;
  }

  .main-wrapper {
    flex: 1;
    min-width: 0;
  }

  .main-content {
    padding-bottom: 2rem;
  }

  .hero-banners {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    row-gap: 0.75rem;
    align-items: stretch;
  }

  .banner-main,
  .banner-carousel {
    grid-column: 1;
    grid-row: 1 / 3;
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    align-self: stretch;
  }

  .banner-main .banner-media,
  .banner-carousel .banner-media {
    object-fit: fill;
  }

  .banner-stack {
    display: contents;
  }

  .banner-sub {
    grid-column: 2;
    aspect-ratio: 5 / 2;
    width: 100%;
    min-height: 0;
  }

  .banner-sub:nth-child(1) {
    grid-row: 1;
  }

  .banner-sub:nth-child(2) {
    grid-row: 2;
  }

  .banner-sub .banner-media {
    object-fit: fill;
  }

  .banner-carousel__track {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  .game-card {
    width: 140px;
  }

  .game-thumb {
    width: 140px;
    height: 186px;
  }

  .bottom-nav {
    display: none;
  }

  body.sidebar-open {
    overflow: auto;
  }
}

/* ── Mobile sidebar drawer ── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-close {
    display: flex;
  }

  .sidebar {
    width: min(var(--sidebar-width), 78vw);
  }
}

@media (max-width: 380px) {
  body:not(.is-logged-in) .auth-guest .btn {
    padding: 0.32rem 0.5rem;
    font-size: 0.66rem;
  }

  body:not(.is-logged-in) .header-logo {
    max-width: 3.75rem;
  }

  body:not(.is-logged-in) .header-logo img {
    height: 26px;
  }
}

@media (max-width: 360px) {
  body:not(.is-logged-in) .auth-guest {
    gap: 0.2rem;
  }

  body:not(.is-logged-in) .lang-btn {
    width: 28px;
    height: 28px;
  }
}

@media (min-width: 1200px) {
  :root {
    --sidebar-width: 260px;
  }

  .banner-main {
    min-height: 320px;
  }

  .banner-main h2 {
    font-size: 1.15rem;
    max-width: 280px;
  }

  .game-card {
    width: 155px;
  }

  .game-thumb {
    width: 155px;
    height: 206px;
  }
}

/* ── Auth pages (Login / Register) ── */
.main-content.main-content--auth {
  padding: 0;
  padding-bottom: calc(var(--bottom-nav-height) + var(--bottom-nav-float) + env(safe-area-inset-bottom, 0px));
  min-height: calc(100vh - var(--header-height) - var(--announcement-height) - var(--bottom-nav-height) - var(--bottom-nav-float));
  min-height: calc(100dvh - var(--header-height) - var(--announcement-height) - var(--bottom-nav-height) - var(--bottom-nav-float));
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: inherit;
  padding: 0;
}

.auth-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: inherit;
  overflow: hidden;
}

.auth-card__visual {
  position: relative;
  flex-shrink: 0;
  height: clamp(220px, 38vh, 320px);
  overflow: hidden;
}

.auth-card__visual-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.45)),
    linear-gradient(145deg, #312e81 0%, #7c3aed 35%, #f59e0b 70%, #ef4444 100%);
}

.auth-card__banner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-card__panel {
  position: relative;
  z-index: 2;
  flex: 1;
  margin-top: -1.35rem;
  padding: 1.75rem 1.25rem 2rem;
  border-radius: 1.75rem 1.75rem 0 0;
  background: #0a0a0a;
}

.auth-card__title {
  margin-bottom: 1.35rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  color: #ffffff;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap .auth-input {
  padding-right: 2.85rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  transform: translateY(-50%);
  cursor: pointer;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--gold);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  background: #1a1a1a;
  color: #ffffff;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.auth-input:focus {
  border-color: rgba(245, 197, 24, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.12);
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #4ade80;
  cursor: pointer;
  user-select: none;
}

.auth-remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #4ade80;
  cursor: pointer;
}

.auth-submit {
  width: 100%;
  height: 48px;
  margin-top: 0.35rem;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: #1a1400;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.auth-submit:hover {
  background: var(--gold-light);
}

.auth-submit:active {
  transform: scale(0.98);
}

.auth-switch {
  margin-top: 1rem;
  font-size: 0.82rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
}

.auth-switch a {
  color: #2dd4bf;
  font-weight: 700;
}

.auth-switch a:hover {
  color: #5eead4;
}

.auth-message {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.auth-message--error {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.auth-message--success {
  background: rgba(74, 222, 128, 0.12);
  color: #86efac;
  border: 1px solid rgba(74, 222, 128, 0.25);
}

@media (min-width: 901px) {
  .main-content.main-content--auth {
    padding: 1.5rem;
    padding-bottom: 2rem;
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100dvh - var(--header-height));
  }

  .auth-page {
    padding: 1rem;
  }

  .auth-card {
    flex-direction: row;
    align-items: stretch;
    width: min(100%, 860px);
    min-height: auto;
    max-height: 520px;
    border-radius: 1.25rem;
    overflow: hidden;
    background: #111111;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  }

  .auth-card__visual {
    flex: 1 1 50%;
    height: auto;
    min-height: 420px;
  }

  .auth-card__panel {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 0;
    padding: 2rem 2.25rem;
    border-radius: 0;
    background: #161616;
  }

  .auth-card__title {
    margin-bottom: 1.5rem;
  }
}
