:root {
  --krx-ink: #08090b;
  --krx-panel: #121317;
  --krx-panel-2: #1b1d23;
  --krx-line: #2a2d35;
  --krx-gold: #f5c518;
  --krx-gold-2: #b8860b;
  --krx-cream: #f7f3e8;
  --krx-mute: #9aa0ad;
  --krx-live: #e23b3b;
}

@font-face {
  font-family: 'Sora';
  src: url('/assets/font/sora.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('/assets/font/manrope.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

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

body {
  background-color: var(--krx-ink);
  color: var(--krx-cream);
  font-family: 'Manrope', 'Liberation Sans', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: 0;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 72px;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', 'Liberation Sans', Arial, sans-serif;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.25;
}

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

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

.krx-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.krx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: 'Sora', 'Liberation Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  min-height: 44px;
}

.krx-btn-gold {
  background: linear-gradient(135deg, var(--krx-gold) 0%, var(--krx-gold-2) 100%);
  color: #000000;
  box-shadow: 0 4px 14px rgba(245, 197, 24, 0.25);
}

.krx-btn-gold:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.krx-btn-outline {
  background: transparent;
  border-color: var(--krx-gold);
  color: var(--krx-gold);
}

.krx-btn-outline:hover {
  background: rgba(245, 197, 24, 0.1);
  color: #ffffff;
}

.krx-btn-ghost {
  background: var(--krx-panel-2);
  border-color: var(--krx-line);
  color: var(--krx-cream);
}

.krx-btn-ghost:hover {
  border-color: var(--krx-gold);
  color: var(--krx-gold);
}

/* 1. krx-topbar */
.krx-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background-color: var(--krx-panel);
  border-bottom: 1px solid var(--krx-line);
  height: 64px;
}

.krx-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.krx-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.krx-drawer-toggle {
  background: var(--krx-panel-2);
  border: 1px solid var(--krx-line);
  color: var(--krx-cream);
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.krx-drawer-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--krx-cream);
  border-radius: 2px;
}

.krx-brand-logo {
  width: auto;
  height: 34px;
  object-fit: contain;
}

/* 2. krx-drawer */
.krx-drawer {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100vh;
  background-color: var(--krx-panel);
  border-right: 1px solid var(--krx-line);
  z-index: 1000;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.6);
}

.krx-drawer.krx-drawer-open {
  left: 0;
}

.krx-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--krx-line);
}

.krx-drawer-close {
  background: transparent;
  border: none;
  color: var(--krx-mute);
  font-size: 24px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.krx-drawer-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.krx-drawer-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--krx-gold);
}

.krx-drawer-link {
  display: block;
  padding: 10px 14px;
  background: var(--krx-panel-2);
  border: 1px solid var(--krx-line);
  border-radius: 8px;
  color: var(--krx-cream);
  font-weight: 500;
  transition: all 0.2s ease;
}

.krx-drawer-link:hover {
  border-color: var(--krx-gold);
  color: var(--krx-gold);
}

/* 3. krx-hero */
.krx-hero {
  padding: 24px 0 16px;
}

.krx-hero-banner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--krx-line);
  background-color: var(--krx-panel);
}

.krx-hero-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1400 / 736;
  object-fit: cover;
}

.krx-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,9,11,0.2) 0%, rgba(8,9,11,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  gap: 12px;
}

.krx-hero-title {
  font-size: 28px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.krx-hero-desc {
  color: var(--krx-cream);
  font-size: 15px;
  max-width: 600px;
}

.krx-hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.krx-hero-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .krx-hero-title { font-size: 20px; }
  .krx-hero-overlay { padding: 16px; }
  .krx-hero-chips { grid-template-columns: 1fr; gap: 8px; }
}

.krx-chip {
  background: var(--krx-panel);
  border: 1px solid var(--krx-line);
  border-radius: 14px;
  padding: 12px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--krx-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.krx-chip::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--krx-gold);
}

/* 4. krx-actionbar */
.krx-actionbar {
  padding: 12px 0 24px;
}

.krx-actionbar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .krx-actionbar-grid {
    grid-template-columns: 1fr;
  }
}

/* 5. krx-ticker */
.krx-ticker {
  padding: 0 0 24px;
}

.krx-ticker-box {
  background: var(--krx-panel);
  border: 1px solid var(--krx-line);
  border-radius: 14px;
  padding: 20px;
}

