/* Homepage — light civic layout */
@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap");

.home-wrap {
  --blue: #1a6bb5;
  --blue-deep: #0f4f8a;
  --sky: #e8f3fc;
  --line: #d0e0ef;
  --text: #243447;
  --muted: #5a6f82;
  --amber: #c47f00;
  --radius: 8px;
  --font: "Be Vietnam Pro", "Segoe UI", Tahoma, sans-serif;
  --pad-x: clamp(16px, 3vw, 40px);
  --site-max: 1280px;
  font-family: var(--font);
  color: var(--text);
  box-sizing: border-box;
  padding: 0 0 20px;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.home-wrap *,
.home-wrap *:before,
.home-wrap *:after {
  box-sizing: border-box;
}

/* Contest zone: full-bleed inside page shell, content centered */
.main:has(.home-wrap) {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
}

.contest-main {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 36px 0 56px;
  /* Keep room for drum watermark when podium/results are empty */
  min-height: clamp(520px, 68vh, 680px);
  background:
    radial-gradient(
      circle at 50% 48%,
      rgba(30, 115, 190, 0.1),
      transparent 52%
    ),
    linear-gradient(180deg, #f7fbff 0%, #f7fbff 72%, #ffffff 100%);
  border-top: 1px solid rgba(26, 107, 181, 0.08);
  border-bottom: 1px solid rgba(26, 107, 181, 0.06);
  overflow: hidden;
}

.contest-main:before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  /* Scale to fit inside section so top/bottom are not clipped */
  width: min(560px, 78%, calc(100% - 48px));
  height: min(560px, 78%, calc(100% - 64px));
  aspect-ratio: 1;
  max-width: 100%;
  max-height: 100%;
  transform: translate(-50%, -50%);
  background-color: rgba(26, 107, 181, 0.12);
  -webkit-mask-image: url(/css/img/trongdong.png);
  mask-image: url(/css/img/trongdong.png);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  pointer-events: none;
  z-index: 0;
}

.contest-main:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(26, 107, 181, 0.18) 35%,
    rgba(26, 107, 181, 0.28) 50%,
    rgba(26, 107, 181, 0.18) 65%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.contest-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  box-sizing: border-box;
}

/* Lower blocks: full-bleed page, constrained centered column */
.home-lower {
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 24px var(--pad-x) 8px;
  box-sizing: border-box;
}

.home-lower > .home-account,
.home-lower > .home-stats-section,
.home-lower > .items.home-news,
.home-lower > .home-boards,
.home-lower > .adv_main_default {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

.home-intro {
  padding: 8px 4px 18px;
  max-width: 100%;
  text-align: center;
}

.home-welcome {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.5;
}

.home-brand {
  display: none;
}

.home-headline {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--blue-deep);
  margin: 0 auto 10px;
  max-width: none;
  white-space: nowrap;
}

.home-lead {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 auto 16px;
  max-width: none;
  white-space: nowrap;
}

.home-intro-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.home-podium {
  margin: 4px 0 8px;
  text-align: center;
}

.home-podium-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.home-podium-sub {
  margin: 0 auto 22px;
  max-width: 28em;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.home-podium--empty {
  margin: 8px 0 12px;
}

.home-podium-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 420px;
  margin: 12px auto 0;
  padding: 20px 16px;
  text-align: center;
  /* Keep drum visible behind empty state */
  background: transparent;
  border: 0;
}

.home-podium-empty i {
  font-size: 28px;
  color: var(--blue);
  opacity: 0.7;
  margin-bottom: 4px;
}

.home-podium-empty p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-deep);
}

.home-podium-empty span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.home-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin: 36px 0 0;
  padding: 28px 0 0;
  background: none;
  border: 0;
  border-top: 1px solid rgba(26, 107, 181, 0.1);
}

.home-countdown .home-alert {
  margin: 4px 0 0;
  max-width: 36em;
  white-space: normal;
}

/* Logged-in contestant hero — first in viewport */
.home-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 8px 0 28px;
  border-bottom: 1px solid rgba(26, 107, 181, 0.12);
}

/* Override legacy .top_thisinh_default h2 blue bar */
.home-wrap .top_thisinh_default .home-player-title,
.home-player-title {
  margin: 0 0 4px;
  padding: 0;
  width: auto;
  max-width: none;
  border-radius: 0;
  background: none !important;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--blue-deep) !important;
  text-align: center;
}

