* {
  box-sizing: border-box;
}

html {
  background: #0a0202;
}

body {
  margin: 0;
  min-width: 1024px;
  background: var(--apex-bg);
  color: var(--apex-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

img {
  max-width: 100%;
}

.apex-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-image: var(--apex-icon);
  mask-image: var(--apex-icon);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* ---------- Buttons ---------- */

.apex-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: filter .15s ease, background .15s ease, border-color .15s ease;
}

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

.apex-btn-primary {
  border-color: color-mix(in srgb, var(--apex-accent) 55%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--apex-primary) 88%, #ffffff 6%), color-mix(in srgb, var(--apex-primary) 72%, #000));
  color: #fff7e0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 14px rgba(0, 0, 0, .35);
}

.apex-btn-gold {
  border-color: color-mix(in srgb, var(--apex-accent) 70%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--apex-accent) 92%, #ffffff 8%), color-mix(in srgb, var(--apex-accent) 68%, #7a4d00));
  color: #2a1503;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 14px rgba(0, 0, 0, .35);
}

.apex-btn-ghost {
  border-color: var(--apex-line);
  background: color-mix(in srgb, var(--apex-panel) 72%, transparent);
  color: var(--apex-text);
}

.apex-btn-block {
  width: 100%;
}

/* ---------- Topbar ---------- */

.apex-topbar {
  position: sticky;
  z-index: 60;
  top: 0;
  border-bottom: 1px solid var(--apex-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--apex-surface) 94%, #000), color-mix(in srgb, var(--apex-bg) 88%, #000));
}

.apex-topbar-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(100% - 32px, 1320px);
  height: 62px;
  margin: 0 auto;
}

.apex-topbar-logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 40px;
}

.apex-topbar-logo img {
  display: block;
  max-width: 168px;
  max-height: 62px;
  object-fit: contain;
}

.apex-topbar-logo span {
  color: var(--apex-accent);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .04em;
}

.apex-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.apex-topbar-login {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.apex-field {
  position: relative;
  display: flex;
  align-items: center;
}

.apex-field-icon {
  position: absolute;
  left: 11px;
  display: grid;
  place-items: center;
  color: var(--apex-muted);
  font-size: 14px;
  pointer-events: none;
}

.apex-field input {
  width: 100%;
  padding: 10px 36px 10px 34px;
  border: 1px solid var(--apex-line);
  border-radius: 8px;
  outline: none;
  background: color-mix(in srgb, var(--apex-bg) 72%, #000);
  color: var(--apex-text);
  font-size: 13px;
  transition: border-color .15s ease;
}

.apex-field input:focus {
  border-color: color-mix(in srgb, var(--apex-accent) 60%, transparent);
}

.apex-field input::placeholder {
  color: var(--apex-muted);
}

.apex-field-topbar input {
  width: 192px;
}

.apex-field [data-password-toggle] {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--apex-muted);
  cursor: pointer;
}

.apex-field [data-password-toggle] .apex-eye-on {
  display: none;
}

.apex-field [data-password-toggle][aria-pressed="true"] .apex-eye-on {
  display: inline-block;
}

.apex-field [data-password-toggle][aria-pressed="true"] .apex-eye-off {
  display: none;
}

.apex-topbar-login-compact {
  display: none;
}

.apex-topbar-chat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--apex-line);
  border-radius: 8px;
  color: var(--apex-accent);
  font-size: 13px;
  transition: background .15s ease;
}

.apex-topbar-chat:hover {
  background: color-mix(in srgb, var(--apex-panel) 70%, transparent);
}

.apex-topbar-balance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--apex-accent) 38%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--apex-panel) 82%, transparent);
  color: var(--apex-accent);
  font-size: 13px;
}

.apex-topbar-balance strong {
  font-weight: 600;
}

.apex-topbar-balance button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--apex-muted);
  cursor: pointer;
  transition: color .15s ease, transform .4s ease;
}

.apex-topbar-balance button:hover {
  color: var(--apex-accent);
}

.apex-topbar-balance button.is-loading .apex-icon {
  animation: apex-spin .8s linear infinite;
}

@keyframes apex-spin {
  to { transform: rotate(360deg); }
}

.apex-topbar-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--apex-line);
  border-radius: 8px;
  color: var(--apex-muted);
  font-size: 16px;
  transition: color .15s ease, background .15s ease;
}