.krx-ticker-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: 'Sora', 'Liberation Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 15px;
}

.krx-live-dot {
  width: 10px;
  height: 10px;
  background-color: var(--krx-live);
  border-radius: 50%;
  display: inline-block;
  animation: krxPulse 1.5s infinite;
}

@keyframes krxPulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

.krx-ticker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .krx-ticker-grid {
    grid-template-columns: 1fr;
  }
}

.krx-ticker-col-title {
  font-size: 13px;
  color: var(--krx-mute);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--krx-line);
}

.krx-ticker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.krx-ticker-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 8px 12px;
  background: var(--krx-panel-2);
  border-radius: 8px;
  border: 1px solid var(--krx-line);
}

.krx-ticker-val {
  color: var(--krx-gold);
  font-weight: 700;
  font-family: 'Sora', 'Liberation Sans', Arial, sans-serif;
}

/* 6. krx-intro */
.krx-intro {
  padding: 12px 0 28px;
}

.krx-intro-card {
  background: var(--krx-panel);
  border: 1px solid var(--krx-line);
  border-radius: 14px;
  padding: 28px;
}

.krx-intro h1 {
  font-size: 26px;
  margin-bottom: 16px;
  color: var(--krx-gold);
}

.krx-intro-p {
  color: var(--krx-cream);
  font-size: 15px;
  line-height: 1.7;
}

.krx-intro-p + .krx-intro-p {
  margin-top: 12px;
}

/* 7. krx-promos */
.krx-promos {
  padding: 0 0 32px;
}

.krx-section-head {
  margin-bottom: 20px;
}

.krx-section-title {
  font-size: 22px;
  color: #ffffff;
}

.krx-section-subtitle {
  color: var(--krx-mute);
  font-size: 14px;
  margin-top: 4px;
}

.krx-promos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

@media (max-width: 768px) {
  .krx-promos-grid {
    grid-template-columns: 1fr;
  }
}

.krx-promo-card {
  background: var(--krx-panel);
  border: 1px solid var(--krx-line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.krx-promo-card:hover {
  transform: translateY(-2px);
  border-color: var(--krx-gold-2);
}

.krx-promo-img {
  width: 100%;
  aspect-ratio: 1000 / 526;
  object-fit: cover;
}

.krx-promo-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  gap: 14px;
}

.krx-promo-title {
  font-size: 17px;
  color: #ffffff;
}

.krx-promo-stat {
  font-size: 13px;
  color: var(--krx-mute);
  line-height: 1.5;
}

/* 8. krx-tiers */
.krx-tiers {
  padding: 0 0 32px;
}

.krx-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--krx-line);
  background: var(--krx-panel);
}

.krx-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 600px;
}

.krx-table th {
  background: var(--krx-panel-2);
  color: var(--krx-gold);
  font-family: 'Sora', 'Liberation Sans', Arial, sans-serif;
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1px solid var(--krx-line);
  font-size: 14px;
}

.krx-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--krx-line);
  color: var(--krx-cream);
  font-size: 14px;
}

.krx-table tr:last-child td {
  border-bottom: none;
}

/* 9. krx-cats */
.krx-cats {
  padding: 0 0 20px;
}

.krx-cats-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-behavior: smooth;
}

.krx-cat-item {
  background: var(--krx-panel);
  border: 1px solid var(--krx-line);
  border-radius: 14px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
  min-height: 44px;
}

.krx-cat-item:hover, .krx-cat-item.krx-cat-active {
  border-color: var(--krx-gold);
  background: var(--krx-panel-2);
}

.krx-cat-item.krx-cat-active .krx-cat-label {
  color: var(--krx-gold);
}

.krx-cat-icon {
  width: 32px;
  height: 20px;
  object-fit: contain;
}

.krx-cat-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--krx-cream);
}

/* 10. krx-games */
.krx-games {
  padding: 0 0 32px;
}

.krx-games-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

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

