/* ==========================================================================
   IMPERA - PREMIUM MODERN REDESIGN & RESPONSIVE DESIGN SYSTEM
   Supports Desktop (Power 3-Column), Tablet (Adaptive Grid), and Mobile (1-Column + Drawer)
   Preserves the epic background artwork while transforming legacy 2000s GIF layout
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Root Design Variables --- */
:root {
  --bg-main: #060c18;
  --bg-card: rgba(13, 19, 31, 0.94);
  --bg-card-header: linear-gradient(180deg, rgba(28, 38, 58, 0.95) 0%, rgba(16, 23, 37, 0.95) 100%);
  --bg-card-subtle: rgba(18, 26, 42, 0.85);
  --bg-input: rgba(8, 13, 22, 0.88);

  --gold-primary: #d4af37;
  --gold-bright: #ffd700;
  --gold-light: #fbe69b;
  --gold-dark: #8c6d23;
  --gold-gradient: linear-gradient(135deg, #fce08b 0%, #d4af37 50%, #9a7218 100%);
  --gold-border: rgba(212, 175, 55, 0.38);
  --gold-border-glow: rgba(255, 215, 0, 0.55);

  --blue-btn-gradient: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  --amber-btn-gradient: linear-gradient(180deg, #d97706 0%, #b45309 100%);
  --green-btn-gradient: linear-gradient(180deg, #059669 0%, #047857 100%);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-gold: #f8df8c;

  --shadow-main: 0 10px 32px -4px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(212, 175, 55, 0.22);
  --shadow-gold-hover: 0 0 16px rgba(212, 175, 55, 0.35);
  --shadow-btn: 0 3px 8px rgba(0, 0, 0, 0.4);

  --font-heading: 'Cinzel', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
}

/* --- Base Body & Atmosphere --- */
html, body {
  background-color: var(--bg-main) !important;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Retain background artwork while ensuring high-end responsive fitting */
#ArtworkHelper {
  position: relative;
  background-position: top center !important;
  background-repeat: no-repeat !important;
  background-size: 1920px auto !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 100vh;
  box-shadow: inset 0 -120px 100px -20px var(--bg-main);
}

/* Overlay gradient at sides and bottom for seamless blend on any resolution */
#ArtworkHelper::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top center, transparent 40%, rgba(6, 12, 24, 0.7) 80%, var(--bg-main) 100%),
              linear-gradient(to bottom, transparent 65%, var(--bg-main) 100%);
  z-index: 1;
}

#Bodycontainer {
  position: relative;
  z-index: 2;
  max-width: 1340px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 0 15px !important;
  box-sizing: border-box !important;
  display: block !important;
}

/* ==========================================================================
   MODERN DESKTOP 3-COLUMN GRID ARCHITECTURE
   ========================================================================== */
#ContentRow {
  position: relative;
  top: auto !important;
  display: grid !important;
  grid-template-columns: 210px minmax(0, 1fr) 215px;
  gap: 18px;
  align-items: start;
  padding-top: 155px;
  margin: 0 auto;
  box-sizing: border-box;
}

#MenuColumn {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 10;
}

#ContentColumn {
  position: relative !important;
  margin: 0 !important;
  width: 100% !important;
  min-width: 0;
  z-index: 5;
}

#ThemeboxesColumn {
  position: relative !important;
  right: auto !important;
  top: auto !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 10;
}

/* --- Left Artwork / Server Logo --- */
#LeftArtwork {
  position: absolute !important;
  top: -142px !important;
  left: 0 !important;
  width: 100% !important;
  height: 135px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center;
}

#LeftArtwork #TibiaLogoArtworkTop {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 210px !important;
  height: auto !important;
  max-height: 140px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 15px rgba(212, 175, 55, 0.35));
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}

#LeftArtwork #TibiaLogoArtworkTop:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 25px rgba(255, 215, 0, 0.6));
}

#LeftArtwork #LogoLink {
  display: none !important;
}

/* ==========================================================================
   LEFT SIDEBAR: MODERN LOGIN BOX & DOWNLOAD CLIENT
   ========================================================================== */
.SidebarActionButtons {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 20px !important;
  width: 100% !important;
}

#Loginbox, .SmallMenuBox#DownloadBox {
  position: relative !important;
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

#LoginButtonContainer, .SmallBoxButtonContainer {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

#LoginButton, #PlayNowContainer {
  width: 160px !important;
  display: flex !important;
  justify-content: center !important;
}

#ButtonText, .MediumButtonBackground {
  width: 100px !important;
  height: 30px !important;
  margin: 0 !important;
}

.Loginstatus {
  margin-top: 6px !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

#LoginstatusText_2 {
  width: auto !important;
  min-width: 120px !important;
  height: 24px !important;
}