.home-player-window {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 640px;
}

.home-player .home-countdown-range,
.home-player .home-countdown-label {
  margin: 0;
}

.home-player .home-countdown-timer {
  margin: 4px 0 2px;
}

.home-player-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.home-player .home-btn {
  min-width: 140px;
  min-height: 48px;
  padding: 0 22px;
  font-size: 15px;
}

.home-player .home-btn-primary {
  min-width: 180px;
  box-shadow: 0 8px 20px rgba(26, 107, 181, 0.28);
}

.home-player .home-note,
.home-player .home-status {
  max-width: 34em;
  margin: 0;
}

.home-player .home-alert {
  max-width: none;
  width: 100%;
  margin: 0;
  white-space: nowrap;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
}

.home-thanks-title {
  margin: 8px 0 6px;
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 700;
  line-height: 1.35;
  color: #157a3c;
}

.home-thanks-sub {
  margin: 0;
  max-width: none;
  width: 100%;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
  text-align: center;
}

.home-podium--secondary {
  margin-top: 28px;
  padding-top: 8px;
  opacity: 0.96;
}

.home-podium--secondary .home-podium-title {
  font-size: 18px;
}

.home-podium--secondary .home-podium-sub {
  margin-bottom: 14px;
}

.home-podium-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
  max-width: 920px;
  margin: 0 auto;
}

.home-podium-item {
  position: relative;
  text-align: center;
  padding: 20px 16px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(
    165deg,
    rgba(247, 251, 255, 0.88) 0%,
    rgba(255, 255, 255, 0.94) 48%,
    rgba(243, 247, 251, 0.9) 100%
  );
  box-shadow: 0 8px 22px rgba(15, 79, 138, 0.08);
  overflow: hidden;
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  animation: podium-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    filter 0.3s ease;
}

.home-podium-item:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 60%,
    transparent 100%
  );
  transform: translateX(-120%);
  animation: podium-shine 4.5s ease-in-out 1.2s infinite;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s ease;
}

.home-podium-item > * {
  position: relative;
  z-index: 1;
}

.home-podium-item.is-second {
  animation-delay: 0s;
}

.home-podium-item.is-second:before {
  animation-delay: 1.4s;
}

.home-podium-item.is-first {
  animation-delay: 0.12s;
}

.home-podium-item.is-first:before {
  animation-delay: 1s;
}

.home-podium-item.is-third {
  animation-delay: 0.24s;
}

.home-podium-item.is-third:before {
  animation-delay: 1.8s;
}

.home-podium-item:hover {
  transform: translateY(-10px) scale(1.035);
  filter: brightness(1.03);
  z-index: 3;
  box-shadow: 0 18px 36px rgba(15, 79, 138, 0.18);
}

.home-podium-item:hover:before {
  animation: podium-shine-hover 0.85s ease-out forwards;
}

.home-podium-item:hover .home-podium-medal {
  transform: scale(1.12) translateY(-2px);
}

.home-podium-item:hover .home-podium-icon {
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18));
}

.home-podium-item:hover .home-podium-rank {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 4px 12px rgba(26, 107, 181, 0.45);
}

.home-podium-item:hover .home-podium-name {
  color: var(--blue);
}

.home-podium-item:hover .home-podium-score {
  transform: scale(1.06);
}