@media (max-width: 768px) {
  .krx-games-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

.krx-game-card {
  background: var(--krx-panel);
  border: 1px solid var(--krx-line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.krx-game-card:hover {
  transform: translateY(-2px);
  border-color: var(--krx-gold);
}

.krx-game-img {
  width: 100%;
  aspect-ratio: 325 / 250;
  object-fit: cover;
}

.krx-game-title {
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--krx-cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 11. krx-providers */
.krx-providers {
  padding: 0 0 32px;
}

.krx-providers-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

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

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

.krx-provider-item {
  background: var(--krx-panel);
  border: 1px solid var(--krx-line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
}

.krx-provider-img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  filter: grayscale(80%);
  opacity: 0.75;
  transition: all 0.3s ease;
}

.krx-provider-item:hover .krx-provider-img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* 12. krx-pay */
.krx-pay {
  padding: 0 0 32px;
}

.krx-pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .krx-pay-grid {
    grid-template-columns: 1fr;
  }
}

.krx-pay-card {
  background: var(--krx-panel);
  border: 1px solid var(--krx-line);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.krx-pay-time {
  font-size: 32px;
  color: var(--krx-gold);
  font-family: 'Sora', 'Liberation Sans', Arial, sans-serif;
  font-weight: 700;
}

.krx-pay-desc {
  color: var(--krx-mute);
  font-size: 14px;
}

.krx-pay-info {
  background: var(--krx-panel);
  border: 1px solid var(--krx-line);
  border-radius: 14px;
  padding: 20px;
  font-size: 14px;
  color: var(--krx-cream);
}

/* 13. krx-longform */
.krx-longform {
  padding: 0 0 32px;
}

.krx-longform-content h2 {
  font-size: 1.6rem;
  color: var(--krx-gold);
  margin-top: 24px;
  margin-bottom: 12px;
}

.krx-longform-content h3 {
  font-size: 1.15rem;
  color: #ffffff;
  margin-top: 18px;
  margin-bottom: 8px;
}

.krx-longform-content p {
  line-height: 1.75;
  color: var(--krx-cream);
  margin-bottom: 14px;
}

.krx-longform-content ul {
  list-style: none;
  padding-left: 20px;
  margin-bottom: 16px;
}

.krx-longform-content ul li {
  position: relative;
  margin-bottom: 8px;
  line-height: 1.6;
}

.krx-longform-content ul li::before {
  content: "•";
  color: var(--krx-gold);
  font-size: 18px;
  position: absolute;
  left: -16px;
  top: -2px;
}

.krx-longform-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.krx-longform-content th, .krx-longform-content td {
  border: 1px solid var(--krx-line);
  padding: 10px 14px;
  text-align: left;
}

.krx-longform-content th {
  background: var(--krx-panel-2);
  color: var(--krx-gold);
}

/* 14. krx-faq */
.krx-faq {
  padding: 0 0 32px;
}

.krx-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.krx-faq-item {
  background: var(--krx-panel);
  border: 1px solid var(--krx-line);
  border-radius: 14px;
  overflow: hidden;
}

.krx-faq-summary {
  padding: 16px 20px;
  font-family: 'Sora', 'Liberation Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.krx-faq-summary::-webkit-details-marker {
  display: none;
}

.krx-faq-summary::after {
  content: '+';
  font-size: 20px;
  color: var(--krx-gold);
}

.krx-faq-item[open] .krx-faq-summary::after {
  content: '−';
}

.krx-faq-answer {
  padding: 0 20px 16px;
  color: var(--krx-mute);
  font-size: 14px;
  line-height: 1.6;
  border-top: 1px solid transparent;
}

.krx-faq-item[open] .krx-faq-answer {
  border-top-color: var(--krx-line);
  padding-top: 12px;
}

/* 15. krx-links */
.krx-links {
  padding: 0 0 32px;
}

.krx-links-box {
  background: var(--krx-panel);
  border: 1px solid var(--krx-line);
  border-radius: 14px;
  padding: 24px;
}

.krx-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .krx-links-grid {
    grid-template-columns: 1fr;
  }
}

.krx-links-title {
  font-size: 15px;
  color: var(--krx-gold);
  margin-bottom: 12px;
}

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

.krx-links-item {
  color: var(--krx-mute);
  font-size: 13px;
  transition: color 0.2s ease;
}

.krx-links-item:hover {
  color: var(--krx-gold);
}

/* 16. krx-trust */
.krx-trust {
  padding: 0 0 32px;
  text-align: center;
}

.krx-trust-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.krx-badge-img {
  height: 30px;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
}

.krx-trust-text {
  font-size: 12px;
  color: var(--krx-mute);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
}

/* 17. krx-footer */
.krx-footer {
  background: var(--krx-panel);
  border-top: 1px solid var(--krx-line);
  padding: 40px 0 24px;
}

.krx-footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .krx-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.krx-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.krx-social-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.krx-social-icon {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.krx-footer-title {
  font-size: 14px;
  color: var(--krx-gold);
  margin-bottom: 12px;
}

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

.krx-footer-link {
  color: var(--krx-mute);
  font-size: 13px;
  transition: color 0.2s ease;
}

.krx-footer-link:hover {
  color: #ffffff;
}

.krx-footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--krx-line);
  text-align: center;
  font-size: 12px;
  color: var(--krx-mute);
}

/* 18. krx-tabbar */
.krx-tabbar {
  display: none;
}

@media (max-width: 768px) {
  .krx-tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--krx-panel);
    border-top: 1px solid var(--krx-line);
    z-index: 950;
  }

  .krx-tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--krx-mute);
    font-size: 10px;
  }

  .krx-tabbar-item:hover, .krx-tabbar-item.krx-active {
    color: var(--krx-gold);
  }

  .krx-tabbar-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
  }
}
/* wrapper cuon ngang cho bang trong long-form */
.krx-tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:18px 0;border:1px solid var(--krx-line);border-radius:14px}
.krx-tablewrap>table{margin:0;border:0;min-width:520px}
.krx-crumb{font-size:.82rem;color:var(--krx-mute);margin:0 0 12px;display:flex;flex-wrap:wrap;gap:6px}
.krx-crumb a{color:var(--krx-gold);text-decoration:none}
.krx-byline{font-size:.85rem;color:var(--krx-mute);margin:6px 0 0}
.krx-byline a{color:var(--krx-gold);text-decoration:none}
.krx-refs{font-size:.86rem;color:var(--krx-mute);border-top:1px solid var(--krx-line);padding-top:12px;margin-top:22px}
.krx-refs a{color:var(--krx-gold)}