.apex-topbar-bell:hover {
  color: var(--apex-text);
  background: color-mix(in srgb, var(--apex-panel) 70%, transparent);
}

.apex-topbar-bell-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 17px;
  padding: 2px 4px;
  border-radius: 9px;
  background: var(--apex-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.apex-account {
  position: relative;
}

.apex-account-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--apex-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--apex-panel) 65%, transparent);
  color: var(--apex-text);
  cursor: pointer;
  transition: background .15s ease;
}

.apex-account-toggle:hover {
  background: color-mix(in srgb, var(--apex-panel) 88%, transparent);
}

.apex-account-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--apex-accent), color-mix(in srgb, var(--apex-accent) 55%, var(--apex-primary)));
  color: color-mix(in srgb, var(--apex-bg) 90%, #000);
  font-size: 14px;
}

.apex-account-name {
  max-width: 140px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apex-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 208px;
  padding: 6px;
  border: 1px solid var(--apex-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--apex-surface) 96%, #000);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}

.apex-account-menu a,
.apex-account-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--apex-muted);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}

.apex-account-menu a:hover,
.apex-account-menu button:hover {
  background: color-mix(in srgb, var(--apex-panel) 78%, transparent);
  color: var(--apex-text);
}

.apex-account-menu form {
  margin: 4px 0 0;
  border-top: 1px solid var(--apex-line);
  padding-top: 4px;
}

/* ---------- Auth error ---------- */

.apex-auth-error {
  width: min(100% - 32px, 1320px);
  margin: 10px auto 0;
  padding: 9px 14px;
  border: 1px solid color-mix(in srgb, #ff8a80 45%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--apex-primary) 24%, var(--apex-bg));
  color: #ff8a80;
  font-size: 13px;
}

/* ---------- Game nav row ---------- */

.apex-game-nav {
  border-bottom: 1px solid var(--apex-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--apex-surface) 90%, #000), color-mix(in srgb, var(--apex-bg) 86%, #000));
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--apex-accent) 22%, transparent);
}

.apex-game-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 28px;
  width: min(100% - 32px, 1320px);
  margin: 0 auto;
  padding: 10px 0 9px;
}

.apex-game-nav-inner a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 2px 4px;
  border-radius: 10px;
  color: var(--apex-muted);
  transition: color .15s ease;
}

.apex-game-nav-chip {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid color-mix(in srgb, var(--apex-accent) 26%, transparent);
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--apex-panel) 92%, #ffffff 6%), color-mix(in srgb, var(--apex-panel) 64%, #000));
  color: color-mix(in srgb, var(--apex-accent) 82%, #ffffff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .09),
    0 3px 8px rgba(0, 0, 0, .38);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}

.apex-game-nav-chip .apex-icon {
  font-size: 24px;
}

.apex-game-nav-chip img {
  display: block;
  width: 39px;
  height: 39px;
  object-fit: contain;
}

.apex-game-nav-inner a:hover {
  color: var(--apex-text);
}

.apex-game-nav-inner a:hover .apex-game-nav-chip {
  border-color: color-mix(in srgb, var(--apex-accent) 60%, transparent);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 6px 14px rgba(0, 0, 0, .45);
}

.apex-game-nav-inner a.is-active {
  color: var(--apex-accent);
}

.apex-game-nav-inner a.is-active .apex-game-nav-chip {
  border-color: color-mix(in srgb, var(--apex-accent) 70%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--apex-primary) 88%, #ffffff 8%), color-mix(in srgb, var(--apex-primary) 62%, #000));
  color: var(--apex-accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 0 0 3px color-mix(in srgb, var(--apex-accent) 14%, transparent),
    0 6px 16px color-mix(in srgb, var(--apex-primary) 55%, transparent);
}

.apex-game-nav-label {
  overflow: hidden;
  max-width: 100%;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apex-game-nav-inner a small {
  position: absolute;
  z-index: 1;
  top: -4px;
  right: calc(50% - 25px);
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--apex-primary);
  color: #fff;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .06em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .4);
}

/* ---------- Running text ---------- */

.apex-running-wrap {
  width: min(100% - 32px, 1320px);
  margin: 12px auto 0;
}

.apex-running-text {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--apex-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--apex-surface) 88%, #000);
  color: var(--apex-muted);
  font-size: 13px;
}

