/* =====================================================================
   phmoba - layout-phmoba-45bd.css
   Mobile-first canvas (320-430px). CSS class prefix: s45b-
   Palette: #48D1CC | #FF7F50 | #1C2833 (bg) | #00BFFF
   ===================================================================== */

:root {
  --s45b-bg: #1C2833;
  --s45b-bg-2: #16202b;
  --s45b-bg-3: #20303f;
  --s45b-card: #21303f;
  --s45b-teal: #48D1CC;
  --s45b-coral: #FF7F50;
  --s45b-sky: #00BFFF;
  --s45b-ink: #f3fafb;
  --s45b-ink-dim: #9fb4bd;
  --s45b-line: rgba(72, 209, 204, 0.22);
  --s45b-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  --s45b-radius: 14px;
  --s45b-max: 460px;
  --s45b-header-h: 58px;
  --s45b-bottom-h: 62px;
  --s45b-touch: 44px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--s45b-bg);
  color: var(--s45b-ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--s45b-teal);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--s45b-sky);
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 8px;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.2px;
}

p {
  margin: 0 0 12px;
  color: var(--s45b-ink);
}

ul,
ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

li {
  margin-bottom: 6px;
}

/* Center the mobile canvas on wide screens (no desktop layout) */
.s45b-shell {
  max-width: var(--s45b-max);
  margin: 0 auto;
  min-height: 100vh;
  background:
    radial-gradient(1200px 360px at 50% -80px, rgba(0, 191, 255, 0.18), transparent 60%),
    radial-gradient(800px 300px at 100% 0%, rgba(255, 127, 80, 0.12), transparent 60%),
    linear-gradient(180deg, var(--s45b-bg) 0%, var(--s45b-bg-2) 100%);
  position: relative;
  box-shadow: var(--s45b-shadow);
}

/* ---------- Header ---------- */
.s45b-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--s45b-header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: linear-gradient(180deg, rgba(28, 40, 51, 0.98), rgba(22, 32, 43, 0.96));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--s45b-line);
}

.s45b-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.s45b-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(72, 209, 204, 0.55);
  box-shadow: 0 0 0 2px rgba(0, 191, 255, 0.15);
  background: #0e161d;
  flex: 0 0 auto;
}

.s45b-brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #fff;
  line-height: 1;
}

.s45b-brand-name span {
  color: var(--s45b-coral);
}

.s45b-brand-tag {
  font-size: 10.5px;
  color: var(--s45b-teal);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 3px;
  display: block;
}

.s45b-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.s45b-btn {
  min-height: var(--s45b-touch);
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.s45b-btn:active {
  transform: scale(0.94);
}

.s45b-btn-login {
  background: transparent;
  color: var(--s45b-teal);
  border: 1px solid rgba(72, 209, 204, 0.55);
}

.s45b-btn-register {
  background: linear-gradient(135deg, var(--s45b-coral), #ff9a6b);
  color: #1a1305;
  box-shadow: 0 6px 16px rgba(255, 127, 80, 0.35);
}

.s45b-menu-btn {
  min-width: var(--s45b-touch);
  min-height: var(--s45b-touch);
  background: transparent;
  border: 1px solid var(--s45b-line);
  border-radius: 12px;
  color: var(--s45b-ink);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
}

.s45b-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--s45b-teal);
  border-radius: 2px;
}

/* ---------- Stacked overlay menu ---------- */
.s45b-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 18, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 90;
}

.s45b-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 84%;
  max-width: 360px;
  height: 100%;
  background: linear-gradient(180deg, #16202b, #1b2935);
  border-left: 1px solid var(--s45b-line);
  transform: translateX(105%);
  transition: transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 100;
  padding: 20px 18px 24px;
  overflow-y: auto;
}

.s45b-menu.s45b-is-open {
  transform: translateX(0);
}

.s45b-menu.s45b-is-open ~ .s45b-menu-overlay {
  opacity: 1;
  pointer-events: auto;
}

.s45b-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.s45b-menu-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.4px;
}

.s45b-menu-close {
  min-width: 40px;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--s45b-line);
  background: transparent;
  color: var(--s45b-ink);
  font-size: 18px;
  cursor: pointer;
}

.s45b-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.s45b-menu-list li {
  margin-bottom: 8px;
}

.s45b-menu-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  background: rgba(72, 209, 204, 0.06);
  border: 1px solid var(--s45b-line);
  color: var(--s45b-ink);
  font-weight: 600;
  font-size: 14.5px;
  min-height: var(--s45b-touch);
}

.s45b-menu-list a:hover,
.s45b-menu-list a:focus {
  background: rgba(0, 191, 255, 0.12);
  text-decoration: none;
  color: #fff;
}