/* patch QA */
.krx-provider-item {
  background: var(--krx-panel-2);
  border-color: rgba(255, 255, 255, 0.12);
}

.krx-provider-img {
  filter: grayscale(20%);
  opacity: 0.95;
}

.krx-provider-item:hover {
  border-color: var(--krx-gold);
  background: var(--krx-panel);
}

.krx-provider-item:hover .krx-provider-img {
  filter: grayscale(0%) brightness(1.15);
  opacity: 1;
  transform: scale(1.05);
}

.krx-hero-overlay {
  background: linear-gradient(180deg, rgba(8, 9, 11, 0.1) 0%, rgba(8, 9, 11, 0.6) 40%, rgba(8, 9, 11, 0.98) 100%);
}

@media (max-width: 768px) {
  .krx-hero-overlay {
    position: relative;
    inset: auto;
    background: var(--krx-panel);
    border-top: 1px solid var(--krx-line);
    padding: 20px 16px;
  }
}

/* patch UX vong 2 */
/* LOI 1 — Link trong bai viet */
.krx-longform-content a,
.krx-faq-answer a,
.krx-refs a {
  color: var(--krx-gold, #f5c518);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease, background-color 0.2s ease, text-decoration-color 0.2s ease;
  border-radius: 2px;
  padding: 0 2px;
}

.krx-longform-content a:hover,
.krx-faq-answer a:hover,
.krx-refs a:hover {
  color: #ffffff;
  background-color: rgba(245, 197, 24, 0.15);
  text-decoration-color: #ffffff;
}

/* LOI 2 — Slider hero tu chay */
.krx-slider {
  position: relative;
  width: 100%;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
}

.krx-slider-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  position: relative;
  aspect-ratio: 1400 / 736;
  background-color: var(--krx-panel, #121317);
}

.krx-slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.krx-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  height: 100%;
  position: relative;
}

.krx-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.krx-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.krx-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(18, 19, 23, 0.65);
  border: 1px solid var(--krx-line, #2a2d35);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  padding: 0;
}

.krx-slider:hover .krx-slider-nav {
  opacity: 0.85;
}