.apex-running-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--apex-primary) 38%, var(--apex-panel));
  color: var(--apex-accent);
}

.apex-running-text marquee {
  flex: 1;
}

/* ---------- Body grid ---------- */

.apex-desktop-body {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr) 236px;
  gap: 16px;
  width: min(100% - 32px, 1320px);
  margin: 14px auto 0;
  align-items: start;
}

/* ---------- Sidebar (shared) ---------- */

.apex-sidebar,
.apex-sidebar-right {
  position: sticky;
  top: 80px;
  display: grid;
  gap: 12px;
}

.apex-sidebar-section {
  padding: 12px;
  border: 1px solid var(--apex-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--apex-surface) 88%, var(--apex-bg));
}

.apex-sidebar-section h2 {
  margin: 0 0 9px;
  padding: 0 4px;
  color: var(--apex-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.apex-sidebar-wallet {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--apex-accent) 34%, transparent);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0, color-mix(in srgb, var(--apex-primary) 26%, transparent), transparent 120px),
    color-mix(in srgb, var(--apex-panel) 80%, var(--apex-bg));
}

.apex-sidebar-wallet-label {
  color: var(--apex-muted);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.apex-sidebar-wallet strong {
  color: var(--apex-accent);
  font-size: 17px;
  font-weight: 600;
}

.apex-sidebar-wallet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.apex-sidebar-wallet-actions .apex-btn {
  padding: 8px 6px;
  font-size: 12px;
}

.apex-sidebar-menu {
  display: grid;
  gap: 2px;
}

.apex-sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--apex-text);
  font-size: 13px;
  transition: background .15s ease, color .15s ease;
}

.apex-sidebar-menu a:hover {
  background: color-mix(in srgb, var(--apex-panel) 82%, transparent);
  color: var(--apex-accent);
}

.apex-sidebar-menu a .apex-icon {
  color: var(--apex-muted);
  font-size: 15px;
}

.apex-sidebar-menu a:hover .apex-icon {
  color: var(--apex-accent);
}

/* ---------- Sidebar service + latest ---------- */

.apex-side-service {
  display: grid;
  gap: 10px;
}

.apex-side-service-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  align-items: center;
}

.apex-side-service-row span {
  color: var(--apex-muted);
  font-size: 12px;
}

.apex-side-service-row strong {
  color: var(--apex-accent);
  font-size: 16px;
  font-weight: 600;
}

.apex-side-service-row strong small {
  font-size: 11px;
}

.apex-side-service-row i {
  display: block;
  grid-column: 1 / -1;
  overflow: hidden;
  height: 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--apex-bg) 80%, #000);
}

.apex-side-service-row i::after {
  display: block;
  width: var(--value, 50%);
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--apex-primary), var(--apex-accent));
  content: "";
}

.apex-side-latest-window {
  overflow: hidden;
  max-height: 118px;
}

.apex-side-latest-track {
  display: grid;
  animation: apex-side-latest-scroll 12s linear infinite;
}

.apex-sidebar-section:hover .apex-side-latest-track {
  animation-play-state: paused;
}

@keyframes apex-side-latest-scroll {
  to { transform: translateY(-50%); }
}

.apex-side-latest-track p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 6px 2px;
  border-bottom: 1px dashed color-mix(in srgb, var(--apex-line) 60%, transparent);
  font-size: 12px;
}

.apex-side-latest-track span {
  color: var(--apex-muted);
}

.apex-side-latest-track strong {
  color: var(--apex-accent);
  font-weight: 500;
}

/* ---------- Sidebar payments ---------- */

.apex-side-payments {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  max-height: 480px;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--apex-panel) transparent;
}

.apex-side-payments article {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
}

.apex-side-payments article i {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

.apex-side-payments img {
  max-width: 96px;
  max-height: 26px;
  object-fit: contain;
}

.apex-side-payments strong {
  overflow: hidden;
  color: #1f2937;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apex-side-payments article span {
  margin-left: auto;
  flex: 0 0 auto;
  color: #16a34a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---------- Main ---------- */

.apex-desktop-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.apex-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--apex-line);
  border-radius: 10px;
  color: var(--apex-muted);
  font-size: 13px;
  text-align: center;
}

/* ---------- Hero ---------- */

.apex-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--apex-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--apex-panel) 62%, var(--apex-bg));
  aspect-ratio: 16 / 6.2;
}

