/* ==========================================================================
   MU REMASTER 100% - OFFICIAL GAMING PORTAL STYLESHEET
   Aesthetic: Dark Fantasy Gothic / Dragon Fire / Holy Archangel Gold
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg-dark: #07080c;
  --bg-card: rgba(16, 18, 27, 0.85);
  --bg-card-hover: rgba(24, 27, 40, 0.95);
  --gold-main: #ffd700;
  --gold-glow: #e6b800;
  --gold-dark: #98720b;
  --flame-red: #ff3344;
  --flame-crimson: #c01828;
  --flame-orange: #ff7700;
  --arcane-blue: #00f0ff;
  --arcane-purple: #9333ea;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-gold: rgba(255, 215, 0, 0.35);
  --border-glow: rgba(255, 119, 0, 0.4);
  --font-heading: 'Cinzel', 'Prompt', serif;
  --font-body: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-blur: blur(14px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

section {
  scroll-margin-top: 165px;
}

#game-arena {
  scroll-margin-top: 0 !important;
}

/* Arena Top Sensor for revealing navbar on top hover */
.arena-nav-sensor {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  z-index: 10001;
  pointer-events: auto;
  display: none;
}
body.arena-focused .arena-nav-sensor {
  display: block;
}

/* Background Embers & Particle Canvas */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

/* Global Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* Typography Utilities */
.gold-text {
  background: linear-gradient(135deg, #fff2a3 0%, #ffd700 50%, #e6a800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  text-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

.flame-text {
  background: linear-gradient(135deg, #ff7700 0%, #ff3344 50%, #e52b50 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  text-shadow: 0 0 25px rgba(255, 51, 68, 0.4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 20%,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 30%
  );
  transform: rotate(25deg) translateY(-100%);
  transition: transform 0.7s;
}

.btn:hover::after {
  transform: rotate(25deg) translateY(100%);
}

.btn-primary {
  background: linear-gradient(135deg, #ff8c00 0%, #ff3344 50%, #c01828 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 51, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 140, 0, 0.6);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 51, 68, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-gold {
  background: linear-gradient(135deg, #ffd700 0%, #d4af37 50%, #98720b 100%);
  color: #141722;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.8);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  color: #07080c;
}

.btn-outline {
  background: rgba(20, 23, 34, 0.65);
  border: 1px solid var(--border-gold);
  color: var(--gold-main);
  backdrop-filter: var(--glass-blur);
}

.btn-outline:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--gold-main);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.95rem 2.2rem;
  font-size: 1.1rem;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 78px;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(7, 8, 12, 0.88);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  transition: top 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* If broadcast-bar is hidden, but live-ticker is visible -> navbar moves to 40px */
.broadcast-bar.hidden ~ .navbar,
body.broadcast-closed .navbar {
  top: 40px !important;
}

/* If live-ticker is hidden, but broadcast-bar is visible -> navbar moves to 38px */
.live-ticker.hidden ~ .navbar,
body.ticker-closed .navbar {
  top: 38px !important;
}

/* If BOTH broadcast-bar and live-ticker are hidden -> navbar moves to 0 */
.broadcast-bar.hidden ~ .live-ticker.hidden ~ .navbar,
body.broadcast-closed .live-ticker.hidden ~ .navbar,
body.ticker-closed .broadcast-bar.hidden ~ .navbar,
body.broadcast-closed.ticker-closed .navbar {
  top: 0 !important;
}

/* ==========================================================================
   SMART ARENA NAVBAR DOCKING (Hides navbar when playing game to prevent overlap)
   ========================================================================== */
body.arena-focused .navbar,
body.arena-focused .broadcast-bar,
body.arena-focused .live-ticker {
  transform: translateY(-130%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease !important;
}

body.arena-focused.nav-revealed .navbar,
body.arena-focused.nav-revealed .broadcast-bar,
body.arena-focused.nav-revealed .live-ticker {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.navbar.scrolled {
  background: rgba(7, 8, 12, 0.98);
  border-bottom-color: rgba(255, 215, 0, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 75px;
  height: auto;
  padding: 4px 1.5rem;
}

/* Brand Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #ffd700, #ff3344);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.5rem;
  color: #07080c;
  box-shadow: 0 0 20px rgba(255, 51, 68, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.72rem;
  color: #cbd5e1;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Nav Links */
.nav-links,
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  flex-wrap: wrap;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
  margin: 0 0.5rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 0.22rem 0.35rem;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-main);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--flame-red), var(--gold-main));
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  margin-left: auto;
}

.bgm-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.bgm-btn.playing {
  color: var(--gold-main);
  border-color: var(--gold-main);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.server-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* Mobile Toggle Button */
.mobile-toggle {
  display: none;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid var(--border-gold);
  color: var(--gold-main);
  font-size: 1.4rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  padding: 0;
  line-height: 1;
}

.mobile-toggle:hover {
  background: rgba(255, 215, 0, 0.25);
  border-color: var(--gold-main);
  color: #fff;
}

/* Mobile Offcanvas Drawer */
@media (min-width: 993px) {
  .mobile-drawer,
  .drawer-backdrop {
    display: none !important;
  }
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: rgba(12, 14, 22, 0.98);
  border-left: 1px solid var(--border-gold);
  backdrop-filter: var(--glass-blur);
  z-index: 2500;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.9);
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
  overflow-y: auto;
  visibility: hidden;
}

.mobile-drawer.active {
  right: 0;
  visibility: visible;
  display: flex !important;
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  margin-bottom: 1.25rem;
}

.drawer-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.drawer-close:hover {
  color: #fff;
}

.drawer-server-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.drawer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.drawer-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
}

.drawer-nav-link:hover,
.drawer-nav-link.active {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.3);
  color: var(--gold-main);
  transform: translateX(4px);
}

.drawer-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 165px 0 60px;
  background: radial-gradient(circle at 70% 35%, rgba(255, 51, 68, 0.15) 0%, transparent 60%),
              radial-gradient(circle at 30% 60%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
  overflow: hidden;
}

.hero-bg-media {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: url('/portal/img/hero_banner.jpg') no-repeat center right;
  background-size: cover;
  opacity: 0.55;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.8) 40%, black 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.8) 40%, black 100%);
  pointer-events: none;
}

.hero-content {
  max-width: 650px;
  position: relative;
  z-index: 3;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 51, 68, 0.15);
  border: 1px solid rgba(255, 51, 68, 0.4);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffa4aa;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(255, 51, 68, 0.2);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.8rem;
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 1.25rem;
  letter-spacing: 1px;
}

.hero-desc {
  font-size: 1.15rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.2rem;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: rgba(20, 23, 34, 0.8);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--gold-main);
  backdrop-filter: var(--glass-blur);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

