:root {
  --bg: #050816;
  --bg-soft: #0b1220;
  --primary: #f97316;
  --primary-soft: rgba(249, 115, 22, 0.15);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont,
  "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 55%);
  color: var(--text);
  min-height: 100vh;
}

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

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

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 14px 40px;
}

/* HEADER */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  position: sticky;
  top: 10px;
  z-index: 10;
  backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(248, 250, 252, 0.25);
}
/* Nếu không muốn thấy vòng tròn chữ N cũ nữa */
.logo-circle {
    display: none;
}

.logo-circle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #f97316, #ea580c 45%, #1f2937);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff7ed;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.7);
}

.logo-text-title {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.04em;
}

.logo-text-sub {
  font-size: 11px;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
}

.nav a {
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  color: #e5e7eb;
  font-weight: 500;
}

.nav a:hover {
  background: rgba(15, 23, 42, 0.85);
  color: #fefce8;
  transform: translateY(-1px);
}

.nav a.nav-primary {
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #111827;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.7);
  font-weight: 700;
}

.nav a.nav-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px) scale(1.01);
}

.auth-buttons {
  display: flex;
  gap: 8px;
}

.btn {
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s, border-color 0.15s,
  transform 0.1s, box-shadow 0.1s;
}

.btn:hover {
  background: #020617;
  border-color: #f97316;
  color: #f97316;
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.4);
}

.btn-primary {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

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

.badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.5);
  color: #fed7aa;
  background: rgba(15, 23, 42, 0.95);
}

/* HERO + MAIN LAYOUT */

.hero-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.hero-card {
  border-radius: var(--radius-xl);
  background: radial-gradient(
          circle at top left,
          rgba(249, 115, 22, 0.15),
          transparent 46%
  ),
  radial-gradient(
          circle at bottom right,
          rgba(56, 189, 248, 0.1),
          transparent 40%
  ),
  #020617;
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.25);
  position: relative;
  overflow: hidden;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}

.hero-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