#LoginTop, #BorderLeft, #BorderRight, #LoginBottom,
.SmallBoxTop, .SmallBoxBorder, .SmallBoxBottom {
  display: none !important;
}

.MediumButtonBackground {
  background: var(--amber-btn-gradient) !important;
  border: 1px solid #f59e0b !important;
  border-radius: var(--border-radius-sm) !important;
  height: 38px !important;
  width: 160px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center;
  box-shadow: var(--shadow-btn), inset 0 1px 0 rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.MediumButtonBackground:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.MediumButtonOver, .MediumButtonText {
  display: none !important;
}

.MediumButtonBackground::after {
  content: 'DOWNLOAD CLIENT';
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.6px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* ==========================================================================
   LEFT SIDEBAR: MODERN ACCORDION NAVIGATION
   ========================================================================== */
#Menu {
  background: var(--bg-card) !important;
  border: 1px solid var(--gold-border) !important;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-main);
  backdrop-filter: blur(8px);
  padding: 8px 6px !important;
  margin: 0 !important;
  box-sizing: border-box;
}

#MenuTop, #MenuBottom {
  display: none !important;
}

.menuitem {
  margin-bottom: 5px;
}

.menuitem:last-child {
  margin-bottom: 0;
}

.MenuButton {
  position: relative !important;
  background: linear-gradient(90deg, #192338 0%, #121929 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.32) !important;
  border-radius: var(--border-radius-sm) !important;
  height: 38px !important;
  width: 100% !important;
  cursor: pointer !important;
  display: block !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

.MenuButton:hover {
  background: linear-gradient(90deg, #253352 0%, #172338 100%) !important;
  border-color: var(--gold-bright) !important;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35) !important;
  transform: translateY(-1px);
}

.MenuButton > div {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  position: relative !important;
}

.MenuButton .Button {
  display: none !important;
}

.MenuButton .Lights {
  display: none !important;
}

.MenuButton .Icon {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 24px !important;
  height: 24px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8)) !important;
}

.MenuButton .Label {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  height: 18px !important;
  flex: 1 1 auto !important;
  margin: 0 8px !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
  background-size: contain !important;
  filter: brightness(1.25) drop-shadow(0 1px 2px #000) !important;
}

.MenuButton .Extend {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  width: 12px !important;
  height: 12px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.7)) !important;
}

/* Submenus */
.Submenu {
  background: rgba(9, 15, 26, 0.96) !important;
  border-left: 2px solid var(--gold-border) !important;
  border-radius: 0 0 6px 6px !important;
  margin: 3px 0 6px 4px !important;
  padding: 8px 4px !important;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5) !important;
}

.Submenu a {
  text-decoration: none !important;
  display: block !important;
  margin-bottom: 4px !important;
}

.Submenu a:last-child {
  margin-bottom: 0 !important;
}

.Submenuitem {
  position: relative !important;
  height: 30px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 10px !important;
  background: #2b3548 !important;
  border-radius: 4px !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.5) !important;
  border-right: 1px solid rgba(0, 0, 0, 0.5) !important;
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.05) !important;
  overflow: hidden !important;
}

.Submenuitem:hover {
  background: #3b4861 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4) !important;
  border-color: var(--gold-primary) !important;
}

.LeftChain, .RightChain {
  display: none !important;
}

.ActiveSubmenuItemIcon {
  display: none !important;
}

.SubmenuitemLabel {
  font-family: var(--font-body) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  color: #e2e8f0 !important;
  transition: color 0.15s ease, transform 0.15s ease;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  width: auto !important;
}

/* ==========================================================================
   RIGHT SIDEBAR: BOOSTED CREATURES, PLAYERS ONLINE & THEMEBOXES
   ========================================================================== */
.BoostedContainer {
  margin: 0 auto 12px auto !important;
  width: 100% !important;
  max-width: 215px !important;
  gap: 8px !important;
}

.BoostedBox {
  background: var(--bg-card) !important;
  border: 1px solid var(--gold-border) !important;
  box-shadow: var(--shadow-main) !important;
  border-radius: var(--border-radius-md) !important;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.BoostedBox:hover {
  transform: translateY(-2px);
  border-color: var(--gold-bright) !important;
  box-shadow: var(--shadow-gold-hover) !important;
}

#Themeboxes {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.tibia-online-crest {
  width: 100% !important;
  max-width: 215px !important;
  box-sizing: border-box;
}

/* ==========================================================================
   MAIN CONTENT AREA: CARD WRAPPER & SUBPAGES
   ========================================================================== */
#ContentHelper {
  width: 100%;
}

.Content .Box {
  position: relative !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--gold-border) !important;
  border-radius: var(--border-radius-md) !important;
  box-shadow: var(--shadow-main) !important;
  backdrop-filter: blur(10px) !important;
  margin-bottom: 20px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.Content .Box::before {
  content: '';
  display: block;
  height: 2px;
  background: var(--gold-gradient);
  width: 100%;
}