/* Hero Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--gold-main);
  line-height: 1.2;
}

.stat-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   GAME CONSOLE ARENA (EMBEDDED WEB PLAYER)
   ========================================================================== */
.arena-section {
  padding: 35px 0 60px;
  position: relative;
  background: radial-gradient(circle at 50% 20%, rgba(255, 119, 0, 0.08) 0%, transparent 70%);
  transition: padding 0.35s ease;
}

body.arena-focused .arena-section {
  padding: 8px 0 20px;
}

body.arena-focused .arena-section .section-header {
  margin-bottom: 0.6rem;
}

body.arena-focused .arena-section .section-title {
  font-size: 1.45rem;
  margin-bottom: 0.2rem;
}

body.arena-focused .arena-section .section-sub {
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

body.arena-focused .arena-section .section-lead {
  display: none;
}

body.arena-focused .game-console {
  margin-bottom: 0.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.95), 0 0 40px rgba(255, 119, 0, 0.25);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
  transition: margin 0.3s ease;
}

.section-sub {
  color: var(--flame-red);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.section-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Console Bezel */
.game-console {
  background: #0d0f16;
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 119, 0, 0.15);
  overflow: hidden;
  position: relative;
  margin-bottom: 1.5rem;
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(90deg, #141724 0%, #1a1e2f 100%);
  border-bottom: 1px solid rgba(255, 215, 0, 0.25);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.console-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.console-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-main);
  letter-spacing: 0.5px;
}

.console-stats-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.78rem;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.console-stats-pill span {
  color: #22c55e;
  font-weight: 600;
}

.console-quick-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.console-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  width: 140px;
}

.console-input:focus {
  outline: none;
  border-color: var(--gold-main);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.console-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.console-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.console-btn:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--gold-main);
  color: #fff;
}

/* Game Viewport Container */
.game-viewport {
  position: relative;
  width: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 125px);
  min-height: 580px;
  max-height: 890px;
  transition: height 0.3s ease, max-height 0.3s ease, background 0.3s ease;
  overflow: hidden;
  overscroll-behavior: contain;
}

/* 1. Standard Web Mode (Default Desktop: Auto-fit 9:16 portrait up to 530px) */
.game-viewport.web-mode .game-iframe,
.game-viewport:not(.portrait-mode):not(.theater-mode) .game-iframe {
  width: min(calc((100vh - 125px) * 0.5625), 530px);
  max-width: 530px;
  height: 100%;
  aspect-ratio: 9 / 16;
  border-left: 1px solid rgba(255, 215, 0, 0.25);
  border-right: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.15), 0 0 60px rgba(0, 0, 0, 0.9);
}

/* 2. Portrait / Mobile Mode (Compact 440px) */
.game-viewport.portrait-mode .game-iframe {
  width: min(calc((100vh - 125px) * 0.5625), 440px);
  max-width: 440px;
  height: 100%;
  aspect-ratio: 9 / 16;
  border-left: 1px solid rgba(255, 215, 0, 0.2);
  border-right: 1px solid rgba(255, 215, 0, 0.2);
}

/* 3. Theater Mode (Expansive 660px with dark fantasy stage aura) */
.game-viewport.theater-mode {
  height: calc(100vh - 110px);
  max-height: 940px;
  background: radial-gradient(circle at 50% 50%, #171120 0%, #0a0810 70%, #000 100%);
}

.game-viewport.theater-mode .game-iframe {
  width: min(calc((100vh - 110px) * 0.5625 * 1.25), 660px);
  max-width: 660px;
  height: 100%;
  aspect-ratio: 9 / 16;
  border-left: 2px solid rgba(255, 140, 0, 0.35);
  border-right: 2px solid rgba(255, 140, 0, 0.35);
  box-shadow: 0 0 60px rgba(255, 80, 0, 0.3), 0 0 100px rgba(0, 0, 0, 0.95);
}

/* 4. Fullscreen Mode */
.game-viewport:fullscreen,
.game-viewport:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  background: #000;
}

.game-viewport:fullscreen .game-iframe,
.game-viewport:-webkit-full-screen .game-iframe {
  width: calc(100vh * 0.5625);
  max-width: 100vw;
  height: 100vh;
  border: none;
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
  image-rendering: -webkit-optimize-contrast !important;
  image-rendering: crisp-edges !important;
  transform: translateZ(0);
}

/* Mobile Full-Bleed Sharp Viewport */
@media (max-width: 768px) {
  .game-viewport {
    height: 100vh !important;
    max-height: 100vh !important;
    min-height: 100vh !important;
  }
  .game-viewport .game-iframe,
  .game-viewport.web-mode .game-iframe,
  .game-viewport.portrait-mode .game-iframe,
  .game-viewport.theater-mode .game-iframe {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100% !important;
    border: none !important;
    box-shadow: none !important;
    aspect-ratio: auto !important;
  }
}

/* Loading Overlay */
.viewport-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #07080c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  z-index: 10;
  transition: opacity 0.5s, visibility 0.5s;
}

.viewport-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 215, 0, 0.15);
  border-top-color: var(--gold-main);
  border-right-color: var(--flame-red);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--gold-main);
  letter-spacing: 1px;
}

/* Console Bottom Bar */
.console-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: #0d0f16;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.account-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.account-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.2);
  color: #e2e8f0;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition);
}

.account-chip:hover,
.account-chip.active {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--gold-main);
  color: var(--gold-main);
}

/* ==========================================================================
   CLASSES SHOWCASE SECTION
   ========================================================================== */
.classes-section {
  padding: 80px 0;
  position: relative;
  background: radial-gradient(circle at 20% 50%, rgba(0, 240, 255, 0.06) 0%, transparent 60%);
}

.class-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.class-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  background: rgba(16, 18, 27, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.class-tab-btn:hover {
  border-color: var(--gold-main);
  color: #fff;
  transform: translateY(-2px);
}

.class-tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 51, 68, 0.25), rgba(255, 215, 0, 0.15));
  border-color: var(--gold-main);
  color: var(--gold-main);
  box-shadow: 0 4px 25px rgba(255, 215, 0, 0.25);
}

/* Class Display Card */
.class-showcase-panel {
  display: none;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
  background: rgba(16, 18, 27, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: var(--glass-blur);
}

.class-showcase-panel.active {
  display: grid;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.class-media {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.class-media img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.class-media:hover img {
  transform: scale(1.04);
}

.class-details {
  display: flex;
  flex-direction: column;
}

.class-badge {
  font-size: 0.85rem;
  color: var(--flame-red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.35rem;
}

.class-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.class-desc {
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

/* Skill Grid */
.skills-block {
  margin-bottom: 1.75rem;
}

.block-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--gold-main);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.skill-icon {
  font-size: 1.25rem;
  color: var(--flame-orange);
}

.skill-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #f1f5f9;
}

.skill-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Stat Bars */
.stat-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.bar-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.bar-track {
  height: 7px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--flame-red), var(--gold-main));
  transition: width 1s ease-out;
}

/* ==========================================================================
   SERVERS & LIVE RANKINGS SECTION
   ========================================================================== */
.servers-rankings-section {
  padding: 80px 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 51, 68, 0.05) 0%, transparent 60%);
}