.home-podium-medal {
  position: relative;
  width: 72px;
  height: 54px;
  margin: 0 auto 12px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-podium-icon {
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask-image: url(/css/img/podium.svg);
  mask-image: url(/css/img/podium.svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
  transition: filter 0.3s ease;
}

.home-podium-rank {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: linear-gradient(180deg, #3a86c8 0%, #1a6bb5 100%);
  box-shadow: 0 2px 6px rgba(26, 107, 181, 0.35);
  text-shadow: none;
  z-index: 1;
  pointer-events: none;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease;
}

.home-podium-place {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b8294;
}

.home-podium-name {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-deep);
  line-height: 1.35;
  transition: color 0.25s ease;
}

.home-podium-dv {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  min-height: 1.4em;
}

.home-podium-score {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(26, 107, 181, 0.1);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: var(--blue-deep);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
}

.home-podium-score span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 2px;
}

.home-podium-item.is-first {
  padding-top: 24px;
  padding-bottom: 22px;
  border-color: rgba(224, 168, 0, 0.35);
  background: linear-gradient(
    165deg,
    rgba(255, 246, 217, 0.92) 0%,
    rgba(255, 253, 245, 0.95) 42%,
    rgba(255, 243, 204, 0.9) 100%
  );
  box-shadow:
    0 10px 26px rgba(168, 118, 0, 0.16),
    0 0 0 0 rgba(224, 168, 0, 0.28);
  order: 2;
  animation:
    podium-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards,
    podium-glow-gold 2.8s ease-in-out 1.1s infinite;
}

.home-podium-item.is-first:hover {
  border-color: rgba(224, 168, 0, 0.7);
  box-shadow:
    0 20px 40px rgba(168, 118, 0, 0.32),
    0 0 0 3px rgba(224, 168, 0, 0.18);
  animation-play-state: paused;
}

.home-podium-item.is-first:hover .home-podium-rank {
  box-shadow: 0 4px 14px rgba(212, 152, 0, 0.55);
}

.home-podium-item.is-first:hover .home-podium-name {
  color: #a66a00;
}

.home-podium-item.is-first .home-podium-medal {
  width: 88px;
  height: 66px;
}

.home-podium-item.is-first .home-podium-icon {
  color: #e0a800;
}

.home-podium-item.is-first .home-podium-rank {
  width: 34px;
  height: 34px;
  min-width: 34px;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(180deg, #f0c14a 0%, #d49800 100%);
  box-shadow: 0 2px 8px rgba(212, 152, 0, 0.4);
}

.home-podium-item.is-first .home-podium-place {
  color: #a66a00;
}

.home-podium-item.is-first .home-podium-name {
  font-size: 18px;
}

.home-podium-item.is-first .home-podium-score {
  border-top-color: rgba(224, 168, 0, 0.22);
  font-size: 34px;
  color: #a66a00;
}

.home-podium-item.is-second {
  order: 1;
  border-color: rgba(142, 158, 171, 0.4);
  background: linear-gradient(
    165deg,
    rgba(238, 242, 245, 0.9) 0%,
    rgba(255, 255, 255, 0.94) 45%,
    rgba(232, 237, 241, 0.9) 100%
  );
  box-shadow: 0 8px 22px rgba(90, 110, 128, 0.12);
  animation: podium-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0s forwards;
}

.home-podium-item.is-second:hover {
  border-color: rgba(122, 138, 152, 0.75);
  box-shadow:
    0 18px 36px rgba(90, 110, 128, 0.28),
    0 0 0 3px rgba(142, 158, 171, 0.22);
}

.home-podium-item.is-second:hover .home-podium-rank {
  box-shadow: 0 4px 12px rgba(122, 138, 152, 0.5);
}

.home-podium-item.is-second:hover .home-podium-name {
  color: #5a6f82;
}

.home-podium-item.is-second .home-podium-icon {
  color: #8e9eab;
}

.home-podium-item.is-second .home-podium-rank {
  background: linear-gradient(180deg, #a8b5c0 0%, #7a8a98 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(122, 138, 152, 0.35);
}

.home-podium-item.is-second .home-podium-score {
  border-top-color: rgba(142, 158, 171, 0.25);
}

.home-podium-item.is-third {
  order: 3;
  border-color: rgba(196, 127, 0, 0.35);
  background: linear-gradient(
    165deg,
    rgba(255, 240, 222, 0.9) 0%,
    rgba(255, 250, 244, 0.94) 45%,
    rgba(253, 232, 208, 0.9) 100%
  );
  box-shadow: 0 8px 22px rgba(164, 100, 20, 0.12);
  animation: podium-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.24s forwards;
}

.home-podium-item.is-third .home-podium-icon {
  color: #c47f00;
}

.home-podium-item.is-third .home-podium-rank {
  background: linear-gradient(180deg, #d9983a 0%, #b56c00 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(181, 108, 0, 0.35);
}

.home-podium-item.is-third .home-podium-place {
  color: #9a5f00;
}

.home-podium-item.is-third .home-podium-score {
  border-top-color: rgba(196, 127, 0, 0.22);
  color: #9a5f00;
}

.home-podium-item.is-third:hover {
  border-color: rgba(196, 127, 0, 0.7);
  box-shadow:
    0 18px 36px rgba(164, 100, 20, 0.3),
    0 0 0 3px rgba(196, 127, 0, 0.2);
}

.home-podium-item.is-third:hover .home-podium-rank {
  box-shadow: 0 4px 12px rgba(181, 108, 0, 0.5);
}

.home-podium-item.is-third:hover .home-podium-name {
  color: #9a5f00;
}

@keyframes podium-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes podium-shine {
  0%,
  55% {
    transform: translateX(-120%);
  }
  75%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes podium-shine-hover {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

@keyframes podium-glow-gold {
  0%,
  100% {
    box-shadow:
      0 10px 26px rgba(168, 118, 0, 0.16),
      0 0 0 0 rgba(224, 168, 0, 0.2);
  }
  50% {
    box-shadow:
      0 14px 32px rgba(168, 118, 0, 0.24),
      0 0 22px 2px rgba(224, 168, 0, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-podium-item,
  .home-podium-item.is-first,
  .home-podium-item.is-second,
  .home-podium-item.is-third,
  .home-podium-item:before {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

.home-countdown-range {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}

.home-countdown-range strong {
  color: var(--blue-deep);
  font-weight: 700;
}

.home-countdown-label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}

.home-countdown-timer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.home-cd-unit {
  min-width: 72px;
  text-align: center;
  padding: 4px 8px;
}

.home-cd-unit strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
  color: var(--blue-deep);
}

.home-cd-unit span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-btn-vao {
  min-width: 160px;
}

.home-btn-vao.is-disabled,
.home-btn-vao[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.home-btn-primary {
  background: var(--blue);
  color: #fff !important;
}

.home-btn-primary:hover {
  background: var(--blue-deep);
}

.home-btn-ghost {
  background: #fff;
  color: var(--blue-deep) !important;
  border-color: var(--line);
}

.home-btn-ghost:hover {
  background: var(--sky);
}

.home-section-head {
  margin: 0 0 12px;
}

.home-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 4px;
}

.home-section-head h2,
.home-account h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue-deep);
  margin: 0;
  background: none !important;
  width: auto !important;
  padding: 0 !important;
  border: 0;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(14px, 2vw, 24px);
  margin-bottom: 24px;
  align-items: stretch;
  width: 100%;
}

.home-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  min-width: 0;
}

.home-card-title {
  color: var(--blue-deep);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--sky);
  border-bottom: 1px solid var(--line);
}

.home-card-guide .home-card-title {
  background: #fff8e8;
  border-bottom-color: #f0e2c0;
  color: #8a5a00;
}

.home-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.home-guide-list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.home-guide-list li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.home-guide-list a {
  color: var(--blue) !important;
  font-weight: 600;
}

.home-field {
  display: grid;
  gap: 5px;
}

.home-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.home-login-fields {
  display: grid;
  gap: 10px;
}

.home-login-fields input[type="text"],
.home-login-fields input[type="password"] {
  width: 100% !important;
  box-sizing: border-box;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  padding: 10px 12px !important;
  font-size: 14px;
  font-family: var(--font);
  background: #fff !important;
  color: var(--text);
}

.home-login-fields input:focus {
  outline: none;
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 2px rgba(26, 107, 181, 0.15);
}

.home-login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.home-wrap ._csdf {
  float: none !important;
  display: block !important;
  margin: 0 !important;
  width: 100%;
}

.home-wrap ._csdf a,
.home-wrap ._csdf {
  text-decoration: none;
}

.home-wrap ._csdf div:nth-child(1),
.home-wrap ._csdf div:nth-child(2) {
  background: none;
  padding: 0;
  float: none;
}

.home-wrap ._csdf a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius);
  padding: 10px 12px;
  font-weight: 600;
  font-size: 14px;
}

.home-wrap ._csdf a:hover {
  background: var(--blue-deep);
}

.home-wrap .home-btn-register a,
.home-wrap ._csdf.home-btn-register a {
  background: var(--amber);
  color: #fff;
  border: 0;
  box-shadow: none;
}

.home-wrap .home-btn-register a:hover {
  background: #a66a00;
}

.home-forgot {
  display: block;
  margin-top: 12px;
  text-align: center;
  color: var(--blue) !important;
  font-weight: 600;
  font-size: 13px;
}

.home-login-error {
  display: block;
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
}

.home-stats-section {
  position: relative;
  z-index: 2;
  margin: 40px 0 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  width: 100%;
  box-sizing: border-box;
}

.home-stats-head {
  margin: 0 0 20px;
  text-align: center;
}

.home-stats-head .home-eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 28px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0;
  border: 0;
}

.home-stat {
  position: relative;
  text-align: center;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--blue-deep);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.home-stat:not(:first-child) {
  padding-left: 0;
}

.home-stat:not(:first-child):before {
  display: none;
}

.home-stat i {
  display: none;
}

.home-stat-value,
.home-stat strong.home-stat-value,
.home-stat strong {
  display: block;
  margin: 0;
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
}

.home-stat-label,
.home-stat b,
.home-stat span.home-stat-label {
  display: block;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.home-stat-day .home-stat-value,
.home-stat-day strong {
  color: var(--amber);
}

.home-stat-reg .home-stat-value,
.home-stat-reg strong {
  color: var(--blue);
}

.home-stat-new .home-stat-value,
.home-stat-new strong {
  color: #2a9a6a;
}

.home-stat-sk .home-stat-value,
.home-stat-sk strong {
  color: var(--blue-deep);
}

.home-stat-day,
.home-stat-reg,
.home-stat-new,
.home-stat-sk {
  background: transparent;
  border: 0;
}

.home-account {
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  padding: 18px 16px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
}

.home-account .profile,
.home-profile {
  background: transparent;
  color: inherit;
  padding: 0;
  margin: 0 0 14px;
  display: block;
}

.home-profile-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue-deep);
  margin: 0 0 4px;
}