.apex-hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}

.apex-hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.apex-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apex-hero-slide>span {
  color: var(--apex-accent);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: .08em;
}

.apex-hero-controls {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 12px;
  left: 12px;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.apex-hero-controls button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--apex-line);
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: var(--apex-text);
  cursor: pointer;
  pointer-events: auto;
  transition: background .15s ease, color .15s ease;
}

.apex-hero-controls button:hover {
  background: color-mix(in srgb, var(--apex-primary) 70%, #000);
  color: #fff;
}

.apex-hero-dots {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 10px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.apex-hero-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .32);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.apex-hero-dots button.is-active {
  background: var(--apex-accent);
  transform: scale(1.25);
}

/* ---------- Quick actions ---------- */

.apex-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.apex-quick-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 10px;
  border: 1px solid color-mix(in srgb, var(--apex-accent) 34%, transparent);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0, color-mix(in srgb, var(--apex-primary) 22%, transparent), transparent 90px),
    color-mix(in srgb, var(--apex-panel) 78%, var(--apex-bg));
  color: var(--apex-text);
  font-size: 13px;
  font-weight: 500;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}

.apex-quick-action:hover {
  border-color: color-mix(in srgb, var(--apex-accent) 60%, transparent);
  color: var(--apex-accent);
  transform: translateY(-1px);
}

.apex-quick-action .apex-icon {
  color: var(--apex-accent);
  font-size: 16px;
}

/* ---------- Jackpot ---------- */

.apex-jackpot {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--apex-accent) 38%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--apex-panel) 60%, #000);
  min-height: 74px;
}

.apex-jackpot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
}

.apex-jackpot strong {
  position: relative;
  z-index: 1;
  top: 25%;
  max-width: 100%;
  overflow: hidden;
  padding: 14px 20px;
  font-size: clamp(20px, 2.4vw, 32px) !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .75);
  letter-spacing: .03em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------- Mini banners ---------- */

.apex-mini-banners {
  display: grid;
  gap: 10px;
}

.apex-mini-banners img {
  display: block;
  width: 100%;
  border: 1px solid var(--apex-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--apex-panel) 70%, var(--apex-bg));
}

/* ---------- Panel (section container) ---------- */

.apex-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--apex-line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0, color-mix(in srgb, var(--apex-primary) 14%, transparent), transparent 180px),
    color-mix(in srgb, var(--apex-surface) 88%, var(--apex-bg));
}

.apex-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.apex-panel-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--apex-text);
  font-size: 16px;
  font-weight: 600;
}

.apex-panel-head h2 .apex-icon {
  color: var(--apex-accent);
}

.apex-panel-head-side {
  display: flex;
  align-items: center;
  gap: 6px;
}

.apex-panel-head-side button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--apex-line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--apex-panel) 65%, transparent);
  color: var(--apex-muted);
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}

.apex-panel-head-side button:hover {
  color: var(--apex-accent);
  background: color-mix(in srgb, var(--apex-panel) 88%, transparent);
}

.apex-panel-more {
  padding: 5px 12px;
  border: 1px solid var(--apex-line);
  border-radius: 999px;
  color: var(--apex-muted);
  font-size: 11px;
  transition: color .15s ease, border-color .15s ease;
}

.apex-panel-more:hover {
  border-color: color-mix(in srgb, var(--apex-accent) 55%, transparent);
  color: var(--apex-accent);
}

/* ---------- Hot games strip ---------- */

.apex-hot-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.apex-hot-strip::-webkit-scrollbar {
  display: none;
}

.apex-hot-strip>a {
  position: relative;
  display: grid;
  flex: 0 0 148px;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--apex-line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--apex-panel) 62%, var(--apex-bg));
  transition: border-color .15s ease, transform .15s ease;
}

.apex-hot-strip>a:hover {
  border-color: color-mix(in srgb, var(--apex-accent) 55%, transparent);
  transform: translateY(-2px);
}

.apex-hot-strip>a>b {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--apex-primary);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .07em;
}

.apex-hot-game-media {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: color-mix(in srgb, var(--apex-bg) 80%, #000);
  aspect-ratio: 1;
}

.apex-hot-game-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apex-hot-game-media>span {
  color: var(--apex-accent);
  font-size: 22px;
  font-weight: 600;
  text-transform: uppercase;
}

.apex-hot-strip em {
  display: block;
  overflow: hidden;
  height: 15px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--apex-bg) 80%, #000);
  font-style: normal;
}