/* Eliminate old retro GIF borders and sliced brown borders */
.Corner-tl, .Corner-tr, .Corner-bl, .Corner-br, .CornerWrapper-b,
.Border_1, .BorderTitleText {
  display: none !important;
}

.Border_2, .Border_3 {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* Modern Headline Title Bar — compact strip */
.Content .Box > .Title,
#newsticker > .Title,
#news > .Title {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 100%;
  height: 28px !important;
  margin: 0 !important;
  padding: 3px 12px !important;
  box-sizing: border-box !important;
  object-fit: contain;
  background: linear-gradient(180deg, rgba(28, 38, 60, 0.85) 0%, rgba(14, 20, 32, 0.95) 100%) !important;
  border-bottom: 1px solid var(--gold-border) !important;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.85));
}

/* Box Content area */
.Content .BoxContent {
  background-image: none !important;
  background: transparent !important;
  color: var(--text-secondary) !important;
  padding: 8px 10px 10px 10px !important;
  box-sizing: border-box;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  line-height: 1.6;
}

/* High-contrast headings inside content */
.Content .BoxContent h1,
.Content .BoxContent h2,
.Content .BoxContent h3,
.Content .BoxContent h4 {
  font-family: var(--font-heading);
  color: var(--gold-light);
  letter-spacing: 0.5px;
  margin-top: 14px;
  margin-bottom: 8px;
}

.Content .BoxContent a {
  color: var(--gold-light);
  text-decoration: none;
  transition: color 0.15s ease;
}

.Content .BoxContent a:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}

/* ==========================================================================
   HOMEPAGE NEWS TICKER COMPONENT
   ========================================================================== */
#newsticker,
#NewsTicker {
  margin-bottom: 10px !important;
}

/* Compact ticker: shrink the legacy GIF frame pieces */
#newsticker .Title,
#NewsTicker .Title,
#news .Title,
#News .Title {
  height: 26px !important;
  width: auto !important;
  max-width: 220px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  display: block !important;
}
/* Drop the duplicated decorative strip + slim the corner GIFs (both devices) */
#newsticker .BorderTitleText,
#NewsTicker .BorderTitleText,
#news .BorderTitleText,
#News .BorderTitleText {
  height: 0 !important;
  display: none !important;
}
#newsticker .Corner-tl, #newsticker .Corner-tr,
#NewsTicker .Corner-tl, #NewsTicker .Corner-tr,
#news .Corner-tl, #news .Corner-tr,
#News .Corner-tl, #News .Corner-tr {
  width: 8px !important;
  height: 8px !important;
  background-size: contain !important;
}
#newsticker .BoxContent,
#NewsTicker .BoxContent {
  background: transparent !important;
  background-image: none !important;
  padding: 6px 8px !important;
}

#newsticker .Row,
#NewsTicker .Row {
  margin-bottom: 4px !important;
  cursor: pointer !important;
}

#newsticker .Row:last-child,
#NewsTicker .Row:last-child {
  margin-bottom: 0 !important;
}

#newsticker .Row .Odd,
#newsticker .Row .Even,
#NewsTicker .Row .Odd,
#NewsTicker .Row .Even {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(212, 175, 55, 0.22) !important;
  border-radius: 6px !important;
  padding: 5px 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.15s ease !important;
  box-sizing: border-box !important;
}

#newsticker .Row:hover .Odd,
#newsticker .Row:hover .Even,
#NewsTicker .Row:hover .Odd,
#NewsTicker .Row:hover .Even {
  background: rgba(212, 175, 55, 0.09) !important;
  border-color: var(--gold-bright) !important;
  transform: translateX(2px);
}

.NewsTickerIcon {
  width: 16px !important;
  height: 16px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  flex-shrink: 0 !important;
}

.NewsTickerExtend {
  display: none !important; /* redundant second icon glued to the main one */
}

/* Row order: icon → text (with date pushed to the end) */
#newsticker .Row .Odd,
#newsticker .Row .Even,
#NewsTicker .Row .Odd,
#NewsTicker .Row .Even {
  justify-content: flex-start !important;
}
#newsticker .NewsTickerDate,
#NewsTicker .NewsTickerDate {
  order: 2 !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
}
#newsticker .NewsTickerShortText,
#newsticker .NewsTickerFullText,
#NewsTicker .NewsTickerShortText,
#NewsTicker .NewsTickerFullText {
  order: 1 !important;
  flex: 1 1 auto !important;
}