.home-profile-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.home-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.home-account .btn1,
.home-account a.btn {
  border-radius: var(--radius) !important;
  font-weight: 600;
  font-family: var(--font);
  padding: 10px 16px !important;
}

.home-account .btn-primary {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
  color: #fff !important;
}

.home-account .btn-dar {
  background: var(--sky) !important;
  color: var(--blue-deep) !important;
  border: 1px solid var(--line) !important;
}

.home-alert,
.home-account #_tb,
.home-status {
  display: block;
  color: #a14a12 !important;
  font-weight: 600;
  font-size: 14px;
  margin: 8px 0;
  line-height: 1.5;
}

.home-note {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.home-wrap .vitri-img {
  display: none;
}

.home-wrap .top_thisinh_default,
.home-wrap .top_thisinh_quan,
.home-wrap ._dangnhap {
  background: none !important;
  height: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  float: none !important;
}

.home-wrap .top_thisinh_quan > .items {
  height: auto !important;
  width: 100% !important;
  float: none !important;
  border: 0 !important;
  display: block !important;
}

.home-wrap .items._dangnhap {
  box-shadow: none !important;
  border: 0 !important;
  background: transparent !important;
  margin: 0 !important;
}

.home-wrap .items.home-news {
  border: 1px solid var(--line) !important;
  border-radius: 0 !important;
  overflow: hidden;
  background: #fff !important;
  margin: 0 0 32px !important;
  margin-top: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  display: block !important;
  box-sizing: border-box;
  box-shadow: none !important;
}

.home-panel {
  background: transparent;
  border: 0;
}

.home-panel-head {
  margin: 0 0 4px;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(26, 107, 181, 0.14);
}

.home-wrap .items.home-news > .home-panel-head {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.home-panel-head .home-eyebrow {
  margin: 0 0 4px;
}

.home-panel-title,
.home-wrap .home-panel-title.t2,
.home-wrap .bangdiem .t2.home-panel-title {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  border-radius: 0 !important;
  background: none !important;
  color: var(--blue-deep) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
  text-align: left !important;
  line-height: 1.3;
}

.home-wrap .items.home-news .home-panel-title {
  font-size: 18px !important;
}

.home-wrap .items .title {
  display: none !important;
}

.home-wrap .thongbao,
.home-wrap .items.home-news .thongbao {
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block;
}

.home-wrap ._thongbao {
  width: 100% !important;
  border-collapse: collapse;
  table-layout: fixed;
}

.home-wrap ._thongbao a {
  color: var(--blue-deep);
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.home-wrap ._thongbao a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-wrap ._thongbao tr {
  background: #fff;
}

.home-wrap ._thongbao tr:nth-child(even) {
  background: #f3f7fb !important;
}

.home-wrap ._thongbao td {
  padding: 14px 20px !important;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  border-left: 0 !important;
  position: static !important;
  color: var(--text);
  background: transparent;
}

.home-wrap ._thongbao tr td:last-child {
  padding-right: 20px !important;
}

.home-wrap ._thongbao tr:last-child td {
  border-bottom: 0;
}

.home-wrap ._thongbao tr td:first-child {
  width: 120px;
  padding-right: 12px !important;
  padding-left: 20px !important;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.home-wrap ._thongbao tr td:nth-child(2) {
  border-left: 0 !important;
  position: static !important;
  width: auto;
}

.home-wrap ._thongbao td div[style*="position: absolute"] {
  display: none;
}

.home-news-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue);
  vertical-align: middle;
}

.home-wrap .home-boards {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 8px !important;
  float: none !important;
}

.home-wrap .top_thisinh_quan > .bangdiem,
.home-wrap .home-board {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
  margin-left: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 0 !important;
  overflow: hidden;
  background: #fff !important;
  display: flex !important;
  flex-direction: column;
  min-height: 280px;
  height: auto !important;
  position: relative;
  box-shadow: none !important;
}

.home-wrap .home-board > .home-panel-head {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex: 0 0 auto;
}

.home-wrap .home-board .home-board-body {
  flex: 1 1 auto;
}

.home-wrap .home-board .home-panel-title,
.home-wrap .home-board .t2.home-panel-title {
  font-size: 17px !important;
}

.home-board-body {
  padding: 4px 16px 12px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}

.home-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 160px;
  margin: 8px 0;
  padding: 20px 16px;
  text-align: center;
  color: var(--muted);
  background: #f7fbfe;
  border: 1px dashed var(--line);
}

.home-empty i {
  font-size: 26px;
  color: var(--blue);
  opacity: 0.7;
  margin-bottom: 2px;
}

.home-empty p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-deep);
  line-height: 1.4;
}