.hero-title {
  font-size: clamp(23px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-title span {
  background: linear-gradient(120deg, #f97316, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 430px;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
}

.hero-meta strong {
  color: #e5e7eb;
}

/* Hero image / mockup */
.hero-art {
  position: absolute;
  right: 12px;
  bottom: -12px;
  width: 220px;
  max-width: 40%;
  pointer-events: none;
  opacity: 0.95;
}

.hero-art-orb {
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, #f97316 0, #7c2d12 45%, #020617 70%);
  border-radius: 999px;
  position: absolute;
  bottom: 0;
  right: 45px;
  filter: blur(1px);
  box-shadow: 0 0 45px rgba(249, 115, 22, 0.65);
  opacity: 0.4;
}

.hero-art-ninja {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  border: 1px solid rgba(248, 250, 252, 0.25);
  background: radial-gradient(circle at 20% 0, #f97316, transparent 45%),
  radial-gradient(circle at 90% 80%, #0ea5e9, transparent 45%),
  linear-gradient(145deg, #020617, #020617);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-art-ninja::before {
  content: "NINJA";
  position: absolute;
  inset: 18px;
  border-radius: inherit;
  border: 1px dashed rgba(248, 250, 252, 0.18);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: rgba(248, 250, 252, 0.16);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 16px;
}

.hero-art-ninja span {
  position: relative;
  font-size: 40px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fefce8;
  text-shadow: 0 0 25px rgba(0, 0, 0, 0.9);
}

/* RIGHT COLUMN: news + info */

.side-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: radial-gradient(circle at top, #020617, #020617);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 14px 14px 12px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.card-extra {
  font-size: 11px;
  color: var(--muted);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 4px;
  font-size: 12px;
}

.news-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 6px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border 0.15s, background 0.15s, transform 0.1s,
  box-shadow 0.1s;
  align-items: center;
}

.news-item:hover {
  border-color: rgba(249, 115, 22, 0.8);
  background: rgba(15, 23, 42, 0.98);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
}

.news-thumb {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: radial-gradient(circle at 30% 0, #f97316, #0f172a 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.news-content-title {
  font-weight: 600;
  margin-bottom: 2px;
  color: #e5e7eb;
}

.news-meta {
  font-size: 11px;
  color: var(--muted);
}

.pill-event {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.4);
  color: #bfdbfe;
  margin-left: 4px;
}

/* BODY SECTIONS */

.body-grid {
  margin-top: 22px;
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 32px;
  align-items: flex-start;
}

.section-card {
    padding: 35px 40px;
    border-radius: 18px; /* bo góc lớn hơn nếu thích */
    background: radial-gradient(circle at top left, #020617, #020617) !important;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}


.section-title {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e5e7eb;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
          90deg,
          rgba(148, 163, 184, 0.5),
          transparent
  );
}

.intro-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.intro-text strong {
  color: #e5e7eb;
}

.intro-list {
  margin-top: 8px;
  font-size: 13px;
  padding-left: 18px;
  color: var(--muted);
}

.intro-list li {
  margin-bottom: 4px;
}

.class-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.class-tag {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.gallery-item {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at 20% 0, #4ade80, #0f172a 60%);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #e5e7eb;
  opacity: 0.9;
}

/* FOOTER */

.footer {
  margin-top: 24px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(31, 41, 55, 0.8);
  padding-top: 10px;
}

.footer-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.age-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px dashed rgba(148, 163, 184, 0.7);
}

.age-badge span {
  font-size: 16px;
}

/* MODAL BACKDROP */
#modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    display: none; /* Ẩn mặc định */
    align-items: center;
    justify-content: center;
    z-index: 20;
    backdrop-filter: blur(12px);
}

#modal-backdrop.active {
    display: flex; /* Khi mở modal */
}

/* MODAL */
.modal {
    display: none !important;   /* ẨN MẶC ĐỊNH, dùng !important để không bị CSS nào khác đè */
    width: 100%;
    max-width: 390px;
    background: radial-gradient(circle at top, #020617, #020617);
    border-radius: 22px;
    padding: 16px 16px 14px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
    position: relative;
}

/* KHI ACTIVE MỚI HIỆN */
.modal.active {
    display: block !important;  /* Chỉ modal đang active mới hiện */
}


.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}

.modal-body {
  font-size: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.field label {
  font-size: 11px;
  color: var(--muted);
}

.field input {
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding: 7px 11px;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  font-size: 12px;
  outline: none;
}

.field input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.4);
}

.modal-footer {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}

.modal-footer a {
  color: #f97316;
}

/* RESPONSIVE */

@media screen and (max-width: 900px),
       screen and (max-device-width: 900px) {
  /* toàn bộ CSS đang nằm trong @media (max-width: 900px) cũ */
}

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

  .hero-art {
    position: static;
    margin-top: 14px;
    max-width: 60%;
  }

  .hero-art-orb {
    display: none;
  }
}

@media screen and (max-width: 640px),
       screen and (max-device-width: 640px) {
  /* toàn bộ CSS đang nằm trong @media (max-width: 640px) cũ */
}

  .nav {
    display: none;
  }

  .page {
    padding-inline: 10px;
  }

  .hero-card {
    padding: 16px 14px 14px;
  }

  .section-card {
    padding-inline: 13px;
  }
}
.notify {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    z-index: 99999;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    opacity: 1;
    animation: slideLeft 0.4s ease;
    transition: opacity 0.5s;
}

@keyframes slideLeft {
    from { transform: translateX(120%); }
    to   { transform: translateX(0); }
}

.notify.success { background: #28a745; } /* Xanh */
.notify.error   { background: #dc3545; } /* Đỏ */
.notify.warning { background: #ffc107; color: #333; } /* Vàng */
.notify.info    { background: #17a2b8; } /* Xanh dương */

/* ===== PROFILE PAGE EXTRA ===== */

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.info-row span:first-child {
  color: var(--muted);
}

.divider {
  border: 0;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  margin: 10px 0;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.badge-status.ok {
  border-color: #22c55e;
  color: #bbf7d0;
}

.badge-status.ban {
  border-color: #ef4444;
  color: #fecaca;
}

/* Notify dùng chung cho index + profile */
.notify {
  position: fixed;
  top: 16px;
  right: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
  opacity: 1;
  animation: slideLeft 0.35s ease-out;
  transition: opacity 0.5s;
}

.notify.success { background: #22c55e; }
.notify.error   { background: #ef4444; }
.notify.warning { background: #facc15; color:#111827; }
.notify.info    { background: #3b82f6; }

@keyframes slideLeft {
  from { transform: translateX(120%); }
  to   { transform: translateX(0); }
}
/* ===== BẢNG XẾP HẠNG ===== */

.ranking-tabs {
  display: flex;
  justify-content: center;   /* căn giữa */
  gap: 10px;
  margin: 12px 0 18px;
  flex-wrap: wrap;
}

.ranking-tab {
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(circle at top, #020617, #020617);
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
  letter-spacing: .03em;
  text-transform: none;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.1s;
}

.ranking-tab:hover {
  border-color: rgba(249, 115, 22, 0.8);
  color: #e5e7eb;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
}

.ranking-tab.active {
  background: radial-gradient(circle at top, #f97316, #ea580c 55%, #7c2d12);
  border-color: transparent;
  color: #fff !important;
  font-weight: 700;
  box-shadow:
    0 0 18px rgba(249, 115, 22, 0.7),
    0 10px 30px rgba(0, 0, 0, 0.75);
  transform: translateY(-1px);
}

.ranking-table-wrap {
  display: none;
}

.ranking-table-wrap.active {
  display: block;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 4px;
}

.ranking-table th,
.ranking-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
}

.ranking-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.ranking-table tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.7);
}

.ranking-table tr:hover td {
  background: rgba(15, 23, 42, 0.95);
}

.ranking-tabs {
  display: flex;              /* trước là inline-flex */
  justify-content: center;    /* căn giữa ngang */
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}


/* dùng lại badge-status từ profile nếu chưa có */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  border: 1px solid rgba(248, 113, 113, 0.7);
  color: #fecaca;
}
.badge-status.ban {
  border-color: #ef4444;
  color: #fecaca;
}
/* ===== LUXURY GOLD TITLE ===== */
/* ===== LUXURY GOLD TITLE + ANIMATION ===== */
/* ===== LUXURY GOLD METAL TITLE + PULSE + SHINE SWEEP ===== */
.bxh-name {
  position: relative;
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  margin: 16px 0 26px;
  text-transform: uppercase;
  letter-spacing: 0.28em;

  /* Gradient vàng kim loại */
  background: linear-gradient(135deg, #fef3c7, #fde68a, #fbbf24, #f59e0b, #f97316);
  background-size: 180% 180%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* Viền kim loại + layer 3D */
  -webkit-text-stroke: 1px rgba(255, 230, 160, 0.7);
  text-shadow:
      0 1px 0 #854d0e,
      0 2px 0 #78350f,
      0 3px 4px rgba(0, 0, 0, 0.8),
      0 0 14px rgba(249, 115, 22, 0.7),
      0 0 32px rgba(249, 115, 22, 0.6);

  /* Hiệu ứng nhịp sáng + chuyển gradient nhẹ */
  animation:
    goldPulse 2.8s ease-in-out infinite,
    goldBgShift 8s ease-in-out infinite;
}

/* Dải sáng quét ngang (shine sweep) */
.bxh-name::after {
  content: "";
  position: absolute;
  top: -20%;
  left: -20%;
  width: 40%;
  height: 140%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.9) 45%,
    rgba(255, 255, 255, 0.4) 60%,
    transparent 100%
  );
  opacity: 0;
  transform: skewX(-25deg) translateX(-120%);
  pointer-events: none;
  filter: blur(1px);
  animation: shineSweep 4.5s ease-in-out infinite;
}

/* Nhịp sáng (pulse) – glow lớn / nhỏ nhẹ */
@keyframes goldPulse {
  0% {
    text-shadow:
      0 1px 0 #854d0e,
      0 2px 0 #78350f,
      0 3px 4px rgba(0, 0, 0, 0.8),
      0 0 10px rgba(249, 115, 22, 0.45),
      0 0 24px rgba(249, 115, 22, 0.35);
    letter-spacing: 0.26em;
  }
  50% {
    text-shadow:
      0 1px 0 #854d0e,
      0 3px 0 #78350f,
      0 4px 6px rgba(0, 0, 0, 0.9),
      0 0 20px rgba(249, 115, 22, 0.85),
      0 0 40px rgba(249, 115, 22, 0.7);
    letter-spacing: 0.32em;
  }
  100% {
    text-shadow:
      0 1px 0 #854d0e,
      0 2px 0 #78350f,
      0 3px 4px rgba(0, 0, 0, 0.8),
      0 0 10px rgba(249, 115, 22, 0.45),
      0 0 24px rgba(249, 115, 22, 0.35);
    letter-spacing: 0.26em;
  }
}

/* Chuyển gradient nền chữ nhẹ nhàng (kim loại đổi màu) */
@keyframes goldBgShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Shine sweep quét từ trái sang phải */
@keyframes shineSweep {
  0% {
    opacity: 0;
    transform: skewX(-25deg) translateX(-120%);
  }
  40% {
    opacity: 0;
    transform: skewX(-25deg) translateX(-120%);
  }
  55% {
    opacity: 1;
    transform: skewX(-25deg) translateX(160%);
  }
  70% {
    opacity: 0;
    transform: skewX(-25deg) translateX(220%);
  }
  100% {
    opacity: 0;
    transform: skewX(-25deg) translateX(220%);
  }
}

.ranking-table {
  width: 100%;
  max-width: 1100px;   /* hoặc 900px nếu bạn muốn hẹp hơn */
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 4px;
}
/* ===== POPUP TẢI GAME ===== */

#dl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 9998;
}

#dl-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 360px;
  max-width: 92%;
  background: #0f172a;
  transform: translate(-50%, -45%) scale(.85);
  padding: 18px 20px;
  border-radius: 18px;
  box-shadow: 0 0 30px rgba(255,166,0,.45);
  border: 1px solid rgba(255,170,60,.35);
  opacity: 0;
  pointer-events: none;
  transition: .3s ease;
  z-index: 9999;
}

#dl-popup.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

#dl-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.dl-title {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;

  background: linear-gradient(120deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 16px rgba(249,115,22,.6);
}

.dl-text {
  text-align: center;
  color: #cbd5f5;
  margin-bottom: 14px;
}

.dl-buttons .btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 8px;
}
/* ===== NOTIFY (TOAST) ===== */
.notify {
  position: fixed;
  right: 20px;
  top: 20px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(0);
}

.notify.hide {
  opacity: 0;
  transform: translateY(-10px);
}

.notify-icon {
  font-size: 16px;
}

.notify.success {
  border-color: rgba(34, 197, 94, 0.7);
}

.notify.error {
  border-color: rgba(248, 113, 113, 0.8);
}

.notify.warning {
  border-color: rgba(234, 179, 8, 0.8);
}

.notify.info {
  border-color: rgba(59, 130, 246, 0.8);
}
.notify {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 12px;
    animation: fadeIn 0.4s ease;
}

.notify.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.notify.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.notify.warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.pill-event {
    background: rgba(239, 68, 68, 0.15);
    color: #f97373;
}

.pill-update {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.pill-notice {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
}
.news-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.news-overlay.active {
    display: flex;
}

.news-modal {
    background: radial-gradient(circle at top, #1f2937, #020617 70%);
    border-radius: 18px;
    padding: 18px 20px;
    width: 360px;
    max-width: 90%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(248, 250, 252, 0.08);
}

.news-modal .modal-body {
    margin-top: 8px;
    font-size: 14px;
    color: #e5e7eb;
    line-height: 1.5;
}
.news-content-body {
    font-size: 14px;
    color: #e5e7eb;
    line-height: 1.6;
}

.news-content-body p {
    margin: 0 0 8px;
}

.news-content-body h2,
.news-content-body h3 {
    margin: 12px 0 6px;
    font-weight: 600;
    color: #f9fafb;
}

.news-content-body ul {
    margin: 0 0 8px 18px;
    list-style: disc;
}
.cke_notification_warning {
    display: none !important;
}
/* ========== HERO SLIDER ========== */
.hero-slider {
  position: relative;
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 16px;
  background: radial-gradient(circle at top left, rgba(248, 250, 252, 0.08), transparent 55%),
              rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  overflow: hidden;
}

.hero-slide {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: absolute;
  inset: 10px 12px 28px 12px;
}

.hero-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.hero-slide-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  color: #fed7aa;
  border: 1px solid rgba(248, 153, 92, 0.7);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-slide-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
}

.hero-slide-sub {
  font-size: 12px;
  color: #9ca3af;
}

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

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  background: rgba(148, 163, 184, 0.5);
  cursor: pointer;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 18px;
  background: linear-gradient(120deg, #f97316, #facc15);
}

/* ========== HERO ANIMATION ========== */
.hero-card {
  animation: heroEnter 0.6s ease-out;
}

.hero-art-ninja {
  animation: ninjaFloat 4s ease-in-out infinite alternate;
}

.hero-art-orb {
  animation: orbPulse 5s ease-in-out infinite;
}

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

@keyframes ninjaFloat {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-8px);
  }
}

@keyframes orbPulse {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
}

/* ========== DARK / LIGHT MODE ========== */
/* Mặc định: dark như hiện tại. Khi body có class .light-mode sẽ đổi theme nhẹ cho dễ đọc ban ngày. */

body.light-mode {
  background: radial-gradient(circle at top, #e5e7eb 0, #f3f4f6 55%);
  color: #111827;
}

body.light-mode .header {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(148, 163, 184, 0.4);
}

body.light-mode .logo-text-sub,
body.light-mode .intro-text,
body.light-mode .news-meta,
body.light-mode .hero-sub {
  color: #4b5563;
}

body.light-mode .hero-card,
body.light-mode .card,
body.light-mode .section-card {
  background: #f9fafb;
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 14px 30px rgba(148, 163, 184, 0.25);
}

body.light-mode .hero-card {
  background: linear-gradient(135deg, #ffffff, #f3f4ff);
}

body.light-mode .news-item {
  background: #f3f4ff;
}

body.light-mode .news-item:hover {
  background: #e5e7ff;
}

body.light-mode .footer {
  border-top-color: rgba(148, 163, 184, 0.6);
}

body.light-mode .age-badge {
  background: #eef2ff;
  border-color: rgba(129, 140, 248, 0.7);
}

/* Nút toggle theme (nếu có) */
.theme-toggle-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s ease, transform 0.1s ease;
}

.theme-toggle-btn:hover {
  background: #020617;
  transform: translateY(-1px);
}

body.light-mode .theme-toggle-btn {
  background: #e5e7eb;
  color: #020617;
}
.news-item {
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.news-item:hover {
    background: rgba(30, 64, 175, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
}
/* Bố cục bài viết trong trang chi tiết tin */
.news-content-body {
    font-size: 14px;
    color: #e5e7eb;
    line-height: 1.7;
}

/* Dòng thời gian ở đầu bài */
.news-content-body .post-date {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Khối nội dung chính */
.news-content-body .post-content {
    margin-top: 6px;
}

/* Đoạn văn trong nội dung */
.news-content-body .post-content p {
    margin: 6px 0;
}

/* Nếu có tiêu đề phụ */
.news-content-body .post-content h2,
.news-content-body .post-content h3 {
    margin: 14px 0 8px;
    font-weight: 600;
    color: #f9fafb;
}

/* Nếu có danh sách */
.news-content-body .post-content ul {
    margin: 0 0 8px 20px;
    list-style: disc;
}
/* ====== CHI TIẾT TIN TỨC (BÊN PHẢI) ====== */
.news-detail {
    padding: 28px 36px;
    border-radius: 24px;
    background:
            radial-gradient(circle at top left, #020617 0%, #020617 40%, #020617 100%) padding-box,
            linear-gradient(135deg, rgba(148,163,184,0.5), rgba(30,64,175,0.85)) border-box;
    border: 1px solid transparent;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.9);
}

/* Tiêu đề bài viết */
.news-detail .section-title {
    font-size: 18px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-detail .section-title-line {
    margin-top: 8px;
    height: 1px;
    background: linear-gradient(90deg, rgba(148,163,184,0.3), transparent);
}

/* Nội dung bài – dễ đọc hơn */
.news-detail .news-content-body {
    margin-top: 14px;
    font-size: 14.5px;
    line-height: 1.8;
    color: #e5e7eb;
    white-space: pre-line; /* nếu bạn lưu text xuống dòng bằng \n */
}

/* Nếu trong DB có <p> thì cho đẹp hơn */
.news-detail .news-content-body p {
    margin: 4px 0;
}

/* Nhấn mạnh tiêu đề con / đoạn quan trọng */
.news-detail .news-content-body strong {
    color: #fbbf24;
}

/* Danh sách bullet cho dễ đọc nếu bạn dùng <ul><li> */
.news-detail .news-content-body ul {
    margin: 6px 0 6px 20px;
    list-style: disc;
}

.news-detail .news-content-body li {
    margin: 2px 0;
}

/* =======================================================
   🌑 DARK MODE UPGRADE – chỉ áp dụng khi KHÔNG có .light-mode
   ======================================================= */

/* Nền tổng thể */
body:not(.light-mode) {
    background: radial-gradient(circle at top, #020617 0, #020617 50%, #020617 100%);
    color: var(--text);
}

/* HEADER: thanh trên cùng */
body:not(.light-mode) .header {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}

/* Logo + subtitle */
body:not(.light-mode) .logo-text-title {
    color: #f9fafb;
}
body:not(.light-mode) .logo-text-sub {
    color: #9ca3af;
}

/* CARD CHUNG (hero, tin tức, BXH, intro, news-detail...) */
body:not(.light-mode) .hero-card,
body:not(.light-mode) .card,
body:not(.light-mode) .section-card,
body:not(.light-mode) .rank-card,
body:not(.light-mode) .news-detail {
    background: radial-gradient(circle at top left, #020617 0%, #020617 45%, #020617 100%);
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.95);
}

/* Danh sách tin bên trái */
body:not(.light-mode) .news-item {
    background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(15,23,42,1));
    border-radius: 16px;
    border: 1px solid rgba(37, 99, 235, 0.45);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.95);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

body:not(.light-mode) .news-item:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.7), rgba(15,23,42,0.98));
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.98);
}

/* Mô tả tin */
body:not(.light-mode) .news-meta {
    color: #9ca3af;
}

/* Nội dung chi tiết tin */
body:not(.light-mode) .news-detail .news-content-body {
    font-size: 14.5px;
    line-height: 1.8;
    color: #e5e7eb;
}

/* Nút chung */
body:not(.light-mode) .btn {
    border-radius: 999px;
    font-weight: 600;
}

/* Nút cam chính */
body:not(.light-mode) .btn-primary {
    background: linear-gradient(90deg, #fb923c, #f97316);
    color: #111827;
    border: none;
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.55);
    transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

body:not(.light-mode) .btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.45);
}

/* Nút thường (outline) */
body:not(.light-mode) .btn:not(.btn-primary) {
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.65);
}

/* Toggle dark/light */
body:not(.light-mode) .theme-toggle-btn {
    background: rgba(15, 23, 42, 0.98);
    color: #facc15;
    border: 1px solid rgba(148, 163, 184, 0.7);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8);
}

/* Footer */
body:not(.light-mode) .footer {
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    color: #9ca3af;
}
/* =======================================================
   🌤️ LIGHT MODE PREMIUM – NSO GAME
   ======================================================= */

body.light-mode {
    background: linear-gradient(180deg, #f7f8fa, #eceff3 40%, #e4e7eb);
    color: #1f2937;
    transition: background 0.3s, color 0.3s;
    font-smoothing: antialiased;
}

/* HEADER */
body.light-mode .header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
}

/* LOGO */
body.light-mode .logo-img {
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.15));
}