.NewsTickerText {
  flex: 1 1 auto !important;
  font-family: var(--font-body) !important;
  font-size: 11.5px !important;
  color: #e2e8f0 !important;
  line-height: 1.35 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.NewsTickerDate {
  font-family: var(--font-heading) !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  color: var(--gold-bright) !important;
  background: rgba(212, 175, 55, 0.15) !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
  border-radius: 4px !important;
  padding: 1px 5px !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap !important;
}

.NewsTickerShortText,
.NewsTickerFullText {
  color: #3a3223 !important; /* dark on parchment row bg (tibiacom_official layer) */
  font-weight: 500 !important;
}

/* ==========================================================================
   HOMEPAGE NEWS ARTICLES & ARTICLE TABLES
   ========================================================================== */
.NewsArticleCard {
  background: rgba(255, 252, 235, 0.55) !important; /* parchment, matches ticker rows */
  border: 1px solid #9d9467 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
  margin-bottom: 20px !important;
  overflow: hidden !important;
}

.NewsHeadlineBackground {
  background: linear-gradient(180deg, #6a6a6a 0%, #505050 50%, #3c3c3c 100%) !important;
  border-bottom: 2px solid #2a2a2a !important;
  border-left: 3px solid var(--gold-bright) !important;
  padding: 8px 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.NewsArticleBody {
  padding: 12px 14px !important;
  color: #3a3223 !important; /* dark text on parchment card */
  font-family: var(--font-body) !important;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
}
.NewsArticleBody a {
  color: #7a5c14 !important;
}

/* Modern tables inside news content (like spell icons/updates) */
.NewsArticleBody table,
.Content #news table,
.Content #News table {
  background: rgba(14, 20, 32, 0.75) !important;
  border: 1px solid rgba(212, 175, 55, 0.25) !important;
  border-radius: 6px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
  margin: 12px 0 !important;
  overflow: hidden !important;
}

.NewsArticleBody table td,
.Content #news table td,
.Content #News table td {
  padding: 8px 12px !important;
  color: #e2e8f0 !important;
  font-family: var(--font-body) !important;
  font-size: 12.5px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.NewsArticleBody table tr:last-child td,
.Content #news table tr:last-child td,
.Content #News table tr:last-child td {
  border-bottom: none !important;
}

.NewsArticleBody table tr:hover,
.Content #news table tr:hover,
.Content #News table tr:hover {
  background: rgba(212, 175, 55, 0.07) !important;
}

/* ==========================================================================
   MODERN RESPONSIVE TABLES & SUBPAGE COMPONENTS
   (Characters, Highscores, Guild Wars, Account Management, Server Info)
   ========================================================================== */
.TableContainer {
  background: var(--bg-card) !important;
  border: 1px solid var(--gold-border) !important;
  border-radius: var(--border-radius-md) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55) !important;
  margin: 8px 0 10px 0 !important;
  overflow: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.CaptionContainer {
  background: linear-gradient(180deg, #1c263c 0%, #111827 100%) !important;
  border-bottom: 1px solid var(--gold-border) !important;
  margin: 0 !important;
  padding: 0 !important;
}

.CaptionInnerContainer {
  background: transparent !important;
  padding: 5px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.CaptionContainer .Text {
  font-family: var(--font-heading) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--gold-light) !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
  padding: 0 !important;
}

/* Hide ancient GIF frame edges */
.CaptionEdgeLeftTop, .CaptionEdgeRightTop, .CaptionBorderTop,
.CaptionVerticalLeft, .CaptionVerticalRight, .CaptionBorderBottom,
.CaptionEdgeLeftBottom, .CaptionEdgeRightBottom {
  display: none !important;
}

/* Neutralize legacy nested table backgrounds */
.TableContainer .Table1,
.TableContainer .Table2,
.TableContainer .Table3,
.TableContainer .Table4,
.TableContainer .Table5,
.Table3, .Table4, .Table5,
.InnerTableContainer,
.TableContentContainer,
.TableContentAndRightShadow {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Responsive Table Wrapper */
.TableContentContainer, .InnerTableContainer {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Custom Sleek Scrollbar for Tables on Mobile */
.TableContentContainer::-webkit-scrollbar,
.InnerTableContainer::-webkit-scrollbar {
  height: 6px;
}
.TableContentContainer::-webkit-scrollbar-track,
.InnerTableContainer::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
}
.TableContentContainer::-webkit-scrollbar-thumb,
.InnerTableContainer::-webkit-scrollbar-thumb {
  background: var(--gold-border);
  border-radius: 3px;
}
.TableContentContainer::-webkit-scrollbar-thumb:hover,
.InnerTableContainer::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* Table Content Styling */
table.TableContent {
  width: 100% !important;
  border-collapse: collapse !important;
  background: transparent !important;
  margin-bottom: 0 !important;
}

/* Table Headers */
table.TableContent th,
tr.LabelH,
.CaptionContainer {
  background: linear-gradient(180deg, #24324c 0%, #172235 100%) !important;
  color: var(--gold-light) !important;
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid var(--gold-border) !important;
  padding: 6px 10px !important;
}

/* Table Body Cells */
table.TableContent td,
.TableContainer td,
.Content .BoxContent td {
  padding: 5px 10px !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #e2e8f0 !important;
  font-family: var(--font-body) !important;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
  background-color: transparent !important;
}

table.TableContent td b,
table.TableContent td strong,
.TableContainer td b,
.TableContainer td strong {
  color: #ffffff !important;
  font-size: 12.5px !important;
}

table.TableContent td a,
.TableContainer td a {
  color: var(--gold-light) !important;
  text-decoration: none !important;
}

table.TableContent td a:hover,
.TableContainer td a:hover {
  color: var(--gold-bright) !important;
  text-decoration: underline !important;
}

/* Alternating Rows */
table.TableContent tr[bgcolor],
table.TableContent tr.Odd,
table.TableContent tr.Even,
.TableContainer tr[bgcolor] {
  background: transparent !important;
}

table.TableContent tr:nth-child(even),
.TableContainer table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02) !important;
}

table.TableContent tr:nth-child(odd),
.TableContainer table tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.045) !important;
}