.servers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.server-card {
  background: rgba(16, 18, 27, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.server-card:hover {
  border-color: var(--gold-main);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.15);
}

.server-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.server-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.server-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 215, 0, 0.15);
  color: var(--gold-main);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.server-rates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.server-rate-pill {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
}

/* Rankings Block */
.rankings-box {
  background: rgba(16, 18, 27, 0.9);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
}

.rankings-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.rankings-tabs {
  display: flex;
  gap: 0.5rem;
}

.rank-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}

.rank-tab-btn.active {
  background: var(--gold-main);
  color: #07080c;
  font-weight: 700;
  border-color: var(--gold-main);
}

.mobile-table-hint {
  display: none;
  text-align: center;
  font-size: 0.8rem;
  color: var(--gold-main);
  margin-bottom: 0.75rem;
  background: rgba(255, 215, 0, 0.08);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px dashed rgba(255, 215, 0, 0.35);
  animation: pulse-hint 2s infinite ease-in-out;
}

@keyframes pulse-hint {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

.rank-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.rank-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 0.92rem;
}

.rank-table th {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  color: var(--gold-main);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.rank-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.rank-table tr:hover td {
  background: rgba(255, 215, 0, 0.04);
}

.medal-1 { color: #ffd700; font-weight: 700; font-size: 1.1rem; }
.medal-2 { color: #e2e8f0; font-weight: 700; font-size: 1.05rem; }
.medal-3 { color: #d97706; font-weight: 700; font-size: 1.05rem; }

/* ==========================================================================
   FEATURES & HIGHLIGHTS
   ========================================================================== */
.features-section {
  padding: 80px 0;
  background: radial-gradient(circle at 80% 50%, rgba(255, 119, 0, 0.06) 0%, transparent 60%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.feature-card {
  background: rgba(16, 18, 27, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--flame-red), var(--gold-main));
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: rgba(255, 215, 0, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-box {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(255, 51, 68, 0.2), rgba(255, 215, 0, 0.1));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  color: var(--gold-main);
  margin-bottom: 1.25rem;
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  color: #f1f5f9;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ==========================================================================
   GIFTCODE & RECHARGE PROMOTION
   ========================================================================== */
.giftcode-section {
  padding: 80px 0;
  position: relative;
}

.giftcode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.giftcode-card {
  background: rgba(16, 18, 27, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: var(--transition);
}

.giftcode-card:hover {
  border-color: var(--gold-main);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.15);
}

.giftcode-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-badge {
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-main);
  background: rgba(255, 215, 0, 0.12);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px dashed rgba(255, 215, 0, 0.5);
  letter-spacing: 1px;
}

.code-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.code-rewards {
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* Redeem Interactive Box */
.redeem-box {
  background: linear-gradient(135deg, rgba(20, 23, 34, 0.95), rgba(30, 20, 25, 0.95));
  border: 1px solid var(--flame-red);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(255, 51, 68, 0.2);
}

.redeem-form {
  display: flex;
  gap: 0.75rem;
  flex: 1;
  max-width: 600px;
}

.redeem-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: var(--font-body);
}

.redeem-input:focus {
  outline: none;
  border-color: var(--flame-red);
}

/* ==========================================================================
   COMMUNITY & FOOTER
   ========================================================================== */
.community-section {
  padding: 60px 0;
  text-align: center;
}

.social-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  background: rgba(16, 18, 27, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.social-btn:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--gold-main);
  color: var(--gold-main);
  transform: translateY(-3px);
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px 0;
  background: #050608;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
}

.footer p {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   AUTH MODAL
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.auth-modal {
  background: #0e111a;
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(255, 215, 0, 0.2);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s;
}

.modal-backdrop.active .auth-modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: #141724;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-main);
}

.modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-tab-btn {
  flex: 1;
  padding: 0.85rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.modal-tab-btn.active {
  color: var(--gold-main);
  border-bottom-color: var(--gold-main);
  background: rgba(255, 215, 0, 0.05);
}

.modal-body {
  padding: 1.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold-main);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
}

.modal-alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  display: none;
}

.modal-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  display: block;
}

.modal-alert.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
  display: block;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #141724;
  border: 1px solid var(--gold-main);
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Server Tag nowrap */
.server-tag {
  white-space: nowrap;
}

/* Responsive Breakpoints */
@media (max-width: 1536px) {
  .nav-links,
  .nav-menu {
    gap: 0.3rem;
  }
  .nav-link {
    font-size: 0.74rem;
    padding: 0.2rem 0.3rem;
  }
  .nav-actions {
    gap: 0.45rem;
  }
}

@media (max-width: 1280px) {
  .nav-links,
  .nav-menu {
    gap: 0.25rem;
  }
  .nav-link {
    font-size: 0.72rem;
    padding: 0.18rem 0.25rem;
  }
  .nav-actions {
    gap: 0.4rem;
  }
  .btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 992px) {
  .hero-title { font-size: 2.8rem; }
  .class-showcase-panel { grid-template-columns: 1fr; }
  .servers-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .giftcode-grid { grid-template-columns: 1fr; }
  .nav-links,
  .nav-menu { display: none; }
  .server-pill { display: none; }
  .mobile-toggle { display: inline-flex; }
}

@media (max-width: 768px) {
  .mobile-table-hint { display: block; }
}

@media (max-width: 640px) {
  .nav-container { height: 60px; padding: 0 0.85rem; }
  .brand-sub { display: none; }
  .brand-name { font-size: 1.05rem; }
  .brand-icon { width: 34px; height: 34px; font-size: 1.1rem; border-radius: 8px; }
  .bgm-btn { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
  .bgm-label { display: none; }
  .nav-actions { gap: 0.35rem; }
  #btn-nav-pwa { padding: 0.35rem 0.55rem; }
  #btn-nav-pwa span:last-child { display: none; }
  .nav-auth-wrap .btn-open-register { display: none; }
  .nav-auth-wrap .btn-sm { padding: 0.35rem 0.6rem; font-size: 0.8rem; }
  .hero-section { padding: 85px 0 40px; }
  .hero-title { font-size: 2.2rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .stat-bars { grid-template-columns: 1fr; }
  .redeem-box { flex-direction: column; }
  .redeem-form { width: 100%; max-width: 100%; flex-direction: column; }
  
  /* Console Top Controls Mobile Layout */
  .console-header {
    padding: 0.65rem 0.85rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .console-title-wrap {
    justify-content: space-between;
    width: 100%;
  }
  .console-quick-user {
    width: 100%;
    display: flex;
  }
  .console-quick-user .console-input {
    flex: 1;
    width: auto;
  }
  .console-controls {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
  }
  .console-btn {
    padding: 0.45rem 0.25rem;
    font-size: 0.72rem;
    justify-content: center;
    white-space: nowrap;
  }
  .account-badges {
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .account-chip {
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
  }
}

/* ==========================================================================
   ADVANCED PORTAL EXTENSIONS: R1 DASHBOARD, R2 SHOP & TOPUP, R3 NEWS, R4 GM
   ========================================================================== */

/* Universal Modal Extensions */
.modal-dialog-lg {
  max-width: 820px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-dialog-xl {
  max-width: 1060px;
  width: 95%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.modal-scrollable-body {
  overflow-y: auto;
  padding: 1.5rem;
  flex: 1;
}

/* User Badge in Nav */
.user-nav-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid var(--border-gold);
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
}

.user-nav-name {
  color: var(--gold-main);
  font-weight: 700;
  font-size: 0.88rem;
}

.user-nav-dia {
  color: #38bdf8;
  font-weight: 600;
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   R1: PLAYER MEMBER DASHBOARD
   -------------------------------------------------------------------------- */
.dashboard-container {
  width: 100%;
  box-sizing: border-box;
}

.profile-card {
  background: rgba(20, 24, 38, 0.9);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.profile-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ff7700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 2px solid var(--gold-main);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-main);
  font-family: var(--font-heading);
}

.profile-uid {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.vip-pill {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #111;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.vip-exp-bar-wrap {
  margin: 1rem 0;
}

.vip-exp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #cbd5e1;
  margin-bottom: 0.35rem;
}

.vip-exp-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.vip-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ff7700);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.profile-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.asset-pill {
  background: rgba(10, 12, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}

.asset-val {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: monospace;
}

.asset-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Character Roster Grid */
.characters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.character-card {
  background: rgba(16, 20, 32, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 8px;
  padding: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.character-card:hover {
  border-color: var(--gold-main);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.char-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.char-name {
  font-weight: 700;
  color: #ffd700;
  font-size: 1rem;
}

.char-job {
  font-size: 0.8rem;
  color: #94a3b8;
}

.char-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-top: 0.4rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 0.4rem;
}

.char-power {
  color: var(--flame-orange);
  font-weight: 700;
  font-family: monospace;
}

/* History Table */
.history-tabs-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.history-tab-btn {
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: #cbd5e1;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.history-tab-btn.active {
  background: var(--gold-main);
  color: #111;
  font-weight: 700;
  border-color: var(--gold-main);
}

.history-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   R2: WEB ITEM SHOP & TOPUP GATEWAY
   -------------------------------------------------------------------------- */
.shop-container {
  width: 100%;
  box-sizing: border-box;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.shop-card {
  background: rgba(16, 20, 32, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
}

.shop-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-main);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.25);
}

.shop-card-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: linear-gradient(135deg, #ff3344, #ff7700);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
}

.shop-icon-box {
  width: 70px;
  height: 70px;
  margin: 0.5rem auto 1rem;
  border-radius: 10px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.25);
}

.shop-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffd700;
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.shop-item-price {
  text-align: center;
  margin: 0.75rem 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #38bdf8;
  font-family: monospace;
}

/* Topup Package Cards */
.topup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.topup-card {
  background: rgba(16, 20, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.topup-card:hover, .topup-card.active {
  border-color: var(--gold-main);
  background: rgba(255, 215, 0, 0.08);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.25);
  transform: translateY(-2px);
}

.topup-card-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  background: linear-gradient(135deg, #ff3344, #ff7700);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.topup-card-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffd700;
  margin: 0.5rem 0 0.25rem;
}

.topup-card-diamonds {
  font-size: 1rem;
  font-weight: 700;
  color: #38bdf8;
}

.topup-card-bonus {
  font-size: 0.78rem;
  color: #4ade80;
  margin-top: 0.25rem;
}

/* PromptPay QR Display */
.qr-modal-body {
  text-align: center;
  padding: 1.5rem;
}

.qr-box-wrap {
  width: 220px;
  height: 220px;
  margin: 1.25rem auto;
  background: #fff;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box-wrap img, .qr-box-wrap canvas, .qr-box-wrap svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-order-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-family: monospace;
  font-size: 0.9rem;
  color: #ffd700;
  margin: 0.5rem 0;
}

.qr-timer {
  font-size: 0.85rem;
  color: #fca5a5;
  margin: 0.5rem 0 1.25rem;
}

/* --------------------------------------------------------------------------
   R3: NEWS & EVENTS FEED
   -------------------------------------------------------------------------- */
.news-container {
  width: 100%;
  box-sizing: border-box;
}

.news-tabs-wrap {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.news-tab-btn {
  padding: 0.55rem 1.3rem;
  background: rgba(20, 24, 38, 0.8);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 30px;
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.news-tab-btn.active, .news-tab-btn:hover {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #111;
  border-color: var(--gold-main);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.35);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: rgba(16, 20, 32, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-main);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
}

.news-thumb {
  width: 100%;
  height: 150px;
  background: #141724;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-cat-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  color: #fff;
}

.news-cat-notice { background: linear-gradient(135deg, #ff3344, #c01828); }
.news-cat-event { background: linear-gradient(135deg, #ffd700, #ff7700); color: #111; }
.news-cat-patch { background: linear-gradient(135deg, #00f0ff, #3b82f6); color: #111; }

.news-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.news-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.6rem;
  line-height: 1.4;
  font-family: var(--font-body);
}

.news-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   R4: WEB GM ADMIN PANEL
   -------------------------------------------------------------------------- */
.gm-container {
  width: 100%;
  box-sizing: border-box;
}

.gm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gm-stat-card {
  background: rgba(14, 18, 28, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.gm-stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: monospace;
  color: var(--gold-main);
}

.gm-stat-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.gm-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin-top: 1rem;
}

.gm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.gm-table th {
  background: #141724;
  color: var(--gold-main);
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.gm-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.gm-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}



/* ==========================================================================
   ENHANCEMENT: EMERGENCY BROADCAST BAR & AUDIO CONTROLS
   ========================================================================== */
.broadcast-bar {
  background: linear-gradient(90deg, #20080c 0%, #3a0d14 50%, #20080c 100%);
  border-bottom: 1px solid rgba(255, 51, 68, 0.4);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 38px;
  z-index: 1002;
  box-shadow: 0 4px 15px rgba(255, 51, 68, 0.2);
  transition: height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.broadcast-bar.hidden {
  display: none !important;
  height: 0 !important;
  opacity: 0;
  border-bottom: none;
}

.broadcast-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  font-size: 0.85rem;
  height: 100%;
}

.broadcast-content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  color: #fca5a5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broadcast-icon {
  animation: pulseFlame 1.5s infinite;
  display: inline-block;
  font-size: 1.1rem;
}

@keyframes pulseFlame {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px #ff3344); }
  50% { transform: scale(1.2); filter: drop-shadow(0 0 10px #ff7700); }
}

.broadcast-text {
  font-weight: 500;
  color: #fecdd3;
  overflow: hidden;
  text-overflow: ellipsis;
}

.broadcast-link {
  color: #ffd700;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.3);
  margin-left: 0.5rem;
  transition: all 0.2s;
}

.broadcast-link:hover {
  background: rgba(255, 215, 0, 0.25);
  color: #fff;
}

.broadcast-close {
  background: none;
  border: none;
  color: #fca5a5;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 0.4rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.broadcast-close:hover {
  opacity: 1;
  color: #fff;
}

/* Audio Player Widget in Navbar */
.bgm-widget {
  position: relative;
}

.bgm-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(20, 24, 38, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: #ffd700;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.bgm-btn:hover {
  background: rgba(30, 36, 56, 0.95);
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

.bgm-btn.playing {
  border-color: #4ade80;
  color: #4ade80;
}

/* Animated Equalizer Bars */
.equalizer-bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.bgm-btn.playing .equalizer-bars {
  display: inline-flex;
}

.equalizer-bars span {
  width: 2.5px;
  background: #4ade80;
  border-radius: 1px;
  animation: eqBounce 1s infinite ease-in-out alternate;
}

.equalizer-bars span:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.equalizer-bars span:nth-child(2) { height: 80%; animation-delay: 0.3s; }
.equalizer-bars span:nth-child(3) { height: 60%; animation-delay: 0.2s; }
.equalizer-bars span:nth-child(4) { height: 100%; animation-delay: 0.4s; }

@keyframes eqBounce {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* Audio Popover */
.bgm-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #101422;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  padding: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1002;
}

.bgm-widget:hover .bgm-popover,
.bgm-widget:focus-within .bgm-popover,
.bgm-widget.open .bgm-popover,
.bgm-popover.active {
  display: flex;
}

.bgm-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffd700;
  font-size: 0.82rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
}

.bgm-select:focus {
  outline: none;
  border-color: #ffd700;
}

.bgm-vol-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bgm-slider {
  flex: 1;
  accent-color: #ffd700;
  height: 5px;
  cursor: pointer;
}

/* ==========================================================================
   ENHANCEMENT: FAQ KNOWLEDGEBASE & ACCORDION
   ========================================================================== */
.modal-dialog-xl {
  max-width: 860px;
  width: 95%;
}

.faq-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.faq-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.faq-pill:hover, .faq-pill.active {
  background: rgba(255, 215, 0, 0.15);
  border-color: #ffd700;
  color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.faq-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: rgba(16, 20, 32, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, background-color 0.2s;
}

.faq-item:hover {
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(22, 28, 44, 0.85);
}

.faq-item.active {
  border-color: var(--gold-main);
  background: rgba(24, 30, 48, 0.95);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
}

.faq-question:hover {
  color: #ffd700;
}

.faq-chevron {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
  color: #ffd700;
}

.faq-item.active .faq-chevron {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.25rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 350px;
  padding: 0 1.25rem 1rem 1.25rem;
}

/* ==========================================================================
   ENHANCEMENT: GAME GUIDE & WIKI
   ========================================================================== */
.wiki-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.wiki-card {
  background: rgba(16, 20, 32, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 8px;
  padding: 1.15rem;
  transition: transform 0.2s, border-color 0.2s;
}

.wiki-card:hover {
  transform: translateY(-2px);
  border-color: #ffd700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.wiki-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wiki-panel {
  display: none;
}

.wiki-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ENHANCEMENT: LEGAL & COMPLIANCE MODALS
   ========================================================================== */
.legal-modal-body h4 {
  color: var(--gold-main);
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

.legal-modal-body h4:first-child {
  margin-top: 0;
}

.legal-modal-body p {
  margin-bottom: 0.85rem;
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 0.88rem;
}

/* ==========================================================================
   RESPONSIVE OVERFLOW SAFEGUARDS (0px OVERFLOW ACROSS ALL DEVICES)
   ========================================================================== */
@media (max-width: 768px) {
  .broadcast-bar {
    height: 36px;
  }
  .live-ticker {
    top: 36px !important;
    height: 36px;
  }
  .navbar {
    top: 72px !important;
  }
  .broadcast-bar.hidden ~ .live-ticker,
  body.broadcast-closed .live-ticker {
    top: 0 !important;
  }
  .broadcast-bar.hidden ~ .navbar,
  body.broadcast-closed .navbar {
    top: 36px !important;
  }
  .live-ticker.hidden ~ .navbar,
  body.ticker-closed .navbar {
    top: 36px !important;
  }
  .broadcast-bar.hidden ~ .live-ticker.hidden ~ .navbar,
  body.broadcast-closed.ticker-closed .navbar {
    top: 0 !important;
  }
  .broadcast-content {
    font-size: 0.78rem;
  }
  .broadcast-link {
    display: none;
  }
  .bgm-widget {
    display: none;
  }
  .modal-dialog-xl {
    width: 96%;
    max-width: 96%;
    margin: 0 auto;
  }
  .wiki-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .broadcast-bar {
    height: 34px;
  }
  .live-ticker {
    top: 34px !important;
    height: 34px;
  }
  .navbar {
    top: 68px !important;
  }
  .nav-container {
    padding: 0 0.65rem;
  }
  .brand-name {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
  }
  .brand {
    gap: 0.45rem;
  }
  .nav-actions {
    gap: 0.35rem;
    max-width: calc(100% - 150px);
    justify-content: flex-end;
  }
  .nav-auth-wrap {
    display: none;
  }
  .mobile-toggle {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }
  .broadcast-bar.hidden ~ .live-ticker,
  body.broadcast-closed .live-ticker {
    top: 0 !important;
  }
  .broadcast-bar.hidden ~ .navbar,
  body.broadcast-closed .navbar {
    top: 34px !important;
  }
  .live-ticker.hidden ~ .navbar,
  body.ticker-closed .navbar {
    top: 34px !important;
  }
  .broadcast-bar.hidden ~ .live-ticker.hidden ~ .navbar,
  body.broadcast-closed.ticker-closed .navbar {
    top: 0 !important;
  }
  .broadcast-container {
    padding: 0 0.75rem;
  }
  .broadcast-text {
    font-size: 0.75rem;
  }
  .faq-question {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
  }
  .faq-answer {
    font-size: 0.82rem;
    padding: 0 1rem;
  }
  .faq-item.active .faq-answer {
    padding: 0 1rem 0.85rem 1rem;
  }
}

/* ==========================================================================
   SUPPORT TICKET STATUS BADGES & GM TICKET ENHANCEMENTS
   ========================================================================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-open {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}
.badge-progress {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.badge-resolved {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.4);
}
.badge-closed {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* ==========================================================================
   WHEEL OF FORTUNE & REFERRAL MILESTONES ENHANCEMENTS
   ========================================================================== */
.btn-spin-center:hover {
  transform: translate(-50%, -50%) scale(1.08) !important;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.9) !important;
  transition: all 0.2s ease;
}

.ref-milestone-card {
  background: rgba(20, 24, 38, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, border-color 0.2s;
}

.ref-milestone-card:hover {
  border-color: var(--gold-main);
  transform: translateY(-2px);
}

.ref-milestone-card.claimed {
  opacity: 0.7;
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(15, 28, 20, 0.7);
}

.ref-milestone-card.ready {
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.medal-guild-1 { color: #ffd700; font-weight: 800; }
.medal-guild-2 { color: #cbd5e1; font-weight: 800; }
.medal-guild-3 { color: #cd7f32; font-weight: 800; }

/* ==========================================================================
   SIC BO / DICE MINIGAME STYLES (ไฮโลมหาปาฏิหาริย์แจ็กพอต)
   ========================================================================== */
.dice-top-telemetry {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.dice-pot-card {
  flex: 1 1 340px;
  background: radial-gradient(circle at center, rgba(180, 83, 9, 0.25), rgba(20, 14, 5, 0.95));
  border: 1px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.2), inset 0 0 15px rgba(255, 215, 0, 0.1);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  text-align: center;
}

.dice-pot-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fde047;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.dice-pot-value-wrap {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.5rem;
}

.dice-pot-coin-icon {
  font-size: 1.5rem;
}

.dice-pot-value {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
  font-family: 'Kanit', sans-serif;
}

.dice-pot-unit {
  font-size: 1rem;
  color: #fef08a;
}

.dice-pot-sub {
  font-size: 0.72rem;
  color: #cbd5e1;
  margin-top: 0.35rem;
}

.dice-balance-card {
  flex: 1 1 240px;
  background: rgba(20, 24, 38, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dice-balance-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Center Arena */
.dice-arena {
  background: radial-gradient(ellipse at center, #0e2719 0%, #06150c 100%);
  border: 2px solid rgba(255, 215, 0, 0.35);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 4px 20px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.dice-cup-container {
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dice-cup {
  width: 110px;
  height: 80px;
  background: linear-gradient(135deg, #78350f, #3a1a05);
  border: 3px solid #ffd700;
  border-radius: 55px 55px 12px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7), inset 0 2px 6px rgba(255, 215, 0, 0.4);
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: transform 0.2s;
}

.dice-cup-emblem {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

@keyframes diceCupShake {
  0% { transform: rotate(0deg) translateY(0); }
  15% { transform: rotate(-14deg) translateY(-8px) scale(1.05); }
  30% { transform: rotate(14deg) translateY(-12px) scale(1.05); }
  45% { transform: rotate(-12deg) translateY(-6px); }
  60% { transform: rotate(12deg) translateY(-10px); }
  75% { transform: rotate(-8deg) translateY(-4px); }
  90% { transform: rotate(6deg) translateY(-2px); }
  100% { transform: rotate(0deg) translateY(0); }
}

.dice-cup.shaking {
  animation: diceCupShake 0.65s cubic-bezier(.36,.07,.19,.97) infinite;
}

.dice-tray {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1rem;
}

/* 3D Dice styling */
.dice-cube {
  width: 54px;
  height: 54px;
  background: #fdfbf7;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), inset 0 0 5px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s cubic-bezier(.175,.885,.32,1.275);
}

.dice-cube.rolling {
  animation: diceRollSpin 0.3s linear infinite;
}

@keyframes diceRollSpin {
  0% { transform: rotate(0deg) scale(0.9); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(0.9); }
}

.pip {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1e293b;
}

.pip.pip-mid { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.pip.pip-tl { top: 7px; left: 7px; }
.pip.pip-tr { top: 7px; right: 7px; }
.pip.pip-bl { bottom: 7px; left: 7px; }
.pip.pip-br { bottom: 7px; right: 7px; }
.pip.pip-ml { top: 50%; left: 7px; transform: translateY(-50%); }
.pip.pip-mr { top: 50%; right: 7px; transform: translateY(-50%); }

/* Asian Sic Bo tradition: 1 and 4 are red */
.dice-cube[data-val="1"] .pip {
  width: 14px;
  height: 14px;
  background: #dc2626;
}
.dice-cube[data-val="4"] .pip {
  background: #dc2626;
}

.dice-pip-preview.pip-1 .pip,
.dice-pip-preview.pip-4 .pip {
  background: #dc2626;
}

.dice-result-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.dice-sum-display {
  font-size: 1.15rem;
  color: #ffd700;
  font-weight: 700;
}

.dice-outcome-tags {
  display: flex;
  gap: 0.5rem;
}

.badge-outcome {
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.badge-big {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid #ef4444;
}

.badge-small {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid #3b82f6;
}

.badge-triple {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  border: 1px solid #a855f7;
}

.badge-jackpot {
  background: linear-gradient(135deg, #ffd700, #b45309);
  color: #07080c;
  font-weight: 800;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}

/* Betting Board */
.dice-betting-board {
  margin-top: 1.25rem;
}

.dice-two-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.bet-spot {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 10px;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
  text-align: center;
}

.bet-spot:hover {
  border-color: #ffd700;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.25);
}

.bet-spot.has-bet {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.08);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
}

.bet-spot-badge {
  font-size: 0.7rem;
  color: #4ade80;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.bet-spot-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffd700;
}

.bet-spot-range {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0.25rem 0 0.5rem;
}

.bet-spot-placed {
  font-size: 0.85rem;
  color: #e2e8f0;
}

.placed-amt {
  color: #ffd700;
  font-size: 1rem;
}

.dice-numbers-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .dice-numbers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bet-spot-number {
  padding: 0.6rem 0.4rem;
}

.dice-pip-preview {
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: 6px;
  margin: 0 auto 0.4rem;
  position: relative;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.dice-pip-preview .pip {
  width: 6px;
  height: 6px;
}
.dice-pip-preview .pip.pip-tl { top: 4px; left: 4px; }
.dice-pip-preview .pip.pip-tr { top: 4px; right: 4px; }
.dice-pip-preview .pip.pip-bl { bottom: 4px; left: 4px; }
.dice-pip-preview .pip.pip-br { bottom: 4px; right: 4px; }
.dice-pip-preview .pip.pip-ml { top: 50%; left: 4px; transform: translateY(-50%); }
.dice-pip-preview .pip.pip-mr { top: 50%; right: 4px; transform: translateY(-50%); }

.bet-num-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffd700;
}

.bet-num-mult {
  font-size: 0.65rem;
  color: #94a3b8;
  margin: 0.2rem 0 0.4rem;
}

/* Controls & Chips */
.dice-controls-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.15);
  margin-bottom: 1rem;
}

.dice-chips-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.chip-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 215, 0, 0.6);
  background: radial-gradient(circle, #b45309, #451a03);
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.chip-btn:hover {
  transform: scale(1.1);
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.chip-btn.active {
  border: 2px solid #ffffff;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.9);
  transform: scale(1.15);
  background: radial-gradient(circle, #f59e0b, #78350f);
}

.dice-quick-actions {
  display: flex;
  gap: 0.5rem;
}

.dice-footer-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

.dice-feed-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 8px;
  padding: 0.85rem;
}

.dice-feed-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffd700;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  padding-bottom: 0.35rem;
}

.dice-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 130px;
  overflow-y: auto;
}

.dice-feed-list li {
  font-size: 0.8rem;
  color: #cbd5e1;
  padding: 0.3rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   DAILY CHECK-IN 7-DAY STREAK STYLES (เช็คชื่อรับรางวัล 7 วันต่อเนื่อง)
   ========================================================================== */
.checkin-streak-banner {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.streak-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.checkin-vip-callout {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  text-align: right;
}

@media (max-width: 640px) {
  .checkin-vip-callout {
    text-align: left;
    width: 100%;
  }
}

.checkin-progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.checkin-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #ffd700);
  border-radius: 5px;
  transition: width 0.5s ease;
}

.checkin-cards-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .checkin-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 540px) {
  .checkin-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.checkin-card {
  background: rgba(20, 24, 38, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  padding: 0.85rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
  min-height: 175px;
}

.checkin-card:hover {
  transform: translateY(-3px);
  border-color: #ffd700;
}

.checkin-card.available {
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
  background: radial-gradient(circle at top, rgba(255, 215, 0, 0.15), rgba(20, 24, 38, 0.95));
}

.checkin-card.claimed {
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(15, 30, 22, 0.8);
  opacity: 0.8;
}

.checkin-card.locked {
  opacity: 0.5;
  filter: grayscale(40%);
}

.checkin-card-day {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.checkin-card-icon {
  font-size: 2rem;
  margin: 0.35rem 0;
}

.checkin-card-reward {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.checkin-card-bonus {
  font-size: 0.7rem;
  color: #ffd700;
  background: rgba(255, 215, 0, 0.12);
  border-radius: 4px;
  padding: 2px 4px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.checkin-card-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-top: auto;
}

.status-claimed {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
}

.status-available {
  color: #07080c;
  background: #ffd700;
  animation: pulse 1.5s infinite;
}

.status-locked {
  color: #64748b;
  background: rgba(100, 116, 139, 0.15);
}

.checkin-footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

/* ====================================================================
   18. GROWTH MILESTONES & WORLD BOSS RADAR STYLES
   ==================================================================== */
.milestone-item-card {
  background: rgba(20, 26, 42, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.milestone-item-card:hover {
  transform: translateY(-2px);
  border-color: #ffd700;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.milestone-item-card.claimed {
  opacity: 0.65;
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(15, 23, 42, 0.4);
}

.milestone-item-card.can-claim {
  border-color: #ffd700;
  background: radial-gradient(circle at top, rgba(245, 158, 11, 0.15), rgba(20, 26, 42, 0.85));
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.milestone-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.milestone-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d97706, #ffd700);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.boss-card {
  background: rgba(18, 22, 34, 0.85);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.boss-card:hover {
  transform: translateY(-3px);
  border-color: #ef4444;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.2);
}

.boss-card.active-spawn {
  border-color: #22c55e;
  background: radial-gradient(circle at top, rgba(34, 197, 94, 0.12), rgba(18, 22, 34, 0.9));
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.25);
}

.boss-badge-alive {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.5);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  animation: pulse 1.5s infinite;
}

.boss-badge-respawning {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.drop-item-pill {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.drop-item-pill.mythic {
  border: 1px solid #ef4444;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
}

.drop-item-pill.legendary {
  border: 1px solid #f59e0b;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
}

.drop-item-pill.epic {
  border: 1px solid #a855f7;
  color: #e9d5ff;
  background: rgba(168, 85, 247, 0.1);
}

/* Giftcode Redeem Input Highlight Pulse */
.input-highlight-pulse {
  animation: goldPulse 1.2s ease-in-out 2 !important;
  border-color: #ffd700 !important;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.75) !important;
}

@keyframes goldPulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.95);
    border-color: #ffd700;
  }
}

/* ====================================================================
   GENERATION 8: PRODUCTION FEATURES EXTENSIONS
   R1: Timetable, R2: Live Ticker, R3: PWA Modal, R4: Topup Gateway, R5: Community
   ==================================================================== */

/* --- R2: LIVE IN-GAME TICKER & RARE DROP BROADCAST BAR --- */
.live-ticker-container,
.live-ticker {
  background: linear-gradient(90deg, rgba(7, 8, 12, 0.98), rgba(22, 18, 28, 0.95), rgba(7, 8, 12, 0.98));
  border-bottom: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  height: 40px;
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  position: fixed;
  top: 38px;
  left: 0;
  right: 0;
  z-index: 1001;
  transition: top 0.3s ease, max-height 0.3s ease, opacity 0.3s ease;
}

/* When broadcast-bar is hidden, live-ticker moves up to top: 0 */
.broadcast-bar.hidden ~ .live-ticker,
body.broadcast-closed .live-ticker {
  top: 0 !important;
}

.live-ticker.hidden {
  display: none !important;
}

.ticker-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 1rem;
  overflow: hidden;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 1.5s infinite;
}

.ticker-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  white-space: nowrap;
  will-change: transform;
  animation: tickerMarquee 42s linear infinite;
}

.ticker-track.paused {
  animation-play-state: paused !important;
}

@keyframes tickerMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: #cbd5e1;
}

.ticker-item strong {
  color: #ffd700;
}

.ticker-chip-icon {
  font-size: 1rem;
}

.ticker-tag {
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.ticker-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.ticker-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px 7px;
  transition: 0.2s all;
}

.ticker-btn:hover {
  border-color: #ffd700;
  color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
}

/* --- R1: DAILY IN-GAME EVENT TIMETABLE --- */
.timetable-section {
  position: relative;
  background: radial-gradient(circle at 50% 20%, rgba(30, 24, 16, 0.4) 0%, rgba(7, 8, 12, 0.95) 75%);
  padding: 4.5rem 0;
}

.timetable-filter-bar .timetable-tab {
  transition: 0.25s all;
  border-radius: 20px;
  padding: 0.35rem 1rem;
  font-size: 0.85rem;
}

.timetable-grid {
  margin-top: 1rem;
}

.event-card {
  background: rgba(16, 18, 27, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.22);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.3s transform, 0.3s border-color, 0.3s box-shadow;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.event-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 215, 0, 0.55);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.15);
}

.event-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.event-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.event-title-wrap {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-size: 1.05rem;
  margin: 0 0 0.15rem;
  line-height: 1.3;
}

.event-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  display: block;
}

.event-level-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  white-space: nowrap;
}

.event-schedule-info {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.event-schedule-info .info-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #cbd5e1;
}

.event-schedule-info .info-row strong {
  color: #ffd700;
}

.event-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.countdown-label {
  font-size: 0.82rem;
  color: #94a3b8;
}

.countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 3px 10px;
  border-radius: 16px;
  font-family: monospace;
  font-size: 0.84rem;
  font-weight: 700;
}

.countdown-badge.status-upcoming {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.countdown-badge.status-active {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  color: #4ade80;
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.3);
  }
  50% {
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.8);
  }
}

.event-drops-wrap {
  margin-bottom: 1rem;
}

.drops-header {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.drops-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.drop-pill {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.drop-pill.drop-mythic {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.drop-pill.drop-legendary {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

.drop-pill.drop-epic {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}

.drop-pill.drop-rare {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

/* --- R4: REAL PAYMENT GATEWAY & SLIP VERIFICATION --- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  transition: 0.3s all;
}

.status-pill.status-waiting {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.status-pill.status-checking {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #38bdf8;
  animation: checkingPulse 1.2s infinite;
}

.status-pill.status-success {
  background: rgba(34, 197, 94, 0.22);
  border: 1px solid #22c55e;
  color: #4ade80;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.status-pill.status-expired {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

@keyframes checkingPulse {
  0%, 100% {
    box-shadow: 0 0 4px rgba(56, 189, 248, 0.3);
  }
  50% {
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
  }
}

.btn-copy-pill {
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: #ffd700;
  transition: 0.2s all;
}

.btn-copy-pill:hover {
  background: rgba(255, 215, 0, 0.25);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* --- R5: COMMUNITY CARDS --- */
.community-card {
  transition: 0.3s transform, 0.3s box-shadow;
}

.community-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* --- R3: PWA MODAL STYLING --- */
.pwa-tab-content {
  animation: fadeIn 0.3s ease;
}

/* --- MOBILE RESPONSIVE HARDENING (390x844 & 0px OVERFLOW) --- */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.system-requirements-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

.download-section .btn {
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .nav-container {
    max-width: 100vw;
    box-sizing: border-box;
  }

  .system-requirements-wrap {
    padding: 1rem 0.75rem !important;
  }

  .data-table {
    min-width: 540px;
  }

  .live-ticker-container,
  .live-ticker {
    height: 36px;
  }

  .ticker-badge .ticker-label {
    display: none;
  }

  .ticker-badge {
    padding: 2px 5px;
  }

  .ticker-item {
    font-size: 0.78rem;
  }

  .timetable-grid {
    grid-template-columns: 1fr !important;
  }

  .timetable-modal-item {
    padding: 0.9rem !important;
  }

  .modal-dialog,
  .modal-dialog-lg,
  .auth-modal {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin: 12px auto !important;
    padding: 1rem !important;
    box-sizing: border-box !important;
  }

  .qr-box-wrap {
    max-width: 180px !important;
  }

  .qr-box-wrap img {
    width: 100% !important;
    height: auto !important;
  }

  .social-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Strict zero horizontal overflow guard */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* ==========================================================================
   26. NEWBIE WELCOME & GRAND OPENING CARNIVAL MODAL STYLES
   ========================================================================== */
.opening-badge {
  background: linear-gradient(90deg, rgba(255, 51, 68, 0.25), rgba(255, 215, 0, 0.25)) !important;
  border: 1px solid rgba(255, 215, 0, 0.6) !important;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3) !important;
}

.newbie-modal-dialog {
  border: 1px solid rgba(255, 215, 0, 0.45) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 215, 0, 0.25) !important;
  max-height: min(90vh, 720px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.newbie-modal-dialog .modal-header {
  flex-shrink: 0 !important;
}

.newbie-modal-dialog .modal-scrollable-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.newbie-banner-box {
  background: radial-gradient(circle at center, rgba(255, 215, 0, 0.12), rgba(20, 24, 38, 0.95));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.newbie-badge-pill {
  display: inline-block;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 10px;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.newbie-perks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 580px) {
  .newbie-perks-grid {
    grid-template-columns: 1fr;
  }
}

.newbie-perk-card {
  background: rgba(15, 20, 32, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.newbie-perk-card:hover {
  transform: translateY(-2px);
  border-color: #ffd700;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.15);
}

.newbie-perk-icon {
  font-size: 1.6rem;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 215, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.newbie-perk-info {
  flex: 1;
  min-width: 0;
}

.newbie-perk-title {
  color: #ffd700;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.newbie-perk-desc {
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.35;
}

.btn-copy-giftcode {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-giftcode:hover {
  background: #38bdf8;
  color: #000;
}


/* ====================================================================
   GAME AUTH GATE & CONSOLE PLAYER STATUS
   ==================================================================== */
.game-auth-gate {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 40%, rgba(18, 22, 34, 0.96), rgba(7, 8, 12, 0.99));
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.game-auth-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-gate-card {
  max-width: 440px;
  width: 100%;
  background: linear-gradient(180deg, rgba(26, 31, 46, 0.95), rgba(13, 16, 26, 0.98));
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  padding: 2.25rem 1.75rem;
  text-align: center;
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.2), 0 20px 40px rgba(0, 0, 0, 0.85);
}

.auth-gate-badge {
  display: inline-block;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #ffd700;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 1.15rem;
}

.auth-gate-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.auth-gate-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.auth-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.auth-gate-guest-wrap {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.btn-guest-play {
  background: transparent;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  color: #cbd5e1;
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-guest-play:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #ffd700;
  color: #ffd700;
}

.guest-note {
  font-size: 0.72rem;
  color: #64748b;
}

/* Console Player Info */
.console-player-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  flex-wrap: wrap;
}

.status-indicator-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
}

.status-indicator-dot.online {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.badge-role {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.badge-role.player {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-role.admin {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
