@charset "UTF-8";

:root {
  --gold-light: #fef0a5;
  --gold: #d4af37;
  --gold-deep: #b38728;
  --gold-dark: #845d13;
  --crimson: #c8102e;
  --crimson-glow: #ff2a4b;
  --crimson-dark: #7a0013;
  --navy-dark: #0a1118;
  --wood-dark: #120e0d;
  --wood-panel: #1e1816;
  --ink-bg: #06090e;
  --text-cream: #faecd8;
  --text-muted: #a39585;
  --border-gold: rgba(212, 175, 55, 0.45);
  --border-gold-glow: rgba(254, 240, 165, 0.8);
  --font-title: 'Playfair Display', 'Cinzel', serif;
  --font-body: 'Be Vietnam Pro', sans-serif;
  --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.35);
  --shadow-red: 0 0 25px rgba(200, 16, 46, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--ink-bg);
  color: var(--text-cream);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--text-cream);
  text-decoration: none;
  transition: all 0.25s ease;
}

a:hover {
  color: var(--gold-light);
  text-shadow: 0 0 8px rgba(254, 240, 165, 0.8);
}

ul {
  list-style: none;
}

/* ===== TOP NAVIGATION BAR (SINGLE HORIZONTAL ROW STRICT) ===== */
.topbar, header.top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 68px;
  background: linear-gradient(180deg, rgba(14, 11, 10, 0.98) 0%, rgba(20, 15, 13, 0.94) 80%, rgba(10, 8, 7, 0.85) 100%);
  border-bottom: 2px solid var(--gold-deep);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.85);
  z-index: 1000;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
}

.topbar-inner, header.top .wrap {
  width: 100%;
  max-width: 1600px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  white-space: nowrap !important;
  position: relative;
}

/* 18+ Badge */
.badge-18 {
  position: absolute;
  left: 20px;
  top: 85px;
  z-index: 99;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.8));
}
.badge-18 img {
  height: 52px;
  display: block;
}

/* Navigation Links (Single Row) */
.nav-menu, nav.main {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  flex: 1;
  gap: 12px;
  overflow-x: visible;
}

.nav-link, nav.main a {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #dfd2c0;
  padding: 6px 10px;
  position: relative;
  transition: all 0.3s;
  white-space: nowrap !important;
  display: inline-block;
}

.nav-link:hover, .nav-link.active, nav.main a:hover, nav.main a.active {
  color: var(--gold-light);
  text-shadow: 0 0 10px var(--gold);
}

.nav-link.active::after, nav.main a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

.nav-sep {
  color: var(--gold-dark);
  font-size: 13px;
  opacity: 0.7;
  user-select: none;
}

/* Protruding 3D Center Logo */
.center-logo {
  position: relative;
  top: 14px;
  margin: 0 12px;
  z-index: 1001;
  display: inline-block;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.center-logo:hover {
  transform: scale(1.05);
}

.center-logo img {
  height: 95px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
  display: block;
}

/* Brand logo for subpages if used */
.topbar .brand, header.top .brand, a.brand {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: var(--gold-light);
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px;
  letter-spacing: 1px;
  white-space: nowrap !important;
  margin-right: 20px;
}

.topbar .brand .sub-title, header.top .brand .sub-title, a.brand .sub-title {
  display: none; /* Hide subtitle to keep header on 1 clean straight line */
}

/* Topbar Right (Search & User Status) */
.topbar-right, .userbox {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 12px;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  background: #fdfbf7;
  border: 1px solid var(--gold-deep);
  border-radius: 4px;
  padding: 3px 8px;
  height: 32px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: #333;
  width: 120px;
  font-family: var(--font-body);
}

.search-box button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gold-deep);
  font-size: 14px;
}

.auth-nav-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-nav-login {
  background: linear-gradient(180deg, #9b111e 0%, #63050c 100%);
  border: 1px solid var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-nav-login:hover {
  background: linear-gradient(180deg, #c8102e 0%, #8b0817 100%);
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.8);
  color: #fff;
}

.nav-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  white-space: nowrap;
}

/* Floating Library Widget */
.floating-lib {
  position: fixed;
  right: 15px;
  bottom: 30px;
  z-index: 999;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.floating-lib:hover {
  transform: translateY(-6px) scale(1.04);
}
.floating-lib img {
  height: 75px;
  filter: drop-shadow(0 6px 15px rgba(0,0,0,0.8));
}

/* ===== HERO SECTION ===== */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 948px;
  background: url('/assets/img/ui/hero-section.png') top center no-repeat;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 70px;
}

.hero-actions-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.hero-sub-badge {
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 15px rgba(0,0,0,0.8));
}
.hero-sub-badge img {
  height: 48px;
}

/* Action Matrix */
.action-matrix {
  display: grid;
  grid-template-columns: 180px 220px 180px;
  gap: 12px;
  align-items: center;
  background: rgba(10, 8, 7, 0.75);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-gold);
  box-shadow: 0 8px 30px rgba(0,0,0,0.9);
}