table.TableContent tr:hover,
.TableContainer table tr:hover {
  background: rgba(212, 175, 55, 0.09) !important;
}

/* Highlighted / Label columns */
td.LabelV, td.LabelH, .LabelV, .LabelV175,
table.TableContent td.LabelV175,
table.TableContent td.LabelV,
.TableContainer td.LabelV175,
.TableContainer td.LabelV {
  font-weight: 600 !important;
  color: var(--gold-light) !important;
  width: 25% !important;
}

/* ==========================================================================
   HIGHSCORES PAGE MODERNIZATION
   ========================================================================== */
.hs-container {
  background: var(--bg-card) !important;
  border: 1px solid var(--gold-border) !important;
  border-radius: var(--border-radius-md) !important;
  padding: 16px !important;
  box-sizing: border-box;
}

.hs-cat-tab {
  background: rgba(18, 26, 42, 0.85) !important;
  border: 1px solid var(--gold-border) !important;
  color: var(--gold-light) !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

.hs-cat-tab:hover {
  background: rgba(30, 42, 66, 0.9) !important;
  border-color: var(--gold-bright) !important;
  color: #fff !important;
}

.hs-cat-tab.active {
  background: var(--amber-btn-gradient) !important;
  color: #ffffff !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4) !important;
}

.hs-voc-pill {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
  color: var(--text-secondary) !important;
  border-radius: 14px !important;
  padding: 4px 14px !important;
}

.hs-voc-pill:hover, .hs-voc-pill.active {
  background: var(--gold-primary) !important;
  color: #0b111c !important;
  font-weight: 700 !important;
  border-color: var(--gold-bright) !important;
}

.podium-card {
  background: rgba(14, 20, 32, 0.95) !important;
  border: 1px solid var(--gold-border) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6) !important;
  color: var(--text-primary) !important;
}

.podium-card.rank-1 {
  border-color: var(--gold-bright) !important;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.35) !important;
}

.podium-card.rank-2 {
  border-color: #94a3b8 !important;
}

.podium-card.rank-3 {
  border-color: #d97706 !important;
}

.podium-name a {
  color: var(--gold-bright) !important;
}

.podium-voc {
  color: var(--text-muted) !important;
}

.podium-badge {
  background: rgba(212, 175, 55, 0.15) !important;
  border-color: var(--gold-border) !important;
  color: var(--gold-light) !important;
}

.hs-table-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--gold-border) !important;
  border-radius: 8px !important;
  overflow-x: auto !important;
}

.hs-table th {
  background: linear-gradient(180deg, #1f2b42 0%, #121929 100%) !important;
  color: var(--gold-light) !important;
  border-bottom: 1px solid var(--gold-border) !important;
}

.hs-table td {
  color: var(--text-secondary) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.hs-table tr:hover {
  background: rgba(212, 175, 55, 0.08) !important;
}

.hs-page-btn {
  background: var(--amber-btn-gradient) !important;
  border: 1px solid #f59e0b !important;
  color: #fff !important;
  border-radius: var(--border-radius-sm) !important;
}

/* ==========================================================================
   MODERN FORM INPUTS & BUTTONS
   ========================================================================== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
  background: var(--bg-input) !important;
  border: 1px solid var(--gold-border) !important;
  border-radius: var(--border-radius-sm) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  border-color: var(--gold-bright) !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
}

/* Modern Primary Buttons */
.BigButton,
input[type="submit"],
button[type="submit"],
.btn-primary,
.modern-btn,
.MediumButtonBackground {
  background: var(--amber-btn-gradient) !important;
  border: 1px solid #f59e0b !important;
  border-radius: var(--border-radius-sm) !important;
  color: #ffffff !important;
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
  padding: 0 !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  box-shadow: var(--shadow-btn), inset 0 1px 0 rgba(255,255,255,0.25) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 160px !important;
  height: 38px !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  background-image: var(--amber-btn-gradient) !important;
}

.BigButtonOver, #LoginButtonOver, #LoginButton .Button, .MediumButtonOver {
  display: none !important;
}

.ButtonText, #ButtonText, .BigButtonText, .MediumButtonText {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #ffffff !important;
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  box-shadow: none !important;
}