.home-empty span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.home-news-list .home-empty {
  margin: 12px 16px 16px;
  min-height: 120px;
}

.home-wrap .t2 {
  color: var(--blue-deep) !important;
  padding: 0 !important;
  width: auto !important;
  border-radius: 0 !important;
  font-weight: 700;
  text-align: left;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-transform: none;
  background: none !important;
}

.home-board-gold .t2,
.home-board-teal .t2,
.home-board-rank .t2,
.home-board-new .t2 {
  background: none !important;
}

.home-wrap .bangdiem > div {
  display: block;
}

.home-wrap .home-rank-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}

.home-wrap .home-rank-row:last-child {
  border-bottom: 0;
}

.home-wrap .home-rank-info {
  flex: 1;
  min-width: 0;
}

.home-wrap .home-rank-info .m1 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.home-wrap .home-rank-info span {
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
  line-height: 1.4;
}

.home-wrap .home-rank-score {
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 18px;
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.home-wrap .home-rank-score span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 2px;
}

.home-wrap .home-rank-date {
  flex-shrink: 0;
  min-width: 88px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.home-wrap .bangxephang {
  width: 100%;
}

.home-wrap .bangxephang td,
.home-wrap .bangxephang th {
  padding: 9px 10px !important;
  border-bottom: 1px solid rgba(26, 107, 181, 0.08);
}

.home-wrap .bangxephang td:first-child {
  width: 48px !important;
  text-align: center;
  vertical-align: middle;
}

.home-wrap .bangxephang .m1 {
  color: var(--text);
  margin: 0;
  font-size: 14px;
}

.home-wrap .bangxephang td:last-child {
  color: var(--blue-deep);
  font-weight: 700;
  text-align: center;
  font-size: 15px;
}

.home-wrap .r_1 {
  width: 28px !important;
  height: auto !important;
  min-height: 0;
  line-height: 1.2 !important;
  border-radius: 0;
  color: var(--muted) !important;
  text-align: left;
  font-weight: 700;
  font-size: 13px !important;
  padding: 0 !important;
  margin: 0;
  float: none !important;
  display: block;
  flex-shrink: 0;
  background: none !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.home-wrap .c_1,
.home-wrap .c_2,
.home-wrap .c_3,
.home-wrap .c_4,
.home-wrap .c_5,
.home-wrap .c_more {
  background: none !important;
  color: var(--muted) !important;
}

.home-wrap .c_1 {
  color: var(--amber) !important;
}

.home-wrap .home-more-list {
  display: none;
}

.home-wrap .items_thisinh {
  width: 100% !important;
  display: block !important;
  margin: 0 !important;
  margin-top: auto !important;
}
  padding: 0 !important;
  position: static !important;
}

.home-wrap .xemthem {
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  text-align: center;
  padding: 12px 4px 8px !important;
  margin: 0 !important;
  border-top: 0;
  background: none;
}

.home-wrap .xemthem a {
  display: inline;
  padding: 0;
  background: none !important;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: none;
  text-decoration: none;
  color: var(--blue) !important;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.home-wrap .xemthem a:hover {
  color: var(--blue-deep) !important;
  border-bottom-color: var(--blue-deep);
}

.home-board-gold .xemthem,
.home-board-teal .xemthem,
.home-board-rank .xemthem,
.home-board-new .xemthem {
  background: none;
}

.home-board-gold .xemthem a,
.home-board-teal .xemthem a,
.home-board-rank .xemthem a,
.home-board-new .xemthem a {
  color: var(--blue) !important;
}

.home-wrap .home-hidden,
.home-wrap .top_thisinh_quan.home-hidden {
  display: none !important;
}

.home-wrap .adv_main_default {
  display: flex !important;
  flex-direction: column;
  gap: 12px;
  width: 100% !important;
  max-width: 100%;
  margin: 24px 0 8px;
  padding: 0;
  visibility: visible !important;
  opacity: 1 !important;
}

.home-wrap .adv_main_default:empty {
  display: none !important;
  margin: 0 !important;
}

.home-wrap .advs_default,
.home-wrap .adv_main_default > .advs_default {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.home-wrap .advs_default a,
.home-wrap .adv_main_default > .advs_default a {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}

.home-wrap .advs_default img,
.home-wrap .adv_main_default > .advs_default a img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 80px;
  display: block !important;
  object-fit: contain;
  background: #f7fbff;
}

/* Kill legacy fixed 80px ad strip that collapses bottom banners */
.home-wrap .adv_main_default,
.home-wrap .adv_main_default > .advs_default,
body .home-wrap .adv_main_default > .advs_default {
  height: auto !important;
}

body .home-wrap .adv_main_default > .advs_default a,
body .home-wrap .adv_main_default > .advs_default a img {
  height: auto !important;
  max-height: none !important;
}

@media (max-width: 900px) {
  .contest-main {
    min-height: clamp(460px, 62vh, 600px);
    padding: 28px 0 44px;
  }

  .contest-main:before {
    width: min(420px, 86%, calc(100% - 24px));
    height: min(420px, 86%, calc(100% - 40px));
  }

  .home-wrap {
    padding: 12px 0 20px;
  }

  /* Mobile: countdown + Vao thi before podium */
  .contest-inner {
    display: flex;
    flex-direction: column;
  }

  .home-countdown {
    order: 1;
  }

  .home-player {
    order: 1;
  }

  .home-stats-section {
    order: 2;
  }

  .home-podium,
  .home-podium--secondary,
  .home-podium--empty {
    order: 3;
    margin-top: 20px;
  }

  .home-wrap .home-boards {
    grid-template-columns: 1fr;
  }

  .home-wrap .home-board {
    min-height: 0;
  }

  .home-stats {
    grid-template-columns: 1fr 1fr;
    border: 0;
    gap: 20px;
  }

  .home-stat {
    padding: 0;
  }

  .home-stat:not(:first-child) {
    padding-left: 0;
  }

  .home-stat:not(:first-child):before {
    display: none;
  }

  .home-podium-item.is-first,
  .home-podium-item.is-second,
  .home-podium-item.is-third {
    order: 0;
  }

  .home-podium-item.is-first {
    order: -1;
  }

  .home-btn-vao {
    width: min(100%, 220px);
  }

  .home-intro {
    padding-top: 4px;
  }

  .home-headline,
  .home-lead {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .home-btn {
    width: 100%;
  }

  .home-player .home-alert {
    font-size: 12px;
    letter-spacing: -0.01em;
  }

  .home-thanks-sub {
    font-size: 12px;
    letter-spacing: -0.01em;
  }

  .home-stat-value,
  .home-stat strong.home-stat-value,
  .home-stat strong {
    font-size: 28px;
  }
}