.s45b-menu-list .s45b-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--s45b-coral);
  flex: 0 0 auto;
}

.s45b-menu-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--s45b-line);
  font-size: 12px;
  color: var(--s45b-ink-dim);
}

/* Body scroll lock when menu open */
body.s45b-menu-locked {
  overflow: hidden;
}

/* ---------- Main / sections ---------- */
.s45b-main {
  padding: 14px 12px calc(var(--s45b-bottom-h) + 32px);
}

.s45b-section {
  margin-bottom: 22px;
}

.s45b-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 4px 2px 10px;
}

.s45b-section-head h2 {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.s45b-section-head h2 span {
  color: var(--s45b-teal);
}

.s45b-section-more {
  font-size: 12px;
  color: var(--s45b-sky);
}

/* ---------- Hero carousel ---------- */
.s45b-hero {
  position: relative;
  border-radius: var(--s45b-radius);
  overflow: hidden;
  border: 1px solid var(--s45b-line);
  box-shadow: var(--s45b-shadow);
  margin-bottom: 6px;
  background: #0e161d;
}

.s45b-hero-viewport {
  overflow: hidden;
}

.s45b-hero-track {
  display: flex;
  transition: transform 0.42s ease;
  will-change: transform;
}

.s45b-hero-slide {
  flex: 0 0 100%;
  position: relative;
}

.s45b-hero-slide img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
}

.s45b-hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(8, 14, 20, 0.92));
  color: #fff;
}

.s45b-hero-caption strong {
  display: block;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.s45b-hero-caption small {
  font-size: 12px;
  color: var(--s45b-teal);
  font-weight: 600;
}

.s45b-hero-dots {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 4;
}

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

.s45b-hero-dots button.s45b-dot-active {
  background: var(--s45b-coral);
  transform: scale(1.35);
}

/* ---------- Chip strip (category quick scroll) ---------- */
.s45b-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.s45b-chips::-webkit-scrollbar {
  display: none;
}

.s45b-chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(72, 209, 204, 0.08);
  border: 1px solid var(--s45b-line);
  color: var(--s45b-ink);
  font-size: 12.5px;
  font-weight: 700;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.s45b-chip span {
  color: var(--s45b-coral);
  margin-right: 5px;
}

/* ---------- Game grid ---------- */
.s45b-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.s45b-game-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--s45b-card);
  border: 1px solid var(--s45b-line);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
  display: block;
  text-align: left;
  color: inherit;
  padding: 0;
  font-family: inherit;
}

.s45b-game-card:active {
  transform: scale(0.95);
  border-color: var(--s45b-sky);
}

.s45b-game-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0e161d;
}

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

.s45b-game-tag {
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgba(255, 127, 80, 0.92);
  color: #1a1305;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.s45b-game-name {
  font-size: 11px;
  color: var(--s45b-ink);
  text-align: center;
  padding: 5px 4px 6px;
  line-height: 1.25;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 5th column slides in on slightly wider phones */
@media (min-width: 380px) {
  .s45b-game-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 9px;
  }
  .s45b-game-name {
    font-size: 11.5px;
  }
  .s45b-hero-slide img {
    height: 196px;
  }
}

/* ---------- Info / content blocks ---------- */
.s45b-card {
  background: rgba(72, 209, 204, 0.05);
  border: 1px solid var(--s45b-line);
  border-radius: var(--s45b-radius);
  padding: 16px;
  margin-bottom: 14px;
}

.s45b-card h3 {
  font-size: 15.5px;
  color: var(--s45b-teal);
  margin-bottom: 8px;
}

.s45b-card p {
  font-size: 13.5px;
  color: var(--s45b-ink);
}

.s45b-feature-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 10px 0 4px;
}

.s45b-feature {
  background: var(--s45b-bg-3);
  border: 1px solid var(--s45b-line);
  border-radius: 12px;
  padding: 12px;
  min-height: var(--s45b-touch);
}

.s45b-feature strong {
  display: block;
  color: var(--s45b-coral);
  font-size: 13px;
  margin-bottom: 3px;
}

.s45b-feature small {
  color: var(--s45b-ink-dim);
  font-size: 12px;
}

/* ---------- Promo strip ---------- */
.s45b-promo-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 6px 0 4px;
}

.s45b-promo-item {
  background: linear-gradient(135deg, rgba(255, 127, 80, 0.18), rgba(0, 191, 255, 0.12));
  border: 1px solid var(--s45b-line);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  min-height: var(--s45b-touch);
  display: block;
  color: #fff;
  text-align: left;
  font-family: inherit;
}

.s45b-promo-item:active {
  transform: scale(0.96);
}