.action-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Side Buttons */
.btn-side {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  background: linear-gradient(180deg, #382c23 0%, #201813 100%);
  border: 1px solid var(--gold);
  color: var(--text-cream);
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 2px 6px rgba(0,0,0,0.5);
}

.btn-side:hover {
  background: linear-gradient(180deg, #594537 0%, #362920 100%);
  border-color: var(--gold-light);
  color: var(--gold-light);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
  transform: translateY(-2px);
}

.btn-side.gold-btn {
  background: linear-gradient(180deg, #8a6a1a 0%, #57410b 100%);
  border-color: #ffd966;
  color: #fff6d9;
}

.btn-side.gold-btn:hover {
  background: linear-gradient(180deg, #b88d22 0%, #75570f 100%);
  box-shadow: 0 0 15px rgba(255, 217, 102, 0.8);
}

/* Center Giant CHƠI NGAY Button */
.btn-play-center {
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #e60026 0%, #990014 70%, #5e000c 100%);
  border: 2px solid #ffd700;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(230, 0, 38, 0.8), inset 0 0 15px rgba(255, 215, 0, 0.5);
  animation: pulse-red 2s infinite alternate;
  transition: all 0.3s;
}

.btn-play-center:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px rgba(255, 42, 75, 1), inset 0 0 25px rgba(255, 240, 165, 0.8);
}

.btn-play-center span {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px #000, 0 0 12px #ffd700;
  line-height: 1.1;
}

.btn-play-center small {
  font-size: 11px;
  color: var(--gold-light);
  letter-spacing: 1px;
  text-transform: uppercase;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 15px rgba(200, 16, 46, 0.6); }
  100% { box-shadow: 0 0 30px rgba(255, 42, 75, 0.95), 0 0 15px rgba(212, 175, 55, 0.8); }
}

/* ===== GENERAL SECTION LAYOUT & TITLES ===== */
.section-wrapper {
  position: relative;
  width: 100%;
  min-height: 948px;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 20px 60px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.section-title-ink {
  font-family: var(--font-title);
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #ffffff 0%, #e0ceb2 40%, #c49a45 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9));
  margin-bottom: 8px;
}

.section-subtitle-ribbon {
  display: inline-block;
  background: linear-gradient(90deg, transparent 0%, #152238 25%, #1c2e4a 50%, #152238 75%, transparent 100%);
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  padding: 4px 45px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-light);
  text-transform: uppercase;
  text-shadow: 0 0 8px var(--gold);
}

/* ===== SECTION 1: TRUNG TÂM TIN TỨC ===== */
.sec-news {
  background-image: url('../img/ui/news_bg.jpg');
}

.news-scroll-container {
  width: 100%;
  max-width: 1200px;
  min-height: 480px;
  background: rgba(14, 18, 28, 0.88);
  border: 2px solid var(--gold-deep);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), inset 0 0 30px rgba(0, 0, 0, 0.7);
  display: grid;
  grid-template-columns: 550px 1fr;
  overflow: hidden;
  position: relative;
}

.news-scroll-container::before, .news-scroll-container::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  background: linear-gradient(90deg, #48351c, #8c6d3b, #48351c);
  z-index: 5;
}
.news-scroll-container::before { left: 0; border-right: 1px solid #1a140d; }
.news-scroll-container::after { right: 0; border-left: 1px solid #1a140d; }

.news-carousel {
  position: relative;
  padding: 20px 25px 20px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-slide-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border: 1px solid var(--gold-dark);
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.7);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
}

.dot-dragon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: #1e2638;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--gold);
  transition: all 0.25s;
}

.dot-dragon.active, .dot-dragon:hover {
  background: var(--gold);
  color: #000;
  box-shadow: 0 0 10px var(--gold-light);
}

.news-content-panel {
  padding: 20px 30px 20px 20px;
  display: flex;
  flex-direction: column;
}

.news-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid var(--gold-dark);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.news-tab-btn {
  background: #172033;
  border: 1px solid #2d3c59;
  color: #b0c0db;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: all 0.25s;
}

.news-tab-btn.active, .news-tab-btn:hover {
  background: linear-gradient(180deg, #d4af37 0%, #997819 100%);
  color: #0d121d;
  border-color: #fef0a5;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid transparent;
  border-radius: 2px;
  transition: all 0.2s;
}

.news-item:hover {
  background: rgba(212, 175, 55, 0.08);
  border-left-color: var(--gold);
  transform: translateX(4px);
}

.news-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.badge-hot {
  background: linear-gradient(180deg, #ff4444 0%, #b30000 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #ff9999;
}

.news-item-title {
  color: #e6ded3;
  font-weight: 500;
}

.news-item:hover .news-item-title {
  color: var(--gold-light);
}

.news-item-date {
  font-size: 12px;
  color: #8391a8;
}

.server-highlight-bar {
  margin-top: 15px;
  background: linear-gradient(90deg, #1e3354 0%, #2f5080 50%, #1e3354 100%);
  border: 1px solid var(--gold);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 4px;
  color: var(--gold-light);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
}

.news-banners-grid {
  width: 100%;
  max-width: 1200px;
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.action-banner-card {
  border: 2px solid var(--gold-dark);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

.action-banner-card:hover {
  border-color: var(--gold-light);
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
}

.action-banner-card img {
  width: 100%;
  display: block;
}

/* ===== SECTION 2: HỆ THá»NG NHÂN VẬT ===== */
.sec-characters {
  background-image: url('../img/ui/char_bg.jpg');
}

.char-stage-container {
  width: 100%;
  max-width: 1280px;
  min-height: 600px;
  display: grid;
  grid-template-columns: 360px 1fr 340px;
  gap: 25px;
  align-items: center;
}

.char-bio-box {
  background: rgba(10, 14, 22, 0.85);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.8);
}

.char-title-name {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 900;
  color: var(--gold-light);
  text-shadow: 0 2px 10px rgba(0,0,0,0.9);
  margin-bottom: 6px;
}

.char-country-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.tag-nguy { background: #5c2079; border: 1px solid #b366db; color: #fff; }
.tag-thuc { background: #1c6b38; border: 1px solid #5cdb88; color: #fff; }
.tag-ngo { background: #8b1c1c; border: 1px solid #db5c5c; color: #fff; }
.tag-quan { background: #8a6a1a; border: 1px solid #ffd966; color: #fff; }

.char-bio-desc {
  font-size: 14px;
  color: #cfd7e6;
  line-height: 1.7;
}

.char-skill-scroll {
  background: rgba(18, 22, 32, 0.92);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 35px rgba(0,0,0,0.8);
}

.skill-scroll-header {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  color: var(--gold-light);
  border-bottom: 1px solid var(--gold-dark);
  padding-bottom: 8px;
  margin-bottom: 15px;
}

.skill-preview-box {
  width: 100%;
  height: 220px;
  background: #000;
  border: 1px solid var(--gold-dark);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  position: relative;
}

.skill-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skill-info-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}

.skill-info-desc {
  font-size: 13px;
  color: #d1dbec;
}

.kingdom-group-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kingdom-tab-card {
  background: rgba(14, 18, 28, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.25s;
}

.kingdom-tab-card:hover, .kingdom-tab-card.active {
  border-color: var(--gold-light);
  background: rgba(212, 175, 55, 0.15);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  transform: translateX(-4px);
}

.kingdom-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.general-avatar-row {
  display: flex;
  gap: 10px;
}

.gen-thumb {
  background: #111;
  border: 1px solid var(--gold-dark);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #c9d5e8;
  cursor: pointer;
  transition: all 0.2s;
}

.gen-thumb:hover, .gen-thumb.active {
  background: var(--gold);
  color: #000;
  border-color: #fff;
  box-shadow: 0 0 10px var(--gold);
}

/* ===== SECTION 3: TÀNG THƯ BINH PHÃP ===== */
.sec-books {
  background-image: url('../img/ui/book_bg.jpg');
}

.books-grid-layout {
  width: 100%;
  max-width: 1200px;
  min-height: 520px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 220px 260px;
  margin-top: 40px;
  position: relative;
}

.book-silk-badge {
  background: rgba(18, 14, 12, 0.88);
  border: 2px solid var(--gold);
  border-radius: 30px 8px 30px 8px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.8);
  cursor: pointer;
  transition: all 0.3s;
}

.book-silk-badge:hover {
  border-color: var(--gold-light);
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.4);
}

.book-badge-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #75570f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  border: 1px solid #ffd966;
  flex-shrink: 0;
}

.book-badge-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.book-badge-desc {
  font-size: 12px;
  color: #cfc2b2;
}

/* ===== SECTION 4: TÃNH NĂNG Äáº¶C SẮC ===== */
.sec-features {
  background-image: url('../img/ui/feat_bg.jpg');
}

.features-showcase-box {
  width: 100%;
  max-width: 1200px;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.social-buttons-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.social-crest-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.social-crest-btn:hover {
  transform: translateY(-8px) scale(1.08);
}

.social-crest-btn img {
  height: 95px;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.8));
}

/* ===== SUBPAGES LAYOUT & COMPONENTS ===== */
.subpage-wrapper, .main-content {
  padding-top: 90px;
  padding-bottom: 60px;
  flex: 1;
  width: 100%;
}

.subpage-container, .wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.panel {
  background: rgba(16, 20, 30, 0.92);
  border: 2px solid var(--border-gold);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.85);
  margin-bottom: 30px;
  position: relative;
}

.panel.ornate {
  border-color: var(--gold);
  box-shadow: 0 12px 45px rgba(0,0,0,0.9), 0 0 20px rgba(212, 175, 55, 0.25);
}

.panel h2, .panel-title {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 800;
  color: var(--gold-light);
  border-bottom: 2px solid var(--gold-dark);
  padding-bottom: 12px;
  margin-bottom: 24px;
  text-align: center;
  letter-spacing: 1px;
}

/* Subpage Form Styles */
.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #cfd8e8;
  margin-bottom: 6px;
}

.field input, .field select, .field textarea {
  width: 100%;
  height: 44px;
  background: #080c14;
  border: 1px solid #2d3b54;
  border-radius: 4px;
  padding: 0 14px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.field textarea {
  height: 100px;
  padding: 10px 14px;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #d4af37 0%, #8c6d19 100%);
  border: 1px solid #fef0a5;
  color: #000;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.btn:hover {
  background: linear-gradient(180deg, #fef0a5 0%, #b88d22 100%);
  box-shadow: 0 0 15px rgba(254, 240, 165, 0.8);
  transform: translateY(-2px);
}

.btn.big {
  height: 48px;
  font-size: 16px;
  letter-spacing: 1px;
}

.btn.red {
  background: linear-gradient(180deg, #c8102e 0%, #7a0013 100%);
  border-color: #ff9999;
  color: #fff;
}

.btn.red:hover {
  background: linear-gradient(180deg, #ff2a4b 0%, #a8001a 100%);
  box-shadow: 0 0 20px rgba(200, 16, 46, 0.8);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--gold);
  color: var(--gold-light);
}

.btn.ghost:hover {
  background: rgba(212, 175, 55, 0.15);
}

.btn.google {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
  font-family: var(--font-body);
  font-weight: 600;
  margin-top: 10px;
}

.btn.google:hover {
  background: #f1f1f1;
}

.divider {
  text-align: center;
  margin: 20px 0;
  font-size: 12px;
  color: #7b889e;
  position: relative;
}

.divider::before, .divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 32%;
  height: 1px;
  background: #2d3b54;
}
.divider::before { left: 0; }
.divider::after { right: 0; }

.formmsg {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 15px;
  display: none;
}
.formmsg.err {
  background: rgba(200, 16, 46, 0.2);
  border: 1px solid #ff4444;
  color: #ff9999;
  display: block;
}
.formmsg.ok {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  color: #86efac;
  display: block;
}

/* Subpage Tables */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

table.data-table th {
  background: #141c2c;
  color: var(--gold-light);
  font-family: var(--font-title);
  font-size: 13px;
  padding: 12px;
  border-bottom: 2px solid var(--gold);
  text-align: left;
}

table.data-table td {
  padding: 12px;
  border-bottom: 1px solid #1c263b;
  font-size: 13px;
}

table.data-table tr:hover td {
  background: rgba(212, 175, 55, 0.05);
}

/* ===== FOOTER ===== */
footer {
  background: #07090d;
  border-top: 2px solid var(--gold-dark);
  padding: 45px 20px 35px;
  color: #7b889e;
  font-size: 13px;
  text-align: center;
  position: relative;
  margin-top: auto;
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin-bottom: 20px;
}

.badge-approved {
  background: #e60026;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.footer-brand {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 900;
  color: #d1d8e6;
  letter-spacing: 2px;
}

.footer-legal-text {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ===== MODALS ===== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(6px);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  width: 90%;
  max-width: 480px;
  background: linear-gradient(180deg, #1a2030 0%, #0d121c 100%);
  border: 2px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.9), 0 0 25px rgba(212, 175, 55, 0.3);
  padding: 30px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.modal-backdrop.active .modal-box {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  color: var(--gold);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-title {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--gold-dark);
  padding-bottom: 10px;
}

/* Toast */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #182236;
  border: 1px solid var(--gold);
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.8);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  z-index: 10000;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== GENERAL SUBPAGE ATMOSPHERE & LAYOUT ===== */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.main-content {
  flex: 1;
  width: 100%;
  padding-top: 105px;
  padding-bottom: 70px;
  background: radial-gradient(circle at 50% 25%, rgba(10, 17, 24, 0.45) 0%, rgba(6, 9, 14, 0.94) 85%), url('/assets/img/ui/hero-section.png') top center no-repeat;
  background-size: cover;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  position: relative;
}

/* ===== IN-GAME MODAL / SERVER CHOOSER SYSTEM (MATCHING IN-GAME POPUP) ===== */
.game-dialog-wrapper {
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.95)) drop-shadow(0 0 20px rgba(212, 175, 55, 0.3));
  position: relative;
  z-index: 10;
}

.game-dialog-header {
  position: relative;
  min-height: 76px;
  width: 100%;
  padding: 10px 18px;
  background: url('../img/game_ui/dialog_header.png') center top no-repeat;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-dialog-title {
  font-family: var(--font-title);
  font-size: 21px;
  font-weight: 800;
  color: #fff9e6;
  letter-spacing: 2px;
  line-height: 1.25;
  text-wrap: balance;
  text-align: center;
  text-shadow: 0 2px 5px #000, 0 0 10px #70dbb8, 0 0 20px rgba(212, 175, 55, 0.6);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-dialog-body {
  background-color: #e9d7b7;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% -20%, rgba(255, 248, 224, 0.85) 0%, rgba(255, 248, 224, 0) 55%),
    radial-gradient(ellipse at 50% 120%, rgba(122, 86, 32, 0.28) 0%, rgba(122, 86, 32, 0) 60%),
    linear-gradient(180deg, #f2e4c9 0%, #e9d7b7 50%, #dfcaa5 100%);
  border: 2px solid #5a3d0b;
  border-top: none;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  padding: 26px 32px 32px;
  position: relative;
  color: #3d2b15;
  box-shadow: inset 0 0 45px rgba(110, 78, 20, 0.28), inset 0 0 0 1px #d6ba75;
}

.game-dialog-subtitle {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #523c1d;
  margin-bottom: 22px;
  letter-spacing: 0.5px;
}

.game-dialog-divider {
  height: 20px;
  width: 100%;
  background: url('../img/game_ui/dialog_divider.png') center no-repeat;
  background-size: contain;
  margin: 20px 0 16px;
}

/* Authentic Buttons from In-game */
.btn-game-gold {
  background: url('../img/game_ui/btn_gold.png') center no-repeat;
  background-size: 100% 100%;
  height: 48px;
  min-width: 145px;
  padding: 0 20px;
  border: none;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 900;
  color: #fff9e6;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px #422904, 0 0 8px #ffe699;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28), filter 0.2s ease;
  user-select: none;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-game-gold:hover {
  transform: scale(1.04);
  filter: brightness(1.12) drop-shadow(0 0 10px rgba(254, 240, 165, 0.85));
  color: #fff9e6;
}

.btn-game-gold:active {
  transform: scale(0.98);
}

.btn-game-green {
  background: url('../img/game_ui/btn_green.png') center no-repeat;
  background-size: 100% 100%;
  height: 48px;
  min-width: 145px;
  padding: 0 20px;
  border: none;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 900;
  color: #e9fbf2;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px #072a18, 0 0 8px #7bf5b7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28), filter 0.2s ease;
  user-select: none;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-game-green:hover {
  transform: scale(1.04);
  filter: brightness(1.12) drop-shadow(0 0 10px rgba(56, 158, 104, 0.85));
  color: #e9fbf2;
}

.btn-game-green:active {
  transform: scale(0.98);
}

/* Server Card */
.game-server-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(20, 36, 52, 0.95) 0%, rgba(13, 25, 38, 0.98) 100%);
  border: 2px solid #84672e;
  border-radius: 6px;
  padding: 14px 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6), inset 0 0 18px rgba(212, 175, 55, 0.18);
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.game-server-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transform: skewX(-25deg);
  transition: left 0.6s ease;
}

.game-server-card:hover {
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.8), 0 0 18px rgba(212, 175, 55, 0.5);
}

.game-server-card:hover::before {
  left: 140%;
}

.server-info-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.server-flag-icon {
  font-size: 24px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.server-title-text {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 0.8px;
}

.server-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.server-badge.open {
  background: linear-gradient(180deg, #1e7a3d 0%, #115026 100%);
  border: 1px solid #34c759;
  color: #fff;
  box-shadow: 0 0 8px rgba(52, 199, 89, 0.4);
}

.server-badge.maint {
  background: linear-gradient(180deg, #a61c1c 0%, #6e0c0c 100%);
  border: 1px solid #ff453a;
  color: #fff;
  box-shadow: 0 0 8px rgba(255, 69, 58, 0.4);
}

.server-badge.new {
  background: linear-gradient(180deg, #d4a340 0%, #8c6014 100%);
  border: 1px solid #ffd700;
  color: #fff;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  margin-left: 6px;
}

.server-char-meta {
  font-size: 13px;
  color: #cbd5e1;
  margin-top: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.server-char-meta b {
  color: #ffd700;
}

/* ===== GENERAL FORM & ORNATE PANELS (LOGIN, REGISTER, ACCOUNT) ===== */
.panel.ornate {
  background: linear-gradient(180deg, rgba(22, 29, 44, 0.95) 0%, rgba(13, 18, 28, 0.98) 100%);
  border: 2px solid var(--border-gold);
  border-radius: 8px;
  padding: 32px 30px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.9), 0 0 25px rgba(212, 175, 55, 0.25);
  backdrop-filter: blur(8px);
}

.panel.ornate h2 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 22px;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  padding-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
  text-align: left;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

.field input, .field select {
  background: #090e17;
  border: 1px solid #4a3819;
  border-radius: 4px;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: all 0.25s;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
}

.field input:focus, .field select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4), inset 0 2px 6px rgba(0,0,0,0.6);
}

.formmsg {
  font-size: 13px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 4px;
  display: none;
}

.formmsg.err {
  display: block;
  background: rgba(183, 28, 28, 0.25);
  border: 1px solid #b71c1c;
  color: #ff8a80;
}

.formmsg.ok {
  display: block;
  background: rgba(27, 94, 32, 0.25);
  border: 1px solid #1b5e20;
  color: #a5d6a7;
}

.btn {
  background: linear-gradient(180deg, #d4a340 0%, #8c6014 100%);
  border: 1px solid #ffd700;
  color: #fff;
  font-family: var(--font-title);
  font-weight: 800;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  background: linear-gradient(180deg, #f0be52 0%, #b88628 100%);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
  transform: translateY(-1px);
}

.btn.big {
  height: 48px;
  font-size: 16px;
  letter-spacing: 1px;
}

.btn.google {
  background: #ffffff;
  border: 1px solid #ddd;
  color: #3c4043;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.btn.google:hover {
  background: #f8f9fa;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin: 20px 0;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.divider:not(:empty)::before {
  margin-right: 15px;
}

.divider:not(:empty)::after {
  margin-left: 15px;
}

/* Footer styling */
footer {
  width: 100%;
  background: #07090e;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  padding: 30px 0;
  text-align: center;
  color: #8f9bb3;
  font-size: 13px;
}

/* ===== SERVER CHOOSER PAGE COMPONENTS ===== */
.server-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.server-list-msg {
  text-align: center;
  color: #7a5828;
  font-weight: 600;
  padding: 20px 0;
}

.server-list-msg.err {
  color: #8c1414;
}

.dialog-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: #5c4322;
}

.dialog-footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dialog-status-text {
  font-weight: 600;
}

.dialog-status-text a {
  color: #8c6014;
  font-weight: 700;
  text-decoration: underline;
}

.dialog-status-text b {
  color: #b37d14;
}

/* ===== GAME ENTRY SPLASH (vao-game) ===== */
.splash-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(rgba(6, 9, 14, 0.72) 0%, rgba(6, 9, 14, 0.85) 100%),
    url('/assets/img/ui/bg-header.jpg') center center / cover no-repeat fixed;
}

.splash-card {
  width: 100%;
  max-width: 460px;
  text-align: center;
  background: linear-gradient(180deg, rgba(20, 15, 12, 0.92) 0%, rgba(10, 8, 6, 0.96) 100%);
  border: 2px solid var(--gold-deep);
  border-radius: 10px;
  padding: 42px 34px 38px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(254, 240, 165, 0.25);
  animation: splash-in 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

@keyframes splash-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-logo img {
  height: 108px;
  display: block;
  margin: 0 auto 14px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 18px rgba(212, 175, 55, 0.45));
  animation: splash-float 3s ease-in-out infinite;
}

@keyframes splash-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.splash-title {
  font-family: var(--font-title);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 3px;
  background: linear-gradient(180deg, #ffffff 0%, #e0ceb2 40%, #c49a45 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.9));
  margin-bottom: 6px;
}

.splash-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.splash-progress {
  height: 10px;
  border: 1px solid var(--gold-deep);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  margin-bottom: 26px;
}

.splash-progress i {
  display: block;
  height: 100%;
  width: 38%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
  box-shadow: 0 0 12px rgba(254, 240, 165, 0.8);
  animation: splash-load 1.3s ease-in-out infinite;
}

@keyframes splash-load {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(300%); }
}

.splash-hint {
  margin-top: 16px;
  font-size: 12px;
  color: #6d6255;
}

.splash-hint a {
  color: var(--gold);
  font-weight: 700;
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */
@media (max-width: 1200px) {
  .news-scroll-container { grid-template-columns: 1fr; }
  .news-banners-grid { grid-template-columns: repeat(2, 1fr); }
  .char-stage-container { grid-template-columns: 1fr; }
  .books-grid-layout { gap: 40px; grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .nav-menu, nav.main {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-menu::-webkit-scrollbar, nav.main::-webkit-scrollbar {
    display: none;
  }
  .center-logo { display: none; }
  .action-matrix { grid-template-columns: 1fr; }
  .social-buttons-row { flex-wrap: wrap; }
  .game-dialog-body { padding: 18px 16px 24px; }
  .game-server-card { flex-direction: column; gap: 14px; align-items: flex-start; }
  .btn-game-gold { width: 100%; }
  .dialog-footer-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .dialog-footer-actions { justify-content: center; }
}

@media (max-width: 560px) {
  .game-dialog-title { font-size: 15px; letter-spacing: 1px; }
  .game-dialog-header { min-height: 64px; padding: 8px 12px; }
  .server-title-text { font-size: 16px; }
  .splash-card { padding: 32px 20px 28px; }
  .splash-title { font-size: 24px; letter-spacing: 2px; }
}

/* ==========================================================================
   🏛️ LUXURY SUBPAGES & AUTH LAYOUT (DESKTOP & MOBILE)
   ========================================================================== */
.main-content {
  min-height: calc(100vh - 66px);
  padding: 105px 20px 60px;
  background: radial-gradient(circle at 50% 30%, rgba(20, 28, 45, 0.7) 0%, rgba(6, 9, 14, 0.95) 100%),
              url('/assets/img/ui/hero-section.png') no-repeat center top / cover fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.panel {
  background: linear-gradient(135deg, rgba(16, 22, 34, 0.95) 0%, rgba(9, 13, 21, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(212, 175, 55, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 36px 32px;
  position: relative;
}

.panel.ornate {
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(212, 175, 55, 0.2);
}

.panel.ornate::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #d4af37 30%, #fef0a5 50%, #d4af37 70%, transparent 100%);
  border-radius: 12px 12px 0 0;
}

.panel h2 {
  font-family: var(--font-title, 'Cinzel', serif);
  font-size: 24px;
  font-weight: 800;
  color: #fef0a5;
  text-align: center;
  letter-spacing: 1.5px;
  margin-bottom: 24px;
  text-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
}

.field {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: #dfd2c0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.field input, .field select, .field textarea {
  width: 100%;
  background: rgba(6, 9, 14, 0.85);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  padding: 13px 16px;
  color: #ffffff;
  font-family: var(--font-body, 'Be Vietnam Pro', sans-serif);
  font-size: 15px;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #fef0a5;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4), inset 0 2px 6px rgba(0, 0, 0, 0.8);
  background: rgba(10, 15, 24, 0.95);
}

.field input::placeholder {
  color: rgba(223, 210, 192, 0.4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title, 'Cinzel', serif);
  font-weight: 700;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn.big {
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  background: linear-gradient(135deg, #c8102e 0%, #900a1f 100%);
  border: 1.5px solid rgba(254, 240, 165, 0.6);
  box-shadow: 0 6px 20px rgba(200, 16, 46, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
}

.btn.big:hover {
  background: linear-gradient(135deg, #e01535 0%, #a80c25 100%);
  box-shadow: 0 8px 25px rgba(200, 16, 46, 0.65), 0 0 15px rgba(254, 240, 165, 0.4);
  transform: translateY(-1px);
}

.btn.google {
  background: #ffffff;
  color: #3c4043;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #dadce0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  gap: 12px;
}

.btn.google:hover {
  background: #f8f9fa;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: rgba(223, 210, 192, 0.5);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 20px 0;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.divider::before { margin-right: 12px; }
.divider::after { margin-left: 12px; }

.formmsg {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  text-align: center;
}

.formmsg.err {
  background: rgba(200, 16, 46, 0.2);
  border: 1px solid rgba(200, 16, 46, 0.5);
  color: #ff8595;
}

.formmsg.ok {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid rgba(40, 167, 69, 0.5);
  color: #69f0ae;
}

footer {
  background: #070a0f;
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  padding: 30px 20px;
  text-align: center;
  color: #a39585;
  font-size: 13px;
}

.footer-brand {
  font-family: var(--font-title, 'Cinzel', serif);
  font-size: 16px;
  font-weight: 800;
  color: #d4af37;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

/* ===== RESPONSIVE SECONDARY PAGES =====
   Shared guardrails for server selection, auth, account, top-up and admin. */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; }
body { min-width: 0; }
img, svg, video, canvas { max-width: 100%; }
.wrap, .main-content, .game-dialog-wrapper, .panel,
.snav-inner, .snav-group, .topbar-inner, .topbar-right, .auth-nav-box { min-width: 0; }
.snav a { white-space: nowrap; }
.main-content .grid { display: grid; }
.main-content .tbl { width: 100%; border-collapse: collapse; }
.main-content .tbl th,
.main-content .tbl td { padding: 10px 8px; border-bottom: 1px solid rgba(212, 175, 55, 0.18); text-align: left; }
.main-content .tbl th { color: var(--gold-light); font-family: var(--font-title); font-size: 12px; }

@media (max-width: 960px) {
  .topbar-inner { min-width: 0; padding-inline: 12px; }
  .nav-menu, nav.main { min-width: 0; justify-content: flex-start !important; }
  .topbar-right, .userbox { max-width: 42%; min-width: 0; overflow: hidden; gap: 6px; }
  .auth-nav-box { min-width: 0; overflow: hidden; }
  .nav-user-name { display: block; max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 700px) {
  .hero-section,
  .main-content {
    background-image: url('/assets/img/ui/hero-section.png');
    background-position: top center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: scroll;
  }

  .snav + .main-content,
  .main-content {
    padding: 76px 0 44px !important;
    min-height: calc(100dvh - 120px);
    justify-content: flex-start !important;
    background-attachment: scroll;
    overflow-x: hidden;
  }
  .main-content > .wrap,
  .main-content > .wrap[style] {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: 12px;
  }
  .main-content .panel,
  .main-content .game-dialog-wrapper {
    width: 100%;
    max-width: 100%;
  }
  .snav + .main-content > .wrap { padding-inline: 12px; }

  .panel { padding: 18px 14px; margin-bottom: 20px; }
  .panel.ornate { padding: 20px 14px; }
  .panel h2, .panel-title { font-size: 20px; line-height: 1.25; letter-spacing: .5px; }
  .field input, .field select, .field textarea { max-width: 100%; font-size: 16px; }
  .btn { max-width: 100%; }
  .formmsg { overflow-wrap: anywhere; }

  .game-dialog-wrapper { max-width: 100%; }
  .game-dialog-header { min-height: 64px; padding: 8px 10px; }
  .game-dialog-title { font-size: clamp(14px, 4.4vw, 18px); letter-spacing: .7px; gap: 6px; }
  .game-dialog-body { padding: 18px 12px 20px; }
  .game-dialog-subtitle { font-size: 13px; margin-bottom: 16px; }
  .game-server-card { width: 100%; padding: 12px; gap: 12px; }
  .server-info-left { width: 100%; min-width: 0; align-items: flex-start; gap: 10px; }
  .server-info-left > div:nth-child(2) { min-width: 0; flex: 1; }
  .server-title-text { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
  .server-char-meta { font-size: 12px; }
  .game-server-card > div:last-child { width: 100%; }
  .game-server-card .btn-game-gold,
  .game-server-card .btn-game-green { width: 100%; min-width: 0; }
  .dialog-footer-bar { gap: 14px; }
  .dialog-status-text { font-size: 13px; overflow-wrap: anywhere; }
  .dialog-footer-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dialog-footer-actions > * { width: 100%; min-width: 0; padding-inline: 8px; }

  /* Admin: the editor/list split and long tables become one readable column. */
  .main-content .grid { grid-template-columns: minmax(0, 1fr) !important; gap: 18px !important; }
  .main-content .grid > div { min-width: 0; }
  .main-content .tabs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .main-content .tabs button { width: 100%; min-width: 0; padding: 10px 12px; }
  #tab-news > .grid > div:first-child > div[style*="display:flex"] { flex-wrap: wrap; }
  #tab-news > .grid > div:first-child > div[style*="display:flex"] > .btn { flex: 1 1 140px; }
  .main-content .tbl { min-width: 640px; }
  .main-content h3 { overflow-wrap: anywhere; }

  /* Account character table stays scrollable inside its own box. */
  #chars-list-box { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
  #chars-list-box .data-table { min-width: 620px; }
  #packages-grid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)) !important; }

  .splash-screen { padding: 16px; background-attachment: scroll; }
  .splash-card { padding: 28px 18px 24px; }
  .splash-logo img { width: 96px; height: 96px; object-fit: cover; }
  .splash-title { font-size: clamp(20px, 7vw, 26px); overflow-wrap: anywhere; }
  footer { padding: 26px 12px 24px; }
  footer .wrap { padding-inline: 0; }
  .footer-brand { font-size: 18px; }
  .footer-legal-text { overflow-wrap: anywhere; }
}

@media (max-width: 480px) {
  .snav-group { gap: 6px 9px; }
  .snav a { font-size: 11px; }
  .main-content .wrap { padding-inline: 10px; }
  .panel, .panel.ornate { padding: 18px 12px; }
  .game-dialog-header { padding: 8px; }
  .game-dialog-body { padding-inline: 10px; }
  .dialog-footer-actions { grid-template-columns: minmax(0, 1fr); }
  .splash-card { padding: 24px 14px 22px; }
  .splash-logo img { width: 84px; height: 84px; }
}

.snav-user-dropdown::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 18px;
  background: transparent;
  display: block;
}
.snav-user-logged.open .snav-user-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}
.snav-user-logged.open .snav-caret {
  transform: rotate(180deg);
}

/* ==========================================================================
   UNIVERSAL HEADER, BURGER & MOBILE DRAWER THEME HARMONIZATION
   ========================================================================== */

/* Universal Burger Reset - prevents browser native button rendering */
.nl-burger, .menu-toggle {
  display: none;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  width: 44px;
  height: 44px;
  font-size: 24px;
  line-height: 1;
  color: var(--nl-ink, #171a20);
  -webkit-tap-highlight-color: transparent;
  align-items: center;
  justify-content: center;
}

@media (max-width: 920px) {
  .nl-burger, .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }
}

[data-theme="dark"] .nl-burger, [data-theme="dark"] .menu-toggle {
  color: #f2ebdc !important;
}
[data-theme="light"] .nl-burger, [data-theme="light"] .menu-toggle {
  color: #171a20 !important;
}

/* Universal Theme Toggle Button */
.nl-theme-toggle, #theme-toggle {
  background: transparent !important;
  border: 1px solid var(--nl-line, rgba(215, 184, 120, 0.3)) !important;
  border-radius: 50% !important;
  width: 38px;
  height: 38px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--nl-gold, #d7b878);
  padding: 0;
  transition: transform 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.nl-theme-toggle:hover, #theme-toggle:hover {
  transform: scale(1.08);
}
.nl-theme-toggle svg, #theme-toggle svg {
  display: block;
  pointer-events: none;
}
[data-theme="light"] .nl-theme-toggle, [data-theme="light"] #theme-toggle {
  border-color: rgba(20, 26, 36, 0.15) !important;
  color: #a97e2f !important;
}

/* Universal Header Theme */
[data-theme="dark"] header.nl-head {
  --nl-head-bg: #14100c;
  --nl-ink: #f2ebdc;
  --nl-body: #c3c7bb;
  --nl-gold: #d7b878;
  --nl-line: rgba(215, 184, 120, 0.22);
  background: rgba(20, 16, 12, 0.88) !important;
  border-color: rgba(215, 184, 120, 0.25) !important;
}
[data-theme="light"] header.nl-head {
  --nl-head-bg: #ffffff;
  --nl-ink: #171a20;
  --nl-body: #464c56;
  --nl-gold: #a97e2f;
  --nl-line: rgba(20, 26, 36, 0.14);
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(20, 26, 36, 0.12) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06) !important;
}

/* Universal Mobile Drawer */
.nl-drawer {
  display: none;
  padding: 12px 20px 18px;
  position: relative;
  z-index: 50;
  border-radius: 0 0 20px 20px;
}
.nl-drawer.open {
  display: block !important;
}
.nl-drawer a {
  display: block;
  padding: 12px 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

[data-theme="dark"] .nl-drawer {
  background: #14100c !important;
  border-bottom: 1px solid rgba(215, 184, 120, 0.22) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] .nl-drawer a {
  color: #c3c7bb !important;
  border-bottom: 1px solid rgba(215, 184, 120, 0.12) !important;
}
[data-theme="dark"] .nl-drawer a:hover, [data-theme="dark"] .nl-drawer a.active {
  color: #d7b878 !important;
}

[data-theme="light"] .nl-drawer {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(20, 26, 36, 0.12) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .nl-drawer a {
  color: #334155 !important;
  border-bottom: 1px solid #f1f5f9 !important;
}
[data-theme="light"] .nl-drawer a:hover, [data-theme="light"] .nl-drawer a.active {
  color: #a97e2f !important;
}

/* Mobile Userbox Card - Dark Mode */
[data-theme="dark"] .snav-mb-logged-card {
  background: #1a201c !important;
  border: 1px solid rgba(215, 184, 120, 0.25) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}
[data-theme="dark"] .snav-mb-name {
  color: #f2ebdc !important;
}
[data-theme="dark"] .snav-mb-role {
  color: #a5a99e !important;
}
[data-theme="dark"] .btn-mb-action {
  background: rgba(215, 184, 120, 0.12) !important;
  color: #d7b878 !important;
  border: 1px solid rgba(215, 184, 120, 0.3) !important;
}
[data-theme="dark"] .btn-mb-action.out {
  background: rgba(220, 38, 38, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
}

/* Mobile Userbox Card - Light Mode */
[data-theme="light"] .snav-mb-logged-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .snav-mb-name {
  color: #0f172a !important;
}
[data-theme="light"] .snav-mb-role {
  color: #64748b !important;
}
[data-theme="light"] .btn-mb-action {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}
[data-theme="light"] .btn-mb-action.out {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
}


/* =============================================================================
   DARK MODE — PANEL FORM NỔI RÕ KHỎI NỀN TRANG (auth, tài khoản, admin)
   ============================================================================= */
[data-theme="dark"] .panel,
[data-theme="dark"] .panel.ornate {
  background: linear-gradient(180deg, #1a2130 0%, #131a26 100%) !important;
  border: 1px solid rgba(215, 184, 120, 0.45) !important;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.6), 0 0 30px rgba(215, 184, 120, 0.08) !important;
}
[data-theme="dark"] .panel.ornate::before {
  background: linear-gradient(90deg, transparent 0%, #d4af37 30%, #fef0a5 50%, #d4af37 70%, transparent 100%) !important;
}
[data-theme="dark"] .field input,
[data-theme="dark"] .field select,
[data-theme="dark"] .field textarea {
  background: rgba(6, 9, 14, 0.6) !important;
  border-color: rgba(215, 184, 120, 0.28) !important;
  color: #f2ebdc !important;
}
