/* Thiên Long Bát Bộ 2 — Home (kiếm hiệp) */

/* Vô hiệu layout cũ khi trang Home mới */
html.tlbb2-page body {
  margin: 0 !important;
  padding: 0 !important;
  background: #0c0906 !important;
  overflow-x: hidden !important;
}

html.tlbb2-page .wrapper,
html.tlbb2-page #main-home,
html.tlbb2-page #main-action,
html.tlbb2-page #main-sect {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
  background: transparent !important;
}

.tlbb2-home {
  --ink: #0c0906;
  --smoke: #1a140f;
  --bronze: #d4a84b;
  --gold: #f0d78c;
  --vermillion: #b42822;
  --vermillion-deep: #8a1a16;
  --paper: #fff6e4;
  --paper-dim: #f0e2c4;
  --mist: #e8dcc0;
  --line: rgba(240, 215, 140, 0.55);
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  color: var(--paper);
  font-family: var(--font-body);
  background: var(--ink);
  overflow-x: hidden;
}

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

.tlbb2-home a {
  color: inherit;
  text-decoration: none;
}

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

/* —— Nav —— */
.tl2-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 4vw;
  background: rgba(8, 6, 4, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.tl2-nav.is-scrolled {
  background: rgba(8, 6, 4, 0.97);
  box-shadow: 0 1px 0 var(--line);
}

.tl2-brand {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
  white-space: nowrap;
}

.tl2-brand span {
  color: var(--paper);
  font-weight: 500;
  font-style: italic;
}

.tl2-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tl2-menu > li > a,
.tl2-drop > summary {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  cursor: pointer;
  list-style: none;
  transition: color 0.25s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.tl2-menu > li > a:hover,
.tl2-drop[open] > summary,
.tl2-drop > summary:hover {
  color: var(--gold);
}

.tl2-drop {
  position: relative;
}

.tl2-drop > summary::-webkit-details-marker {
  display: none;
}

.tl2-drop-panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  min-width: 10rem;
  padding: 0.5rem 0;
  background: var(--smoke);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.tl2-drop-panel a {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  color: var(--paper-dim);
}

.tl2-drop-panel a:hover {
  color: var(--gold);
  background: rgba(184, 149, 58, 0.08);
}

.tl2-nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.tl2-nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--gold);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.tl2-nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.tl2-nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.tl2-nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* —— Hero —— */
.tl2-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  background: var(--ink) center/cover no-repeat;
}

.tl2-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.tl2-hero-media video,
.tl2-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.tl2-hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(12, 9, 6, 0.88) 0%, rgba(12, 9, 6, 0.45) 48%, rgba(12, 9, 6, 0.2) 100%),
    linear-gradient(0deg, rgba(12, 9, 6, 0.95) 0%, transparent 42%);
  pointer-events: none;
}

.tl2-hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 92vw);
  padding: 0 4vw 12vh;
  animation: tl2-rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tl2-servers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
}

.tl2-servers li {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 0.28rem 0.7rem;
}

.tl2-hero-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7.5vw, 5.2rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.55);
}

.tl2-hero-title em {
  display: block;
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
  font-size: 0.55em;
  letter-spacing: 0.08em;
  margin-top: 0.35rem;
}

.tl2-hero-lead {
  margin: 0 0 1.75rem;
  max-width: 28rem;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  font-weight: 500;
  line-height: 1.65;
  color: #fff6e4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.tl2-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tl2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.55rem;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

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

.tl2-btn--primary {
  background: linear-gradient(180deg, #c9332c 0%, #8a1a16 100%);
  color: #fff8ea !important;
  border-color: #f0d78c;
  box-shadow: 0 8px 28px rgba(154, 31, 26, 0.45);
}

.tl2-btn--primary:hover {
  background: linear-gradient(180deg, #e03d35 0%, #c9332c 100%);
  color: #fff !important;
}

.tl2-btn--ghost {
  background: rgba(8, 6, 4, 0.72);
  color: #fff6e4 !important;
  border-color: #f0d78c;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.tl2-btn--ghost:hover {
  background: rgba(240, 215, 140, 0.22);
  color: #fff !important;
  border-color: #ffe9a8;
}

.tl2-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  z-index: 2;
  transform: translateX(-50%);
  width: 1px;
  height: 3.2rem;
  background: linear-gradient(180deg, transparent, var(--gold));
  animation: tl2-pulse 2.2s ease-in-out infinite;
  pointer-events: none;
}

/* —— Sections shared —— */
.tl2-section {
  position: relative;
  padding: 5.5rem 4vw;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(154, 31, 26, 0.12), transparent 50%),
    linear-gradient(180deg, var(--ink) 0%, var(--smoke) 50%, var(--ink) 100%);
}

.tl2-section-head {
  text-align: center;
  margin: 0 auto 2.5rem;
  max-width: 36rem;
  animation: tl2-fade 0.9s ease both;
}

.tl2-section-head h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.tl2-section-head p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--mist);
}

.tl2-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  color: var(--bronze);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.tl2-ornament::before,
.tl2-ornament::after {
  content: '';
  width: 3.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bronze));
}