.s45b-promo-item strong {
  display: block;
  color: var(--s45b-coral);
  font-size: 13px;
  margin-bottom: 2px;
}

.s45b-promo-item small {
  color: var(--s45b-ink-dim);
  font-size: 11.5px;
}

.s45b-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: linear-gradient(135deg, var(--s45b-coral), #ff9a6b);
  color: #1a1305;
  font-weight: 800;
  padding: 14px;
  border-radius: 12px;
  border: 0;
  font-size: 14.5px;
  min-height: var(--s45b-touch);
  margin: 14px 0 6px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 127, 80, 0.32);
}

.s45b-cta:active {
  transform: scale(0.97);
}

/* ---------- Extended footer / directory ---------- */
.s45b-extended {
  margin-top: 8px;
  padding: 16px 14px 18px;
  background: rgba(14, 22, 29, 0.7);
  border-top: 1px solid var(--s45b-line);
  border-bottom: 1px solid var(--s45b-line);
}

.s45b-extended h3 {
  font-size: 14px;
  color: var(--s45b-teal);
  margin-bottom: 8px;
  letter-spacing: 0.4px;
}

.s45b-extended p {
  font-size: 12.5px;
  color: var(--s45b-ink-dim);
  margin-bottom: 12px;
}

.s45b-link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  margin-bottom: 12px;
}

.s45b-link-grid a {
  font-size: 12.5px;
  color: var(--s45b-ink);
  padding: 4px 0;
  border-bottom: 1px dashed rgba(72, 209, 204, 0.18);
}

.s45b-link-grid a:hover {
  color: var(--s45b-sky);
}

.s45b-promo-cluster {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.s45b-disclaimer {
  font-size: 11.5px;
  color: var(--s45b-ink-dim);
  line-height: 1.5;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(72, 209, 204, 0.2);
}

/* ---------- Footer ---------- */
.s45b-footer {
  padding: 14px 14px calc(var(--s45b-bottom-h) + 18px);
  text-align: center;
  font-size: 11.5px;
  color: var(--s45b-ink-dim);
  background: var(--s45b-bg-2);
}

.s45b-footer small {
  display: block;
  margin-top: 4px;
  color: rgba(159, 180, 189, 0.7);
}

/* ---------- Mobile bottom navigation (5 roles, outlined) ---------- */
.s45b-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.s45b-bottom-inner {
  max-width: var(--s45b-max);
  width: 100%;
  height: var(--s45b-bottom-h);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: linear-gradient(180deg, rgba(22, 32, 43, 0.98), rgba(14, 22, 29, 0.98));
  border-top: 1px solid var(--s45b-line);
  pointer-events: auto;
}

.s45b-bottom a,
.s45b-bottom button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: 0;
  color: var(--s45b-ink-dim);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  padding: 7px 4px 5px;
  min-height: var(--s45b-bottom-h);
  position: relative;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.s45b-bottom a:active,
.s45b-bottom button:active {
  transform: scale(0.92);
}

.s45b-bottom .s45b-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s45b-bottom .s45b-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.s45b-bottom .s45b-label {
  letter-spacing: 0.2px;
  text-transform: uppercase;
  font-size: 9.5px;
}

.s45b-bottom a.s45b-nav-active,
.s45b-bottom button.s45b-nav-active {
  color: var(--s45b-coral);
}

.s45b-bottom a.s45b-nav-active::before,
.s45b-bottom button.s45b-nav-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28%;
  right: 28%;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--s45b-coral);
}

.s45b-bottom .s45b-promo a,
.s45b-bottom .s45b-promo button {
  color: var(--s45b-teal);
}

.s45b-bottom .s45b-promo .s45b-label {
  color: var(--s45b-teal);
}

/* Promo emphasis: middle accent */
.s45b-bottom .s45b-promo-accent {
  position: relative;
}

.s45b-bottom .s45b-promo-accent .s45b-icon {
  background: linear-gradient(135deg, var(--s45b-coral), #ff9a6b);
  color: #1a1305;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  margin-top: -10px;
  box-shadow: 0 4px 12px rgba(255, 127, 80, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.s45b-bottom .s45b-promo-accent .s45b-icon svg {
  width: 18px;
  height: 18px;
  stroke: #1a1305;
  stroke-width: 2.1;
}

/* Hide bottom nav on very wide screens is unnecessary: keep mobile canvas */
@media (min-width: 600px) {
  .s45b-bottom-inner {
    border-left: 1px solid var(--s45b-line);
    border-right: 1px solid var(--s45b-line);
  }
}

/* ---------- Utilities ---------- */
.s45b-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.s45b-focusable:focus-visible {
  outline: 2px solid var(--s45b-sky);
  outline-offset: 2px;
}