.krx-slider-nav:hover {
  opacity: 1 !important;
  background-color: var(--krx-panel-2, #1b1d23);
  border-color: var(--krx-gold, #f5c518);
  color: var(--krx-gold, #f5c518);
}

.krx-slider-prev {
  left: 14px;
}

.krx-slider-next {
  right: 14px;
}

.krx-slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
  padding: 6px 12px;
  background: rgba(8, 9, 11, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 20px;
}

.krx-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.krx-slider-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.krx-slider-dot.krx-slider-dot-on {
  background: var(--krx-gold, #f5c518);
  width: 22px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .krx-slider-viewport {
    aspect-ratio: 16 / 9;
  }
  .krx-slider-nav {
    display: none !important;
  }
  .krx-slider-dots {
    bottom: 10px;
  }
}

/* LOI 3 — Tab danh muc game */
.krx-cats-row {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0 10px 0;
}

.krx-cats-row::-webkit-scrollbar {
  display: none;
}

.krx-cat-item {
  scroll-snap-align: start;
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--krx-panel, #121317);
  border: 1px solid var(--krx-line, #2a2d35);
  color: var(--krx-mute, #9aa0ad);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  outline: none;
}

.krx-cat-item:hover {
  color: #ffffff;
  border-color: rgba(245, 197, 24, 0.4);
}

.krx-cat-item:focus-visible {
  box-shadow: 0 0 0 2px var(--krx-gold, #f5c518);
}

.krx-cat-item.krx-cat-active {
  background: var(--krx-gold, #f5c518);
  color: var(--krx-ink, #08090b);
  border-color: var(--krx-gold, #f5c518);
  font-weight: 700;
}

.krx-cat-panels {
  width: 100%;
}

.krx-cat-panel {
  display: none;
}

.krx-cat-panel.krx-cat-panel-on {
  display: block;
  animation: krxPanelFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes krxPanelFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* LOI 4 — Banner khuyen mai chen giua bai viet */
figure.krx-inbanner {
  margin: 32px 0;
  background: var(--krx-panel, #121317);
  border: 1px solid var(--krx-line, #2a2d35);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

figure.krx-inbanner:hover {
  transform: translateY(-3px);
  border-color: var(--krx-gold, #f5c518);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.krx-inbanner a {
  display: block;
  overflow: hidden;
  text-decoration: none;
}

.krx-inbanner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

figure.krx-inbanner:hover .krx-inbanner-img {
  transform: scale(1.02);
}

.krx-inbanner-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--krx-panel-2, #1b1d23);
  color: var(--krx-cream, #f7f3e8);
  font-size: 0.95rem;
  font-weight: 500;
  border-top: 1px solid var(--krx-line, #2a2d35);
}

.krx-inbanner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--krx-gold, #f5c518);
  color: var(--krx-ink, #08090b);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

figure.krx-inbanner:hover .krx-inbanner-cta {
  background: #ffe066;
  transform: scale(1.04);
}

@media (max-width: 768px) {
  .krx-inbanner-cap {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }
  .krx-inbanner-cta {
    width: 100%;
  }
}

/* LOI 5 — Huy hieu DMCA footer */
.krx-dmca {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 18px 0;
  width: 100%;
}

.krx-dmca .dmca-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.krx-dmca .dmca-badge img {
  height: 24px;
  max-height: 26px;
  min-height: 20px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.25s ease, filter 0.25s ease;
  display: block;
}

.krx-dmca .dmca-badge:hover img {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(245, 197, 24, 0.5));
}

@media (max-width: 768px) {
  .krx-footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .krx-dmca {
    margin: 12px 0;
  }
  .krx-dmca .dmca-badge img {
    height: 20px;
  }
}

/* LOI 6 — Icon tabbar mobile */
.krx-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999;
  background: rgba(18, 19, 23, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--krx-line, #2a2d35);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}

.krx-tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  flex: 1;
  text-decoration: none;
  color: var(--krx-mute, #9aa0ad);
  transition: color 0.2s ease;
  padding: 4px 0;
  outline: none;
}

.krx-tabbar-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  filter: brightness(0) invert(0.75);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.krx-tabbar-label {
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.2;
  text-align: center;
  font-weight: 500;
  font-family: 'Manrope', sans-serif;
  white-space: nowrap;
}

.krx-tabbar-item:hover .krx-tabbar-icon {
  filter: brightness(0) invert(0.9);
}

.krx-tabbar-item.krx-active,
.krx-tabbar-item.krx-active .krx-tabbar-label {
  color: var(--krx-gold, #f5c518);
  font-weight: 700;
}

.krx-tabbar-item.krx-active .krx-tabbar-icon {
  filter: invert(82%) sepia(45%) saturate(1600%) hue-rotate(354deg) brightness(101%) contrast(93%);
  transform: translateY(-1px);
}

/* panel tab danh muc */
.krx-cat-panel-on {
  animation: krxCatFadeUp 0.3s ease-out forwards;
}

@keyframes krxCatFadeUp {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .krx-cat-panel-on {
    animation: none;
  }
}

.krx-cat-split {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 769px) {
  .krx-cat-split {
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }
}

.krx-cat-figure {
  display: block;
  border-radius: 14px;
  border: 1px solid var(--krx-line);
  overflow: hidden;
  text-decoration: none;
}

@media (min-width: 769px) {
  .krx-cat-figure {
    flex: 0 0 58%;
    max-width: 58%;
  }
}

.krx-cat-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 526;
  object-fit: cover;
  display: block;
  max-height: 200px;
  transition: transform 0.3s ease;
}

@media (min-width: 769px) {
  .krx-cat-img {
    max-height: 300px;
  }
}

.krx-cat-figure:hover .krx-cat-img {
  transform: scale(1.03);
}

.krx-cat-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.krx-cat-text .krx-btn {
  align-self: stretch;
}

@media (min-width: 769px) {
  .krx-cat-text .krx-btn {
    align-self: flex-start;
  }
}

.krx-cat-copy {
  color: var(--krx-cream);
  opacity: 0.9;
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

.krx-cat-panel > .krx-cat-copy {
  margin-bottom: 16px;
}

/* sua cascade nut CTA trong bai */
/* Sua cascade: rule lam noi bat link trong bai (.krx-longform-content a) dang de len
   cac thanh phan KHONG phai link chu. Thu tu quan trong: reset the boc anh dat TRUOC,
   rule nut CTA dat SAU de thang. */

/* 1. the <a> boc anh banner: khong gach chan, khong doi mau — tru chinh nut CTA */
.krx-longform-content .krx-inbanner a:not(.krx-inbanner-cta),
.krx-faq-answer .krx-inbanner a:not(.krx-inbanner-cta) {
  color: inherit;
  font-weight: normal;
  text-decoration: none;
}

/* 2. nut tren nen gold: chu toi, dam, khong gach chan */
.krx-longform-content a.krx-inbanner-cta,
.krx-faq-answer a.krx-inbanner-cta,
.krx-longform-content .krx-inbanner-cta,
.krx-faq-answer .krx-inbanner-cta,
.krx-longform-content a.krx-btn-gold,
.krx-faq-answer a.krx-btn-gold,
.krx-longform-content .krx-btn-gold,
.krx-faq-answer .krx-btn-gold {
  color: var(--krx-ink);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 768px) {
  .krx-longform-content a.krx-inbanner-cta,
  .krx-faq-answer a.krx-inbanner-cta,
  .krx-longform-content .krx-inbanner-cta,
  .krx-faq-answer .krx-inbanner-cta,
  .krx-longform-content a.krx-btn-gold,
  .krx-faq-answer a.krx-btn-gold,
  .krx-longform-content .krx-btn-gold,
  .krx-faq-answer .krx-btn-gold {
    text-align: center;
    justify-content: center;
  }
}

/* menu, read-more, badge, map */
/* ==========================================
   VIEC 1: Header Drawer & Backdrop
   ========================================== */
.krx-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(8, 9, 11, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.krx-drawer-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.krx-drawer {
  overflow-y: auto;
  max-height: 100vh;
  max-height: 100dvh;
  -webkit-overflow-scrolling: touch;
  z-index: 999;
}

/* ==========================================
   VIEC 2: Long-form Read More / Clamp
   ========================================== */
.krx-lf-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.krx-lf-inner {
  width: 100%;
  position: relative;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.krx-lf-wrap.krx-lf-clamped .krx-lf-inner {
  max-height: 520px;
  overflow: hidden;
}

.krx-lf-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent 0%, var(--krx-ink, #08090b) 100%);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.krx-lf-wrap.krx-lf-clamped .krx-lf-fade {
  opacity: 1;
  visibility: visible;
}

.krx-lf-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 28px;
  margin-top: 16px;
  border: 1px solid var(--krx-gold, #f5c518);
  border-radius: 9999px;
  background: transparent;
  color: var(--krx-gold, #f5c518);
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  user-select: none;
  z-index: 3;
}

.krx-lf-toggle:hover,
.krx-lf-toggle:focus-visible {
  background-color: var(--krx-gold, #f5c518);
  color: var(--krx-ink, #08090b);
  box-shadow: 0 0 14px rgba(245, 197, 24, 0.35);
}

@media (max-width: 768px) {
  .krx-lf-wrap.krx-lf-clamped .krx-lf-inner {
    max-height: 420px;
  }
}

/* ==========================================
   VIEC 3: Footer Trust Badges
   ========================================== */
.krx-trust-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
}

.krx-badge-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(0.85);
  opacity: 0.85;
  padding: 4px 10px;
  background-color: var(--krx-panel-2, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--krx-line, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  transition: filter 0.3s ease, opacity 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.krx-badge-img:hover {
  filter: brightness(0) invert(1);
  opacity: 1;
  border-color: var(--krx-gold, #f5c518);
  background-color: var(--krx-panel, rgba(255, 255, 255, 0.08));
}

@media (max-width: 768px) {
  .krx-trust-badges {
    gap: 10px;
  }
  .krx-badge-img {
    height: 24px;
    padding: 3px 8px;
  }
}

/* ==========================================
   VIEC 4: Google Maps Embed
   ========================================== */
.krx-map-title {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--krx-gold, #f5c518);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.krx-map {
  width: 100%;
  height: 260px;
  border-radius: 14px;
  border: 1px solid var(--krx-line, rgba(255, 255, 255, 0.1));
  overflow: hidden;
  position: relative;
  background-color: var(--krx-panel, #121418);
}

.krx-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: brightness(0.85) saturate(0.75) contrast(1.05);
  transition: filter 0.3s ease;
}

.krx-map iframe:hover {
  filter: brightness(0.95) saturate(0.85) contrast(1.05);
}

@media (max-width: 768px) {
  .krx-map {
    height: 200px;
  }
}

/* khoi link lien quan + section ban do */
.krx-related{margin:26px 0 6px;padding:16px 18px;border:1px solid var(--krx-line);border-left:3px solid var(--krx-gold);border-radius:12px;background:var(--krx-panel-2)}
.krx-related-title{margin:0 0 8px;font-weight:700;color:var(--krx-cream);font-size:.95rem}
.krx-related-list{margin:0;padding-left:18px;display:grid;gap:6px}
.krx-related-list li{color:var(--krx-mute)}
.krx-related-note{margin-top:18px;color:var(--krx-mute)}
.krx-mapsec{padding:0 0 34px}
.krx-entity{padding:0 0 34px}
.krx-ent-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1px;margin:18px 0 0;background:var(--krx-line);border:1px solid var(--krx-line);border-radius:14px;overflow:hidden}
.krx-ent-row{display:grid;grid-template-columns:minmax(150px,38%) 1fr;gap:14px;background:var(--krx-panel);padding:13px 16px}
.krx-ent-k{margin:0;color:var(--krx-mute);font-size:.86rem}
.krx-ent-v{margin:0;color:var(--krx-cream);font-size:.92rem;font-weight:600}
.krx-ent-row:last-child:nth-child(odd){grid-column:1/-1}
@media(max-width:768px){.krx-ent-grid{grid-template-columns:1fr}.krx-ent-row{grid-template-columns:1fr;gap:3px}}
.krx-is-current{opacity:.55;cursor:default}

/* huy hieu tin cay: chip nen sang, khong loc mau */
.krx-trust-badges{gap:14px}
.krx-trust-badges .krx-badge-img{filter:none!important;opacity:1!important;background:#eceff4;border:1px solid rgba(255,255,255,.14);border-radius:8px;padding:7px 10px;height:34px;width:auto;object-fit:contain;transition:background .2s ease,transform .2s ease}
.krx-trust-badges .krx-badge-img:hover{background:#fff;transform:translateY(-2px)}
@media(max-width:768px){.krx-trust-badges{gap:10px}.krx-trust-badges .krx-badge-img{height:28px;padding:6px 8px}}