/* Specific fix for the sidebar Play Now button which should be blue */
#MenuColumn #ButtonText {
  background: var(--blue-btn-gradient) !important;
  border: 1px solid #3b82f6 !important;
}

#ButtonText::before {
  content: 'Play Now!' !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  letter-spacing: 0.2px !important;
  color: #ffd18c !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
  display: block !important;
  visibility: visible !important;
}

#LoginstatusText_2::before {
  content: 'Create Account' !important;
  font-size: 11px;
  font-weight: 400;
  color: #ffffff !important;
  text-decoration: none !important;
  display: block !important;
  visibility: visible !important;
  text-shadow: 1px 1px 1px #000 !important;
}

.BigButton:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
.btn-primary:hover {
  filter: brightness(1.15) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35) !important;
}

/* Secondary Button (Cancel / Back) */
.btn-secondary,
.btn-back {
  background: linear-gradient(180deg, #475569 0%, #334155 100%) !important;
  border: 1px solid #64748b !important;
  color: #f1f5f9 !important;
}

/* ==========================================================================
   MOBILE NAVIGATION HEADER & OFF-CANVAS SLIDE-OUT DRAWER
   ========================================================================== */
#MobileHeader {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 58px;
  background: rgba(7, 12, 22, 0.95);
  border-bottom: 1px solid var(--gold-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  z-index: 9999;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  box-sizing: border-box;
}

.mobile-hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.mobile-hamburger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-hamburger-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-hamburger-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.mobile-logo-img {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-play-btn {
  background: var(--amber-btn-gradient);
  border: 1px solid #f59e0b;
  border-radius: var(--border-radius-sm);
  color: #fff !important;
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 10px;
  text-decoration: none !important;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Mobile Off-Canvas Drawer */
#mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#mobile-nav-overlay.open {
  display: block;
  opacity: 1;
}

#MobileNavDrawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 290px;
  height: 100vh;
  background: #090f1a;
  border-right: 1px solid var(--gold-border);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.85);
  z-index: 10001;
  overflow-y: auto;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px 14px 40px 14px;
  box-sizing: border-box;
}

#MobileNavDrawer.open {
  transform: translateX(320px);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  margin-bottom: 16px;
}

.mobile-drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.mobile-drawer-close:hover {
  color: var(--gold-bright);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (TABLETS & MOBILE SMARTPHONES)
   ========================================================================== */

/* --- TABLETS (768px to 1149px) --- */
@media screen and (min-width: 768px) and (max-width: 1149px) {
  #ContentRow {
    grid-template-columns: 200px 1fr !important;
    padding-top: 130px;
    gap: 14px;
  }

  #ThemeboxesColumn {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-top: 16px !important;
  }

  .BoostedContainer {
    grid-column: 1 / -1;
    max-width: 100% !important;
    justify-content: center;
  }
}