.tl2-ornament::after {
  background: linear-gradient(90deg, var(--bronze), transparent);
}

/* —— News —— */
.tl2-news-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.75rem;
  max-width: 1100px;
  margin: 0 auto;
}

.tl2-slider {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #1a140f;
  aspect-ratio: 16 / 9;
  min-height: 200px;
}

.tl2-slider .swiper {
  width: 100%;
  height: 100%;
}

.tl2-slider .swiper-wrapper {
  height: 100%;
}

.tl2-slider .swiper-slide {
  height: 100%;
  opacity: 1 !important;
  background: #1a140f;
}

.tl2-slider .swiper-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.tl2-slider img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  object-position: center;
  background: #1a140f;
}

.tl2-slider .swiper-pagination {
  bottom: 10px !important;
}

.tl2-slider .swiper-pagination-bullet {
  background: #f0e2c4;
  opacity: 0.55;
}

.tl2-slider .swiper-pagination-bullet-active {
  background: #f0d78c;
  opacity: 1;
}

.tl2-news-panel {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(26, 20, 15, 0.95), rgba(12, 9, 6, 0.98));
  padding: 1rem 1.1rem 1.25rem;
}

.tl2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.65rem;
}

.tl2-tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tl2-tabs button.is-active,
.tl2-tabs button:hover {
  color: #fff6e4;
  border-bottom-color: var(--gold);
  background: rgba(240, 215, 140, 0.1);
}

.tl2-tab-pane {
  display: none;
}

.tl2-tab-pane.is-active {
  display: block;
  animation: tl2-fade 0.35s ease both;
}

.tl2-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tl2-news-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.72rem 0;
  border-bottom: 1px solid rgba(184, 149, 58, 0.18);
}

.tl2-news-list li:last-child {
  border-bottom: 0;
}

.tl2-news-list a {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #fff6e4;
  transition: color 0.2s ease;
}

.tl2-news-list a:hover {
  color: #ffe9a8;
}

.tl2-news-list time {
  flex-shrink: 0;
  font-size: 0.82rem;
  color: #ffb4a8;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.tl2-more {
  display: inline-flex;
  margin-top: 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffe9a8;
  border-bottom: 1px solid #f0d78c;
  padding-bottom: 0.15rem;
}

.tl2-more:hover {
  color: #fff;
}

/* —— Features —— */
.tl2-features {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: stretch;
}

.tl2-feature-stage {
  border: 1px solid var(--line);
  background: #000;
  overflow: hidden;
  min-height: 280px;
}

.tl2-feature-stage img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.tl2-feature-rail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  align-content: start;
}

.tl2-feature-rail button {
  appearance: none;
  border: 1px solid rgba(240, 215, 140, 0.35);
  background: rgba(8, 6, 4, 0.45);
  padding: 0;
  cursor: pointer;
  opacity: 0.92;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.tl2-feature-rail button.is-active,
.tl2-feature-rail button:hover {
  opacity: 1;
  border-color: #f0d78c;
  box-shadow: 0 0 0 1px rgba(240, 215, 140, 0.35);
  transform: translateY(-1px);
}

.tl2-feature-rail img {
  width: 100%;
}

/* —— Community —— */
.tl2-community {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.tl2-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* —— Footer —— */
.tl2-footer {
  padding: 2.5rem 4vw 3rem;
  text-align: center;
  border-top: 1px solid var(--line);
  background: #050403;
}

.tl2-footer strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 0.45rem;
  letter-spacing: 0.06em;
}

.tl2-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--paper-dim);
  line-height: 1.55;
}

/* —— Float dock —— */
.tl2-dock {
  position: fixed;
  right: 1rem;
  bottom: 1.2rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.tl2-dock.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.tl2-dock a,
.tl2-dock button {
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid #f0d78c;
  background: rgba(8, 6, 4, 0.92);
  color: #fff6e4;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.tl2-dock a:hover,
.tl2-dock button:hover {
  background: #b42822;
  color: #fff;
  border-color: #ffe9a8;
}

/* —— Motion —— */
@keyframes tl2-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tl2-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes tl2-pulse {
  0%, 100% { opacity: 0.25; transform: translateX(-50%) scaleY(0.85); }
  50% { opacity: 1; transform: translateX(-50%) scaleY(1); }
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .tl2-news-grid,
  .tl2-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tl2-nav-toggle {
    display: inline-flex;
  }

  .tl2-menu {
    position: fixed;
    inset: 3.6rem 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(12, 9, 6, 0.97);
    border-bottom: 1px solid var(--line);
  }

  .tl2-menu.is-open {
    display: flex;
  }

  .tl2-menu > li > a,
  .tl2-drop > summary {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(184, 149, 58, 0.15);
  }

  .tl2-drop-panel {
    position: static;
    border: 0;
    background: transparent;
    padding: 0 0 0.5rem 0.75rem;
  }

  .tl2-hero-content {
    padding-bottom: 9vh;
  }

  .tl2-section {
    padding: 3.5rem 5vw;
  }

  .tl2-scroll-hint {
    display: none;
  }
}