.apex-hot-strip em span {
  display: block;
  height: 100%;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  line-height: 15px;
  text-align: center;
}

.apex-hot-strip strong {
  overflow: hidden;
  color: var(--apex-text);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apex-hot-strip small {
  overflow: hidden;
  color: var(--apex-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Provider strip ---------- */

.apex-provider-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.apex-provider-strip::-webkit-scrollbar {
  display: none;
}

.apex-provider-strip>a {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 132px;
  gap: 7px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--apex-line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--apex-panel) 62%, var(--apex-bg));
  text-align: center;
  transition: border-color .15s ease, transform .15s ease;
}

.apex-provider-strip>a:hover {
  border-color: color-mix(in srgb, var(--apex-accent) 55%, transparent);
  transform: translateY(-2px);
}

.apex-provider-strip>a img {
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
}

.apex-provider-strip>a.has-portrait {
  padding: 0;
  aspect-ratio: 7 / 9;
}

.apex-provider-strip>a.has-portrait img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.apex-provider-strip>a>span {
  color: var(--apex-accent);
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
}

.apex-provider-strip strong {
  color: var(--apex-text);
  font-size: 12px;
  font-weight: 500;
}

/* ---------- Article ---------- */

.apex-article {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--apex-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--apex-surface) 88%, var(--apex-bg));
}

.apex-article h2 {
  margin: 0;
  color: var(--apex-accent);
  font-size: 16px;
  font-weight: 600;
}

.apex-article-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--apex-muted);
  font-size: 13px;
  line-height: 1.6;
}

.apex-article-copy.is-expanded p {
  -webkit-line-clamp: unset;
}

.apex-article-copy button {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--apex-accent);
  font-size: 12px;
  cursor: pointer;
}

.apex-article-faq {
  display: grid;
  gap: 8px;
}

.apex-article-faq details {
  border: 1px solid var(--apex-line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--apex-panel) 55%, var(--apex-bg));
}

.apex-article-faq summary {
  padding: 11px 14px;
  color: var(--apex-text);
  font-size: 13px;
  cursor: pointer;
}

.apex-article-faq details p {
  margin: 0;
  padding: 0 14px 12px;
  color: var(--apex-muted);
  font-size: 12px;
  line-height: 1.6;
}

/* ---------- Footer ---------- */

.apex-footer {
  width: min(100% - 32px, 1320px);
  margin: 26px auto 0;
  padding-bottom: 26px;
}

.apex-footer-providers {
  padding: 16px;
  border: 1px solid var(--apex-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--apex-surface) 88%, var(--apex-bg));
}

.apex-footer-providers h2 {
  margin: 0 0 12px;
  color: var(--apex-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.apex-footer-provider-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.apex-footer-provider-grid span {
  display: inline-grid;
  place-items: center;
  min-width: 74px;
  min-height: 26px;
  color: var(--apex-muted);
  font-size: 11px;
}

.apex-footer-provider-grid img {
  max-width: 92px;
  max-height: 26px;
  object-fit: contain;
  filter: grayscale(.2);
  opacity: .85;
  transition: filter .15s ease, opacity .15s ease;
}

.apex-footer-provider-grid span:hover img {
  filter: none;
  opacity: 1;
}

.apex-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--apex-line);
  padding-top: 16px;
}

.apex-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.apex-footer-nav a {
  color: var(--apex-muted);
  font-size: 12px;
  transition: color .15s ease;
}

.apex-footer-nav a:hover {
  color: var(--apex-accent);
}

.apex-footer-copy {
  margin: 0;
  color: var(--apex-muted);
  font-size: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1240px) {
  .apex-topbar-login {
    display: none;
  }

  .apex-topbar-login-compact {
    display: inline-flex;
  }
}

@media (max-width: 1180px) {
  .apex-desktop-body {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .apex-sidebar-right {
    position: static;
    grid-column: 1 / -1;
  }

  .apex-side-payments {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    max-height: none;
  }
}

@media (max-width: 1024px) {
  body {
    min-width: 0;
  }

  .apex-desktop-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .apex-sidebar,
  .apex-sidebar-right {
    position: static;
    order: 2;
  }

  .apex-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