/* --- MOBILE SMARTPHONES (< 768px) --- */
@media screen and (max-width: 767px) {
  #MobileHeader {
    display: flex !important;
  }

  #ArtworkHelper {
    background-size: cover !important;
    background-position: center top !important;
  }

  #ContentRow {
    display: flex !important;
    flex-direction: column !important;
    padding-top: 70px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: 14px !important;
  }

  /* Hide Desktop left sidebar menu in main flow; it's now in the Mobile Drawer */
  #ContentRow #MenuColumn {
    display: none !important;
  }

  #MobileNavDrawerContent #MenuColumn {
    display: block !important;
  }

  #LeftArtwork {
    display: none !important;
  }

  html.FreezeLogo #ContentColumn {
    width: 100% !important;
  }

  /* Legacy wide tables: the scroll lives on the CONTAINERS (.TableContentContainer/
     .InnerTableContainer, overflow-x:auto above) — tables stay display:table so
     colspan and column sizing keep working. One owner: the container scrolls. */
  html.FreezeLogo .BoxContent table.TableContent,
  html.FreezeLogo .InnerTableContainer > table.TableContent {
    max-width: 100% !important;
  }
  html.FreezeLogo .BoxContent table.TableContent td,
  html.FreezeLogo .BoxContent table.TableContent th {
    word-break: break-word !important;
  }
  html.FreezeLogo .BoxContent .Table1,
  html.FreezeLogo .BoxContent .Table2,
  html.FreezeLogo .BoxContent .Table3,
  html.FreezeLogo .BoxContent .Table4,
  html.FreezeLogo .BoxContent .Table5 {
    display: table !important;
    width: 100% !important;
    table-layout: fixed !important;
  }
  /* Nested tables inside fixed layout cells must shrink to the cell, not overflow */
  html.FreezeLogo .BoxContent .Table1 table,
  html.FreezeLogo .BoxContent .Table3 table {
    max-width: 100% !important;
    width: auto !important;
    min-width: 0 !important;
  }
  html.FreezeLogo .BoxContent .Table1 > tbody > tr > td,
  html.FreezeLogo .BoxContent .Table3 > tbody > tr > td {
    display: table-cell !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  html.FreezeLogo .BoxContent .Table1 td > div.InnerTableContainer,
  html.FreezeLogo .BoxContent .Table3 td > div.InnerTableContainer {
    max-width: 100% !important;
    overflow-x: auto !important;
  }
  /* Scroll containers inside table cells must not stretch the cell: cap the chain */
  html.FreezeLogo .BoxContent .InnerTableContainer,
  html.FreezeLogo .BoxContent .TableContentContainer {
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  .Content .Box {
    border-radius: var(--border-radius-md) !important;
    margin-bottom: 16px;
  }

  .Content .BoxContent {
    padding: 12px 10px 16px 10px !important;
  }

  #ThemeboxesColumn {
    width: 100% !important;
    margin-top: 10px !important;
  }

  .BoostedContainer {
    width: 100% !important;
    max-width: 100% !important;
  }

  .hs-podium {
    flex-direction: column !important;
    align-items: center !important;
  }

  .podium-card {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Table responsiveness on mobile */
  table.TableContent td {
    padding: 7px 8px !important;
    font-size: 11.5px !important;
  }

  /* Footer on mobile */
  #Footer {
    font-size: 10px;
    padding: 15px 10px 40px 10px;
  }
}

/* ==========================================================================
   SIDEBAR THEMEBOXES & WIDGETS
   ========================================================================== */
.Themebox {
  background: var(--bg-card) !important;
  border: 1px solid var(--gold-border) !important;
  border-radius: var(--border-radius-md) !important;
  box-shadow: var(--shadow-main) !important;
  backdrop-filter: blur(8px) !important;
  margin-bottom: 18px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  width: 100% !important;
  display: block !important;
  position: relative !important;
  height: auto !important;
  min-height: 100px !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10 !important;
}

.ThemeboxTitle {
  background: linear-gradient(180deg, rgba(28, 38, 60, 0.95) 0%, rgba(16, 23, 37, 0.95) 100%) !important;
  border-bottom: 1px solid var(--gold-border) !important;
  padding: 8px 12px !important;
  text-align: center;
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: 35px;
}