/* CARD CHUNG */
body.light-mode .card,
body.light-mode .section-card,
body.light-mode .news-item,
body.light-mode .ranking-box,
body.light-mode .guide-box,
body.light-mode .news-detail {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow:
            0 10px 25px rgba(0,0,0,0.08),
            inset 0 0 0 rgba(255,255,255,0);
    transition: box-shadow 0.2s, transform 0.15s;
}

/* CARD HOVER MỀM */
body.light-mode .card:hover,
body.light-mode .news-item:hover {
    box-shadow:
            0 14px 35px rgba(0,0,0,0.12),
            inset 0 0 0 rgba(255,255,255,0.4);
    transform: translateY(-3px);
}

/* NEWS LIST CARD */
body.light-mode .news-item {
    background: #fafbfc;
    border-radius: 16px;
    padding: 15px;
}

body.light-mode .news-item:hover {
    background: #f1f5ff;
}

/* TIÊU ĐỀ */
body.light-mode .section-title,
body.light-mode .card-title {
    font-weight: 700;
    color: #111827;
}

/* NHỮNG TEXT PHỤ */
body.light-mode .news-meta,
body.light-mode .footer,
body.light-mode .desc,
body.light-mode .small-text {
    color: #6b7280;
}

/* BUTTON CHUNG */
body.light-mode .btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 8px 18px;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
body.light-mode .btn:hover {
    background: #f5f6f7;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* BUTTON PRIMARY (CAM VÀNG ĐẸP MỀM) */
body.light-mode .btn-primary {
    background: linear-gradient(90deg, #ffae4e, #ff9933);
    color: #1f1f1f;
    border: none;
    box-shadow: 0 8px 20px rgba(255,150,50,0.35);
}
body.light-mode .btn-primary:hover {
    box-shadow: 0 12px 26px rgba(255,150,50,0.45);
    transform: translateY(-2px);
}

/* BADGE */
body.light-mode .label-update,
body.light-mode .label-event {
    background: #ff9933;
    border-radius: 999px;
    padding: 3px 10px;
    color: white;
}

/* FORM INPUT */
body.light-mode input,
body.light-mode textarea,
body.light-mode select {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    padding: 10px;
    color: #1f2937;
}
body.light-mode input:focus,
body.light-mode textarea:focus {
    border-color: #ff9933;
    box-shadow: 0 0 0 3px rgba(255,150,50,0.25);
    outline: none;
}

/* FOOTER */
body.light-mode .footer {
    color: #6b7280;
    padding: 15px 0;
}
/* Chữ trong hero, news, hướng dẫn – đọc sướng mắt hơn */
.hero-card p,
.news-meta,
.guide-box li,
.intro-box p {
    line-height: 1.7;
    font-size: 14px;
}

/* Tăng khoảng cách giữa hero & cột bên phải một xíu */
.body-grid {
    column-gap: 28px;
}
/* =======================
   POPUP CHÀO MỪNG
   ======================= */

.welcome-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.welcome-overlay.active {
    display: flex;
}

.welcome-popup {
    position: relative;
    max-width: 480px;
    width: 90%;
    border-radius: 24px;
    padding: 28px 26px 22px;
    text-align: left;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.95);
    overflow: hidden;
}

/* NỀN POPUP – DARK / LIGHT */
body:not(.light-mode) .welcome-popup {
    background: radial-gradient(circle at top left, #020617 0%, #020617 50%, #020617 100%);
    border: 1px solid rgba(148, 163, 184, 0.45);
}
body.light-mode .welcome-popup {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

/* VỆNH GLOW CAM */
.welcome-popup::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(circle at top left,
    rgba(249, 115, 22, 0.5),
    transparent 60%);
    opacity: 0.75;
}

/* NÚT X */
.welcome-close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 6px;
    z-index: 1;
}
.welcome-close:hover {
    color: #f97316;
}

/* BADGE */
.welcome-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* màu badge theo theme */
body:not(.light-mode) .welcome-badge {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(249, 115, 22, 0.5);
    color: #f97316;
}
body.light-mode .welcome-badge {
    background: #fff7ed;
    border: 1px solid rgba(249, 115, 22, 0.4);
    color: #c05621;
}

.welcome-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

body:not(.light-mode) .welcome-title {
    color: #f9fafb;
}
body.light-mode .welcome-title {
    color: #111827;
}

.welcome-sub {
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.6;
}

body:not(.light-mode) .welcome-sub {
    color: #e5e7eb;
}
body.light-mode .welcome-sub {
    color: #4b5563;
}

/* ACTION BUTTONS */
.welcome-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

/* để nút trong popup full width khi mobile nhỏ */
@media screen and (max-width: 480px),
       screen and (max-device-width: 480px) {
  /* toàn bộ CSS đang nằm trong @media (max-width: 480px) cũ */
}

.welcome-footnote {
    font-size: 12px;
}

body:not(.light-mode) .welcome-footnote {
    color: #9ca3af;
}
body.light-mode .welcome-footnote {
    color: #6b7280;
}
/* ===========================
   TUNING CHO MOBILE / TABLET
   =========================== */

/* Tablet & màn nhỏ hơn 900px: chuyển layout về 1 cột, bo sát vừa mắt hơn */
@media (max-width: 900px) {
  .page {
    padding-inline: 16px;
  }

  .hero-grid,
  .body-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .hero-main,
  .hero-side {
    width: 100%;
  }
}

/* Màn <= 640px: chỉnh font, padding, bố cục cho dễ đọc hơn */
@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .page {
    padding-inline: 12px;
  }

  header {
    padding-block: 8px;
  }

  /* Logo / Brand */
  .logo-text {
    font-size: 18px;
  }

  /* Menu: cho nhỏ & có thể xuống dòng */
  nav ul {
    gap: 8px;
    font-size: 13px;
    flex-wrap: wrap;
  }

  /* Hero chính */
  .hero-card {
    padding: 16px 14px;
  }

  .hero-title {
    font-size: 20px;
    line-height: 1.3;
  }

  .hero-sub {
    font-size: 13px;
    max-width: 100%; /* tránh giới hạn cứng gây cảm giác lệch */
  }

  /* Chữ NINJA trong hero art */
  .hero-art-ninja::before {
    font-size: 20px;
    letter-spacing: 0.18em;
    text-indent: 0.18em;
  }

  .hero-art-ninja span {
    font-size: 26px;
    letter-spacing: 0.08em;
  }

  /* Tiêu đề section */
  .section-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .section-subtitle {
    font-size: 13px;
  }

  /* Tin tức / card về 1 cột */
  .news-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .card {
    padding: 12px 10px;
  }

  /* Bảng xếp hạng – dễ nhìn hơn trên màn nhỏ */
  .ranking-wrapper {
    overflow-x: auto;
  }

  .ranking-table {
    min-width: 480px;   /* cho phép scroll ngang nếu màn quá nhỏ */
    font-size: 12px;
  }

  .ranking-table th,
  .ranking-table td {
    padding: 4px 6px;
    white-space: nowrap; /* nếu muốn tự xuống dòng thì có thể bỏ dòng này */
  }

  /* Footer */
  .footer {
    padding: 12px 0;
    font-size: 12px;
    text-align: center;
  }
}

/* Màn rất nhỏ <= 480px: thu lại thêm chút nữa cho gọn */
@media (max-width: 480px) {
  .page {
    padding-inline: 8px;
  }

  .hero-title {
    font-size: 18px;
  }

  .hero-sub {
    font-size: 12px;
  }

  .hero-art-ninja::before {
    font-size: 18px;
  }

  .hero-art-ninja span {
    font-size: 22px;
  }

  nav ul {
    justify-content: center;
  }
}
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}
