/* Shop Game — black / gold / teal classic */
:root {
  --bg-deep: #0a0c10;
  --bg-panel: #12151c;
  --bg-elevated: #181c26;
  --gold: #d4a843;
  --gold-bright: #f0d060;
  --gold-dim: rgba(212, 168, 67, 0.18);
  --teal: #1a6b5a;
  --teal-glow: #2dd4a8;
  --text: #e8e4d9;
  --muted: #8a8578;
  --border: rgba(212, 168, 67, 0.15);
  --border-strong: rgba(212, 168, 67, 0.4);
  --danger-soft: #8b3a3a;
  --radius: 10px;
  --max: 1400px;
  --font-display: "Oswald", "Segoe UI", sans-serif;
  --font-body: "DM Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  background: var(--bg-deep);
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(26, 107, 90, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(212, 168, 67, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 60%, rgba(26, 107, 90, 0.1), transparent 45%);
  opacity: 1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.shell {
  position: relative;
  z-index: 1;
}

.wrap {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* —— Site header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(24, 28, 38, 0.97) 0%, rgba(10, 12, 16, 0.94) 100%);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal-glow), var(--gold), transparent 70%);
  opacity: 0.85;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 168, 67, 0.55), rgba(45, 212, 168, 0.25), transparent);
  pointer-events: none;
}

.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 24px;
  min-height: 88px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 0;
  color: inherit;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  background: linear-gradient(100deg, #fff6d8 0%, var(--gold-bright) 45%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-glow);
  opacity: 0.9;
}

.header-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.toplink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(24, 28, 38, 0.95), rgba(14, 17, 24, 0.95));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.toplink-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  background: var(--gold-dim);
  color: var(--gold-bright);
  border: 1px solid var(--border);
}

.toplink:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(212, 168, 67, 0.18);
}

.toplink.zalo .toplink-ico {
  background: rgba(26, 107, 90, 0.35);
  color: var(--teal-glow);
  border-color: rgba(45, 212, 168, 0.35);
}

.toplink.zalo:hover {
  border-color: var(--teal-glow);
  color: var(--teal-glow);
  box-shadow: 0 10px 22px rgba(45, 212, 168, 0.15);
}

.toplink.fb:hover {
  border-color: var(--gold-bright);
}

@media (max-width: 720px) {
  .site-header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 0 20px;
    min-height: 0;
    gap: 14px;
  }

  .header-links {
    width: 100%;
  }

  .toplink {
    flex: 1 1 calc(50% - 5px);
    justify-content: center;
    padding: 11px 12px;
  }
}

/* —— Hero (unused, kept minimal) —— */
.hero {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, filter 0.15s, background 0.2s, border-color 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1a1408;
  box-shadow: 0 8px 24px rgba(212, 168, 67, 0.28);
}

.btn-gold:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--gold-bright);
}

.btn-ghost:hover {
  background: var(--gold-dim);
}

.btn-tool {
  position: relative;
  z-index: 5;
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text);
  padding: 10px 14px;
  flex: 0 0 auto;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

.btn-tool.active,
.btn-tool.is-active {
  background: linear-gradient(180deg, rgba(26, 107, 90, 0.55), rgba(26, 107, 90, 0.35));
  border-color: var(--teal-glow);
  color: var(--teal-glow);
}

/* —— Sections —— */
.section {
  padding: clamp(28px, 5vw, 48px) 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 1.85rem);
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.section-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent 70%);
  margin-top: 10px;
  max-width: 180px;
  opacity: 0.5;
}

/* —— New updates auto-slider —— */
.slider-nav {
  display: flex;
  gap: 8px;
}

.slider-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.new-slider {
  overflow: hidden;
  margin-inline: -4px;
  padding: 4px;
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}

.new-slider-track {
  display: flex;
  gap: 14px;
  width: max-content;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.new-slider-track.is-ready {
  animation: shop-marquee 45s linear infinite;
}

.new-slider.is-paused .new-slider-track.is-ready,
.new-slider:hover .new-slider-track.is-ready:not(.is-dragging) {
  animation-play-state: paused;
}

.new-slider-track .gcard {
  flex: 0 0 clamp(140px, 18vw, 168px);
}

@keyframes shop-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* —— Catalog tools —— */
.catalog-tools {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.inp,
.select {
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.inp:focus,
.select:focus {
  border-color: var(--border-strong);
}

.inp {
  flex: 1 1 280px;
  min-width: 0;
}

.select {
  flex: 0 0 auto;
}

/* —— Grid —— */
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1300px) {
  .grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

@media (max-width: 620px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* —— Game card —— */
.gcard {
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
}

.gcard:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 168, 67, 0.2),
    0 0 24px rgba(45, 212, 168, 0.08);
}

.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #0e1218;
}

.thumb.noimg {
  background: linear-gradient(135deg, #1a2230 0%, #0b111a 100%);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

.badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-new {
  background: var(--teal);
  color: #e8fff8;
  box-shadow: 0 2px 8px rgba(26, 107, 90, 0.5);
}

.meta {
  padding: 10px 12px 12px;
}

.title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tid {
  margin-top: 0;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.size {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* —— Pager —— */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.pager .info {
  font-size: 13px;
  color: var(--muted);
  width: 100%;
  text-align: center;
  margin-top: 4px;
}

.pager-nav {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.pager-nums {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}

.page-btn:hover {
  border-color: var(--border-strong);
  color: var(--gold-bright);
  transform: translateY(-1px);
}

.page-btn.is-active {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border-color: transparent;
  color: #1a1408;
  cursor: default;
  transform: none;
  box-shadow: 0 6px 16px rgba(212, 168, 67, 0.28);
}

.page-ellipsis {
  min-width: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  user-select: none;
}

.pager .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* —— Footer —— */
/* —— Floating contact —— */
.contact-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cbtn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffffff;
  color: #b8922e;
  border: 1px solid rgba(212, 168, 67, 0.35);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cbtn .icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.cbtn:hover {
  transform: translateY(-1px);
  color: #8f6f1c;
  box-shadow: 0 10px 24px rgba(212, 168, 67, 0.28);
}

.cbtn:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .contact-fab {
    right: 10px;
    bottom: 10px;
    gap: 8px;
  }

  .cbtn {
    padding: 8px 12px;
    font-size: 13px;
  }
}

.site-footer {
  margin-top: 24px;
  padding: 36px 0 48px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(26, 107, 90, 0.06));
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin: 0 0 8px;
}

.footer-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 36em;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--gold-bright);
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .new-slider-track.is-ready {
    animation-duration: 90s;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(100% - 24px, var(--max));
  }

  .catalog-tools #btnVH {
    flex: 1 1 100%;
  }
}