.ThemeboxTitle span {
  font-family: var(--font-heading) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: var(--gold-bright) !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.ThemeboxContent {
  padding: 8px 10px !important;
}

/* Sidebar Highscore Table */
.SidebarHighscoreTable {
  width: 100%;
  border-collapse: collapse;
}

.SidebarHighscoreTable tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.SidebarHighscoreTable tr:hover {
  background: rgba(212, 175, 55, 0.08);
}

.SidebarHighscoreTable tr:last-child {
  border-bottom: none;
}

.SidebarHighscoreRank {
  width: 25px;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 11px;
}

.SidebarHighscoreRank.rank-1 { color: #ffd700; }
.SidebarHighscoreRank.rank-2 { color: #cbd5e1; }
.SidebarHighscoreRank.rank-3 { color: #d97706; }
.SidebarHighscoreRank.rank-others { color: #94a3b8; }

.SidebarHighscoreOutfit {
  width: 36px;
  padding: 4px 0;
}

.OutfitWrapper {
  width: 42px;
  height: 42px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  border-radius: 4px;
}

.OutfitWrapper img {
  width: 66px;
  height: 66px;
  margin-top: -8px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.SidebarHighscoreInfo {
  padding-left: 8px;
}

.SidebarHighscoreName {
  display: block !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 105px !important;
  transition: color 0.2s !important;
}

.SidebarHighscoreName:hover {
  color: var(--gold-bright) !important;
}

.SidebarHighscoreLevel {
  display: block !important;
  font-size: 9px !important;
  color: var(--text-muted) !important;
}

.SidebarHighscoreLevel b {
  color: var(--gold-light) !important;
}

.ThemeboxFooter {
  text-align: center !important;
  padding: 8px 0 4px 0 !important;
  border-top: 1px solid rgba(212, 175, 55, 0.1) !important;
  margin-top: 6px !important;
}

.ThemeboxFooter a {
  font-size: 10px !important;
  color: var(--gold-light) !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  transition: color 0.2s !important;
  display: inline-block !important;
}

.ThemeboxFooter a:hover {
  color: var(--gold-bright) !important;
}

/* --- Smooth Footer --- */
#Footer {
  color: var(--text-muted) !important;
  font-size: 11px;
  line-height: 1.5;
  padding-top: 20px;
  padding-bottom: 30px;
  text-align: center;
}

/* ==========================================================================
   Highscores Modern Dark Fantasy Obsidian Styling
   ========================================================================== */
.hs-table-card {
  background: rgba(13, 17, 23, 0.95) !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
  border-radius: var(--border-radius-md) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  overflow: hidden !important;
}

.hs-table {
  width: 100% !important;
  border-collapse: collapse !important;
}

.hs-table th {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
  color: var(--gold-bright) !important;
  font-family: var(--font-heading) !important;
  font-size: 11px !important;
  letter-spacing: 0.8px !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.35) !important;
}

.hs-table td {
  padding: 9px 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  color: #cbd5e1 !important;
  font-size: 12px !important;
}

.hs-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02) !important;
}

.hs-table tr:nth-child(odd) {
  background: rgba(0, 0, 0, 0.25) !important;
}

.hs-table tr:hover {
  background: rgba(212, 175, 55, 0.08) !important;
}

.hs-rank {
  color: var(--gold-bright) !important;
  font-weight: 700 !important;
}

.hs-outfit-box {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(212, 175, 55, 0.25) !important;
  border-radius: 6px !important;
}

.hs-player-name {
  color: #f8fafc !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.hs-player-name:hover {
  color: var(--gold-bright) !important;
  text-decoration: underline !important;
}

.hs-value-badge {
  color: var(--gold-bright) !important;
  font-weight: 700 !important;
}

.hs-exp-sub {
  color: #94a3b8 !important;
}

.hs-pagination {
  background: rgba(13, 17, 23, 0.95) !important;
  border-top: 1px solid rgba(212, 175, 55, 0.2) !important;
  color: #94a3b8 !important;
  padding: 10px !important;
}

.podium-card {
  background: rgba(13, 17, 23, 0.85) !important;
  border: 1px solid rgba(212, 175, 55, 0.25) !important;
}

.podium-card.rank-1 {
  border-color: rgba(255, 215, 0, 0.6) !important;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.15) !important;
}

.podium-name a {
  color: #f8fafc !important;
}

.podium-name a:hover {
  color: var(--gold-bright) !important;
}

.podium-voc {
  color: #94a3b8 !important;
}

.podium-badge {
  background: rgba(212, 175, 55, 0.15) !important;
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
  color: var(--gold-bright) !important;
}

/* Keep the primary sidebar actions aligned despite the legacy login-box offsets. */
#MenuColumn .SidebarActionButtons {
  gap: 10px !important;
}

#MenuColumn #Loginbox,
#MenuColumn .SmallMenuBox#DownloadBox,
#MenuColumn .SmallBoxButtonContainer,
#MenuColumn #Menu {
  left: auto !important;
  top: auto !important;
}

#MenuColumn #LoginButtonContainer,
#MenuColumn .SmallBoxButtonContainer {
  width: 160px !important;
  height: 38px !important;
}

#MenuColumn #LoginButton,
#MenuColumn #PlayNowContainer {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 160px !important;
  height: 38px !important;
  margin: 0 !important;
}

#MenuColumn #ButtonText,
#MenuColumn .MediumButtonBackground {
  width: 160px !important;
  height: 38px !important;
}

#MenuColumn #Loginbox .Loginstatus {
  position: static !important;
  width: 160px !important;
  height: 38px !important;
  margin: 8px 0 0 !important;
  display: flex !important;
  justify-content: center !important;
}

#MenuColumn #LoginstatusText_2 {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 160px !important;
  min-width: 0 !important;
  height: 38px !important;
  margin: 0 !important;
}

#MenuColumn #LoginstatusText_2::before {
  content: 'Create Account' !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

#MenuColumn .MediumButtonBackground::after {
  content: 'DOWNLOAD CLIENT' !important;
}

/* ==========================================================================
   UX POLISH — Accessibility, Focus, Scrollbar & Reduced Motion (v7)
   ========================================================================== */

/* --- Visible focus for keyboard navigation --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold-bright) !important;
  outline-offset: 2px !important;
  border-radius: var(--border-radius-sm);
}

/* --- Custom scrollbar (WebKit) --- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-dark), var(--gold-primary));
  border-radius: 6px;
  border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* --- Smooth scrolling (with fallback guard) --- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* --- Respect users who prefer reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Footer polish --- */
#Footer {
  font-size: 10px !important;
  letter-spacing: 0.4px;
  color: var(--text-muted) !important;
  padding-bottom: 32px !important;
}
#Footer a {
  color: var(--text-gold);
  text-decoration: none;
  transition: color 0.15s ease;
}
#Footer a:hover {
  color: var(--gold-bright);
}

/* --- Image rendering guards --- */
img {
  max-width: 100%;
  height: auto;
}
