/**
 * WAR ZONE - Master Esports Dark Theme
 * Primary Source of Truth UI Styles
 */

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

:root {
  --bg-primary: #070A12;
  --bg-secondary: #0C0F1D;
  --bg-card: #0F1422;
  --bg-card-hover: #141b2e;
  --bg-modal: #0c101d;
  --text-primary: #EEF2FF;
  --text-secondary: #7A86A0;
  --primary-accent: #F0A500;
  --accent-hover: #FF5E1A;
  --primary-purple: #7C3AED;
  --secondary-purple: #5B21B6;
  --border-color: #182038;
  --border-highlight: #253358;
  --border-glow: rgba(240, 165, 0, 0.28);
  --success: #10D98B;
  --danger: #FF4D6A;
  --info: #3B82F6;
  
  --primary-accent-gradient: linear-gradient(135deg, #F0A500 0%, #FF5E1A 100%);
  --purple-button-gradient: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  --card-gradient: linear-gradient(180deg, rgba(20, 27, 46, 0.6) 0%, rgba(15, 20, 34, 0.95) 100%);
  --header-gradient: linear-gradient(180deg, rgba(7, 10, 18, 0.98) 0%, rgba(12, 15, 29, 0.95) 100%);
  
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --header-height: 64px;
  --bottom-nav-height: 68px;
  --app-max-width: 100%;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-accent: 0 6px 20px rgba(240, 165, 0, 0.25);
  --shadow-purple: 0 6px 20px rgba(124, 58, 237, 0.3);
}

/* ==========================================================
   FLUID RESPONSIVE BREAKPOINT SYSTEM
   ========================================================== */
/* Extra Small Mobile (< 360px) */
@media (max-width: 359px) {
  :root {
    --app-max-width: 100%;
    --header-height: 58px;
    --bottom-nav-height: 64px;
  }
}

/* Mobile (360px - 575px) */
@media (min-width: 360px) and (max-width: 575px) {
  :root {
    --app-max-width: 100%;
  }
}

/* Tablet (576px - 991px) */
@media (min-width: 576px) and (max-width: 991px) {
  :root {
    --app-max-width: 820px;
    --header-height: 66px;
  }
}

/* Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  :root {
    --app-max-width: 1140px;
    --header-height: 70px;
    --bottom-nav-height: 0px;
  }
}

/* Large Desktop (>= 1200px) */
@media (min-width: 1200px) {
  :root {
    --app-max-width: 1360px;
    --header-height: 72px;
    --bottom-nav-height: 0px;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
}

/* ==========================================================
   APP CONTAINER (Responsive Centered Viewport)
   ========================================================== */
.app-container {
  width: 100%;
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-primary);
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  transition: max-width 0.25s ease;
}

@media (min-width: 768px) {
  .app-container {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
  }
}

/* ==========================================================
   FULL-SCREEN LOADING OVERLAY
   ========================================================== */
#appLoadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-primary);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#appLoadingOverlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-logo-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.loader-spinner-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(24, 32, 56, 0.8);
  border-top-color: var(--primary-accent);
  border-right-color: var(--accent-hover);
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  box-shadow: 0 0 20px rgba(240, 165, 0, 0.2);
}

.loader-logo-img {
  width: 68px;
  height: 68px;
  filter: drop-shadow(0 0 12px rgba(240, 165, 0, 0.5));
  animation: pulseLogo 2s infinite ease-in-out;
}

.loader-brand-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 3px;
  background: var(--primary-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.loader-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.loader-subtext {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-align: center;
  max-width: 90%;
}

.loader-bottom-text {
  position: absolute;
  bottom: 24px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  width: 90%;
  max-width: 420px;
  opacity: 0.75;
}

.loader-logo-text-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(240, 165, 0, 0.4)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 18px rgba(240, 165, 0, 0.8)); }
}

/* ==========================================================
   FIXED TOP HEADER & RESPONSIVE NAVIGATION
   ========================================================== */
.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  min-height: var(--header-height);
  height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  background: var(--header-gradient);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 0px) 16px 0 16px;
  z-index: 1100;
  box-sizing: border-box;
  transition: max-width 0.25s ease, height 0.25s ease;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}

.header-back-btn {
  background: rgba(24, 32, 56, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  touch-action: manipulation;
}

.header-back-btn:hover {
  background: var(--border-highlight);
  color: var(--primary-accent);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  overflow: hidden;
}

.header-logo-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  filter: drop-shadow(0 2px 8px rgba(240, 165, 0, 0.4));
  flex-shrink: 0;
  object-fit: contain;
}

.header-brand-name {
  font-size: clamp(15px, 3.8vw, 20px);
  font-weight: 800;
  letter-spacing: 0.8px;
  background: var(--primary-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ==========================================================
   DESKTOP TOP NAVIGATION BAR (Visible on Screens >= 992px)
   ========================================================== */
.desktop-header-nav {
  display: none;
  align-items: center;
  gap: 6px;
}

.desktop-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.desktop-nav-link:hover {
  color: var(--text-primary);
  background: rgba(24, 32, 56, 0.7);
}

.desktop-nav-link.active {
  color: var(--primary-accent);
  background: rgba(240, 165, 0, 0.12);
  border: 1px solid rgba(240, 165, 0, 0.32);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(240, 165, 0, 0.15);
}

.desktop-nav-link i {
  font-size: 15px;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Dedicated Header Login Button (WAR ZONE Purple Theme, Always Visible & Clickable) */
.header-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  height: 42px;
  padding: 0 16px;
  background: var(--purple-button-gradient);
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: var(--shadow-purple);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  user-select: none;
  cursor: pointer;
  touch-action: manipulation;
  box-sizing: border-box;
}

.header-login-btn i {
  font-size: 15px;
  line-height: 1;
  color: #FFFFFF !important;
}

.header-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  filter: brightness(1.06);
  color: #FFFFFF !important;
  text-decoration: none;
}

.header-login-btn:active {
  transform: scale(0.96);
}

@media (max-width: 480px) {
  .app-header {
    padding: env(safe-area-inset-top, 0px) 10px 0 10px;
  }
  .header-right {
    gap: 6px;
  }
  .header-login-btn {
    padding: 0 13px;
    font-size: 12.5px;
    gap: 5px;
    min-height: 40px;
    height: 40px;
  }
}

@media (max-width: 360px) {
  .app-header {
    padding: env(safe-area-inset-top, 0px) 8px 0 8px;
  }
  .header-left {
    gap: 6px;
  }
  .header-brand {
    gap: 6px;
  }
  .header-logo-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
  }
  .header-right {
    gap: 5px;
  }
  .header-login-btn {
    padding: 0 10px;
    font-size: 12px;
    gap: 4px;
    min-height: 38px;
    height: 38px;
    letter-spacing: 0.3px;
  }
  .notif-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    font-size: 14px;
  }
  .header-brand-name {
    font-size: 15px;
    letter-spacing: 0.4px;
  }
}

@media (max-width: 320px) {
  .app-header {
    padding: env(safe-area-inset-top, 0px) 6px 0 6px;
  }
  .header-login-btn {
    padding: 0 8px;
    font-size: 11.5px;
    min-height: 36px;
    height: 36px;
  }
}

/* Wallet Chip */
.wallet-chip {
  background: linear-gradient(135deg, rgba(240, 165, 0, 0.12) 0%, rgba(255, 94, 26, 0.12) 100%);
  border: 1px solid rgba(240, 165, 0, 0.35);
  color: var(--primary-accent);
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(240, 165, 0, 0.12);
  cursor: pointer;
  white-space: nowrap;
}

.wallet-chip:hover {
  background: linear-gradient(135deg, rgba(240, 165, 0, 0.25) 0%, rgba(255, 94, 26, 0.25) 100%);
  border-color: var(--primary-accent);
  box-shadow: 0 4px 14px rgba(240, 165, 0, 0.3);
  transform: translateY(-1px);
}

.wallet-chip i {
  font-size: 14px;
}

/* Notification Button */
.notif-btn {
  background: rgba(24, 32, 56, 0.5);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  position: relative;
  transition: all 0.2s ease;
}

.notif-btn:hover {
  background: var(--border-highlight);
  color: var(--primary-accent);
}

.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 9px;
  height: 9px;
  background-color: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  display: block;
  animation: pulseDot 1.8s infinite;
}

/* Header Avatar Icon */
.header-avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 2px;
  background: var(--primary-accent-gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.header-avatar-btn:hover {
  transform: scale(1.08);
}

.header-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 77, 106, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(255, 77, 106, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 77, 106, 0); }
}

/* ==========================================================
   FIXED BOTTOM NAVIGATION (Mobile & Tablet)
   ========================================================== */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: var(--bottom-nav-height);
  background: var(--header-gradient);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 6px;
  transition: max-width 0.25s ease;
}

.nav-item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  flex: 1;
  height: 100%;
  min-height: 48px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 3px;
  text-decoration: none;
}

.nav-item-btn i {
  font-size: 20px;
  transition: transform 0.25s ease, color 0.25s ease;
}

.nav-item-btn:hover {
  color: var(--text-primary);
}

.nav-item-btn.active {
  color: var(--primary-accent);
  font-weight: 700;
}

.nav-item-btn.active i {
  transform: translateY(-2px) scale(1.12);
  color: var(--primary-accent);
  filter: drop-shadow(0 2px 8px rgba(240, 165, 0, 0.4));
}

.nav-item-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 3px;
  background: var(--primary-accent-gradient);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 10px rgba(240, 165, 0, 0.6);
}

/* ==========================================================
   APP CONTENT VIEWPORT (Responsive Spacing)
   ========================================================== */
.app-content {
  margin-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  margin-bottom: var(--bottom-nav-height);
  padding: 14px 14px 24px 14px;
  flex: 1;
  width: 100%;
}

/* Desktop Adaptive Navigation Switch */
@media (min-width: 992px) {
  .app-bottom-nav {
    display: none !important;
  }
  .desktop-header-nav {
    display: flex;
  }
  .app-content {
    margin-bottom: 0;
    padding: 24px 20px 48px 20px;
  }
}

/* ==========================================================
   NOTICE MARQUEE BAR
   ========================================================== */
.notice-marquee-wrap {
  background: linear-gradient(90deg, #F0A500 0%, #FF5E1A 100%);
  color: #070A12;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(240, 165, 0, 0.25);
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
}

.notice-icon {
  font-size: 16px;
  color: #070A12;
  animation: pulseIcon 1.5s infinite;
  flex-shrink: 0;
}

.notice-marquee {
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  flex: 1;
}

.notice-marquee-inner {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 24s linear infinite;
}

.notice-marquee:hover .notice-marquee-inner {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-100%, 0); }
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ==========================================================
   PROMOTION SLIDER (Standard YouTube Thumbnail 16:9 Responsive System)
   ========================================================== */
.promo-slider-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
}

.promo-slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
  height: 100%;
}

.promo-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.promo-banner-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}

.promo-slide.no-link {
  cursor: default;
}

.promo-slide img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.promo-banner-link:hover img {
  transform: scale(1.015);
}

/* Maintain strictly 16:9 on all responsive viewports */
@media (min-width: 320px) {
  .promo-slider-container,
  .promo-slide {
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 576px) {
  .promo-slider-container,
  .promo-slide {
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 1024px) {
  .promo-slider-container,
  .promo-slide {
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 1440px) {
  .promo-slider-container,
  .promo-slide {
    aspect-ratio: 16 / 9;
  }
}

.promo-indicators {
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 5;
}

.promo-dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.promo-dot.active {
  width: 20px;
  background: var(--primary-accent);
  box-shadow: 0 0 6px var(--primary-accent);
}

/* ==========================================================
   MY CONTESTS CARDS (Upcoming, Ongoing, Completed)
   ========================================================== */
.section-title {
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 0.3px;
}

.section-title i {
  color: var(--primary-accent);
  margin-right: 6px;
}

.contests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

@media (min-width: 576px) {
  .contests-grid {
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .contests-grid {
    gap: 16px;
  }
  .contest-card {
    padding: 16px 12px;
  }
}

.contest-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.contest-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.contest-card.upcoming::before { background: var(--primary-accent-gradient); }
.contest-card.ongoing::before { background: linear-gradient(90deg, #10D98B, #3B82F6); }
.contest-card.completed::before { background: var(--purple-button-gradient); }

.contest-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
}

.contest-card:hover::before {
  opacity: 1;
}

.contest-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 6px;
}

.contest-card.upcoming .contest-icon-box {
  background: rgba(240, 165, 0, 0.12);
  color: var(--primary-accent);
}

.contest-card.ongoing .contest-icon-box {
  background: rgba(16, 217, 139, 0.12);
  color: var(--success);
}

.contest-card.completed .contest-icon-box {
  background: rgba(124, 58, 237, 0.12);
  color: var(--primary-purple);
}

.contest-count {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.contest-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ==========================================================
   ESPORT GAMES SECTION
   ========================================================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 576px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (min-width: 992px) {
  .games-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1200px) {
  .games-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
  }
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.game-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(240, 165, 0, 0.5);
  box-shadow: 0 8px 24px rgba(240, 165, 0, 0.2);
}

.game-image-wrap {
  width: 100%;
  height: 108px;
  position: relative;
  overflow: hidden;
}

.game-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-card:hover .game-image-wrap img {
  transform: scale(1.08);
}

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(7, 10, 18, 0.1) 0%, rgba(15, 20, 34, 0.95) 100%);
}

.game-info {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
}

.game-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-tag {
  font-size: 10px;
  color: var(--primary-accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================
   TOURNAMENT TABS
   ========================================================== */
.tournament-tabs-wrap {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 14px;
}

.tab-btn {
  flex: 1;
  padding: 8px 0;
  min-height: 40px;
  text-align: center;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
}

.tab-btn.active {
  background: var(--primary-accent-gradient);
  color: #070A12;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(240, 165, 0, 0.35);
}

/* ==========================================================
   TOURNAMENT CARD (Device-Adaptive Responsive Grid)
   ========================================================== */
.tournament-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 576px) {
  .tournament-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 992px) {
  .tournament-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

.tournament-card {
  background: var(--card-gradient);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.28s ease;
  position: relative;
}

.tournament-card:hover {
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-md);
}

.tournament-banner-box {
  width: 100%;
  height: 140px;
  position: relative;
  overflow: hidden;
}

.tournament-banner-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tournament-banner-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(7, 10, 18, 0.2) 0%, rgba(15, 20, 34, 0.98) 100%);
}

.tournament-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.badge-tag {
  background: rgba(7, 10, 18, 0.85);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.badge-mode {
  background: rgba(124, 58, 237, 0.25);
  border-color: var(--primary-purple);
  color: #c4b5fd;
}

.badge-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 2;
  letter-spacing: 0.5px;
}

.badge-status.upcoming {
  background: rgba(240, 165, 0, 0.2);
  border: 1px solid var(--primary-accent);
  color: var(--primary-accent);
}

.badge-status.ongoing {
  background: rgba(16, 217, 139, 0.2);
  border: 1px solid var(--success);
  color: var(--success);
  animation: pulseDot 2s infinite;
}

.badge-status.result {
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid var(--primary-purple);
  color: #c4b5fd;
}

.tournament-banner-title {
  position: absolute;
  bottom: 8px;
  left: 12px;
  right: 12px;
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.tournament-body {
  padding: 12px;
}

/* Schedule & Countdown */
.tournament-time-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 10, 18, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  margin-bottom: 12px;
}

.schedule-text {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.countdown-timer {
  color: var(--primary-accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Prize & Entry Fee Grid */
.tournament-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(12, 15, 29, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
  margin-bottom: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.stat-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

.stat-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-value.prize { color: var(--primary-accent); }
.stat-value.fee { color: #10D98B; }

/* Progress Bar (Spots remaining) */
.tournament-capacity-box {
  margin-bottom: 14px;
}

.capacity-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.spots-remaining {
  color: var(--primary-accent);
  font-weight: 600;
}

.capacity-progress {
  width: 100%;
  height: 6px;
  background-color: #182038;
  border-radius: 3px;
  overflow: hidden;
}

.capacity-progress-bar {
  height: 100%;
  background: var(--primary-accent-gradient);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Action Buttons (Touch Friendly) */
.tournament-actions {
  display: flex;
  gap: 8px;
}

.btn-details {
  flex: 1;
  background: rgba(24, 32, 56, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 9px 0;
  min-height: 42px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-details:hover {
  background: var(--border-highlight);
  color: var(--primary-accent);
}

.btn-join {
  flex: 1.3;
  background: var(--purple-button-gradient);
  color: #fff;
  padding: 9px 0;
  min-height: 42px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-join:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

.btn-join.joined {
  background: rgba(16, 217, 139, 0.2);
  border: 1px solid var(--success);
  color: var(--success);
  box-shadow: none;
}

.btn-room {
  flex: 1.3;
  background: var(--primary-accent-gradient);
  color: #070A12;
  padding: 9px 0;
  min-height: 42px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-results {
  flex: 1.3;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid var(--primary-purple);
  color: #c4b5fd;
  padding: 9px 0;
  min-height: 42px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* ==========================================================
   WALLET VIEW & CARDS (Adaptive Responsive System)
   ========================================================== */
.wallet-hero-card {
  background: linear-gradient(135deg, #161D36 0%, #0F1424 100%);
  border: 1px solid rgba(240, 165, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.wallet-hero-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(240, 165, 0, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.wallet-hero-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.wallet-hero-balance {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  background: var(--primary-accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .wallet-hero-card {
    padding: 28px;
  }
}

@media (min-width: 992px) {
  .wallet-hero-card {
    padding: 32px;
  }
}

.wallet-balances-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.wallet-sub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.wallet-sub-title {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.wallet-sub-amount {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.wallet-actions-row {
  display: flex;
  gap: 10px;
}

.btn-add-money {
  flex: 1;
  background: var(--primary-accent-gradient);
  color: #070A12;
  padding: 12px 0;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.btn-add-money:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(240, 165, 0, 0.4);
}

.btn-withdraw {
  flex: 1;
  background: var(--purple-button-gradient);
  color: #fff;
  padding: 12px 0;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.btn-withdraw:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.5);
}

/* Transactions List */
.transactions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px 0;
}

.tx-filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.tx-chip {
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.tx-chip.active {
  background: var(--primary-accent);
  border-color: var(--primary-accent);
  color: #070A12;
}

.transaction-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.tx-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tx-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.tx-icon.credit {
  background: rgba(16, 217, 139, 0.12);
  color: var(--success);
}

.tx-icon.debit {
  background: rgba(255, 77, 106, 0.12);
  color: var(--danger);
}

.tx-details {
  display: flex;
  flex-direction: column;
}

.tx-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.tx-date {
  font-size: 11px;
  color: var(--text-secondary);
}

.tx-right {
  text-align: right;
}

.tx-amount {
  font-size: 14px;
  font-weight: 800;
}

.tx-amount.credit { color: var(--success); }
.tx-amount.debit { color: var(--danger); }

.tx-status-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: capitalize;
}

.tx-status-badge.success { background: rgba(16, 217, 139, 0.15); color: var(--success); }
.tx-status-badge.pending { background: rgba(240, 165, 0, 0.15); color: var(--primary-accent); }
.tx-status-badge.failed { background: rgba(255, 77, 106, 0.15); color: var(--danger); }

/* ==========================================================
   PROFILE VIEW
   ========================================================== */
.profile-card {
  background: var(--card-gradient);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.profile-avatar-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px auto;
  position: relative;
  padding: 3px;
  background: var(--primary-accent-gradient);
}

.profile-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card);
}

.profile-ign {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.profile-email {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(7, 10, 18, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 4px;
}

.profile-stat-box {
  display: flex;
  flex-direction: column;
}

.profile-stat-box:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.pstat-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-accent);
}

.pstat-lbl {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Profile Menu */
.profile-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  width: 100%;
  text-align: left;
}

.profile-menu-item:last-child {
  border-bottom: none;
}

.profile-menu-item:hover {
  background: var(--bg-card-hover);
  color: var(--primary-accent);
}

.menu-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-left i {
  font-size: 18px;
  color: var(--primary-accent);
}

.menu-left.danger i {
  color: var(--danger);
}

.profile-menu-item:hover .menu-left.danger {
  color: var(--danger);
}

/* ==========================================================
   MODALS (Dark Glassmorphism)
   ========================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 13, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (min-width: 576px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-modal);
  border: 1px solid var(--border-highlight);
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@media (min-width: 576px) {
  .modal-dialog {
    max-width: 520px;
    border-radius: var(--radius-lg);
    transform: scale(0.95);
  }
}

@media (min-width: 992px) {
  .modal-dialog {
    max-width: 560px;
  }
  .modal-dialog.youtube-dialog {
    max-width: 860px !important;
  }
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0);
}

@media (min-width: 576px) {
  .modal-overlay.active .modal-dialog {
    transform: scale(1);
  }
}

.modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: clamp(14px, 1.8vw, 17px);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: rgba(24, 32, 56, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--danger);
  color: #fff;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
}

.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
}

/* ==========================================================
   FORM CONTROLS
   ========================================================== */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.2);
}

.quick-amount-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.amount-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.amount-chip:hover, .amount-chip.active {
  border-color: var(--primary-accent);
  background: rgba(240, 165, 0, 0.12);
  color: var(--primary-accent);
}

/* Room Credentials Box */
.room-cred-box {
  background: rgba(7, 10, 18, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.cred-row:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.cred-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.cred-value-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cred-val {
  font-family: monospace;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-accent);
}

.btn-copy {
  background: rgba(24, 32, 56, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-copy:hover {
  background: var(--primary-accent);
  color: #070A12;
}

.room-warning-note {
  background: rgba(255, 77, 106, 0.1);
  border: 1px solid rgba(255, 77, 106, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 12px;
  color: #ff94a5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ==========================================================
   SKELETON SHIMMER LOADERS
   ========================================================== */
.skeleton {
  background: linear-gradient(90deg, #0F1422 25%, #182038 50%, #0F1422 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-banner {
  width: 100%;
  height: 165px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.skeleton-card {
  width: 100%;
  height: 240px;
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}

/* ==========================================================
   TOAST NOTIFICATIONS
   ========================================================== */
#toastContainer {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 420px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.app-toast {
  background: var(--bg-modal);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.app-toast.success {
  border-left: 4px solid var(--success);
}

.app-toast.error {
  border-left: 4px solid var(--danger);
}

.app-toast.info {
  border-left: 4px solid var(--info);
}

.app-toast.warning {
  border-left: 4px solid var(--primary-accent);
}

@keyframes slideInToast {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   EMPTY STATES
   ========================================================== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 42px;
  color: #182038;
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.empty-state-text {
  font-size: 12px;
}


/* 6-Item Bottom Navigation Optimization */
@media (max-width: 412px) {
  .nav-item-btn {
    font-size: 10px;
    gap: 2px;
  }
  .nav-item-btn i {
    font-size: 18px;
  }
}

@media (max-width: 360px) {
  .nav-item-btn {
    font-size: 9px;
  }
  .nav-item-btn i {
    font-size: 16px;
  }
}

/* ==========================================================
   YOUTUBE CHANNEL INTEGRATION STYLES
   ========================================================== */
#viewYoutube {
  animation: fadeInView 0.3s ease-out;
}

@keyframes fadeInView {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Channel Card */
.yt-channel-card {
  background: linear-gradient(135deg, rgba(20, 27, 46, 0.9) 0%, rgba(12, 15, 29, 0.95) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.yt-channel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #FF0000 0%, #FF5E1A 100%);
}

.yt-channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yt-channel-avatar-box {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  position: relative;
  background: #070A12;
  border: 2px solid #FF0000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.yt-channel-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-live-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #10D98B;
  border: 2px solid #070A12;
  border-radius: 50%;
}

.yt-channel-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.yt-channel-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.yt-refresh-btn {
  background: rgba(24, 32, 56, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.25s ease;
  cursor: pointer;
}

.yt-refresh-btn:hover {
  color: var(--primary-accent);
  border-color: var(--primary-accent);
  background: var(--border-highlight);
  transform: rotate(180deg);
}

/* Category Tabs (LIVE, VIDEOS, SHORTS) */
.yt-tabs-container {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: rgba(12, 15, 29, 0.6);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.yt-tab-btn {
  flex: 1;
  padding: 8px 6px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.yt-tab-btn:hover {
  color: var(--text-primary);
}

.yt-tab-btn.active {
  background: var(--bg-card);
  color: var(--primary-accent);
  font-weight: 700;
  border: 1px solid var(--border-highlight);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.yt-tab-btn[data-yttab="live"].active {
  color: #FF4D6A;
  border-color: rgba(255, 77, 106, 0.35);
}

.yt-tab-live-indicator {
  width: 8px;
  height: 8px;
  background-color: #FF0000;
  border-radius: 50%;
  display: inline-block;
  animation: liveBlink 1.4s infinite;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.3); }
}

.yt-tab-badge {
  background: rgba(24, 32, 56, 0.8);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.yt-tab-btn.active .yt-tab-badge {
  background: rgba(240, 165, 0, 0.15);
  color: var(--primary-accent);
}

.yt-tab-btn[data-yttab="live"].active .yt-tab-badge {
  background: rgba(255, 77, 106, 0.2);
  color: #FF4D6A;
}

/* YouTube Responsive Grids */
.yt-grid {
  display: grid;
  gap: 14px;
}

.yt-grid-live, .yt-grid-videos {
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 576px) {
  .yt-grid-live, .yt-grid-videos {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 992px) {
  .yt-grid-live, .yt-grid-videos {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1200px) {
  .yt-grid-live, .yt-grid-videos {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

.yt-grid-shorts {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 576px) {
  .yt-grid-shorts {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (min-width: 992px) {
  .yt-grid-shorts {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1200px) {
  .yt-grid-shorts {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
  }
}

/* Video Card (Standard & Live) */
.yt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.yt-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.yt-thumb-wrap {
  width: 100%;
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #070A12;
  overflow: hidden;
}

.yt-thumb-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.yt-card:hover .yt-thumb-img {
  transform: scale(1.03);
}

.yt-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  color: #EEF2FF;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.yt-live-pill {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #FF0000;
  color: #FFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.5);
}

.yt-upcoming-pill {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #F0A500;
  color: #070A12;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.5px;
}

.yt-card-content {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.yt-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

/* YouTube Shorts Card (Vertical 9:16) */
.yt-short-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  aspect-ratio: 9 / 16;
}

.yt-short-card:hover {
  transform: translateY(-3px);
  border-color: #7C3AED;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

.yt-short-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.yt-short-card:hover .yt-short-thumb {
  transform: scale(1.04);
}

.yt-short-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px 10px;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 10, 18, 0.95) 75%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.yt-short-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(124, 58, 237, 0.85);
  backdrop-filter: blur(4px);
  color: #FFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.yt-short-title {
  font-size: 12px;
  font-weight: 700;
  color: #EEF2FF;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.yt-short-meta {
  font-size: 10px;
  color: #F0A500;
  font-weight: 600;
}

/* Shimmer Loading Skeleton for YouTube */
.yt-skeleton-container {
  display: grid;
  gap: 14px;
}

.yt-skeleton-card {
  height: 200px;
  border-radius: var(--radius-md);
  background: #0F1422;
}

/* ==========================================================
   RESPONSIVE VIDEO PLAYER (16:9 & 9:16 Support)
   ========================================================== */
.video-wrapper,
.yt-video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #000;
  overflow: hidden;
}

.video-wrapper iframe,
.yt-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Modal adjustments for 9:16 Shorts Video Playback */
.yt-video-wrapper.is-short {
  aspect-ratio: 9 / 16 !important;
  padding-top: 0 !important;
  max-width: 340px;
  margin: 0 auto;
}

/* ==========================================================
   TOUCH-FRIENDLY TARGETS & NO-HORIZONTAL-OVERFLOW RULES
   ========================================================== */
button,
.btn-join,
.btn-room,
.btn-details,
.btn-results,
.btn-add-money,
.btn-withdraw,
.nav-item-btn,
.tab-btn,
.yt-tab-btn,
.amount-chip,
.tx-chip,
.desktop-nav-link {
  min-height: 42px;
  touch-action: manipulation;
}

/* Prevent any accidental child element overflow */
pre, code, table {
  max-width: 100%;
  overflow-x: auto;
}

/* ==========================================================
   DEVICE ORIENTATION SUPPORT (Portrait & Landscape)
   ========================================================== */
@media (orientation: landscape) and (max-height: 540px) {
  :root {
    --header-height: 52px;
    --bottom-nav-height: 54px;
  }
  .modal-dialog {
    max-height: 94vh;
  }
  .modal-body {
    max-height: 60vh;
  }
}

/* ==========================================================
   AUTH PAGES RESPONSIVE CENTERED WRAPPER
   ========================================================== */
.auth-page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  width: 100%;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

/* ==========================================================
   DYNAMIC PAYMENT GATEWAY SELECTION CARDS
   ========================================================== */
.payment-gateways-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.payment-gateway-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s ease-in-out;
  position: relative;
  user-select: none;
  touch-action: manipulation;
  width: 100%;
  box-sizing: border-box;
}

.payment-gateway-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(240, 165, 0, 0.3);
  transform: translateY(-1px);
}

.payment-gateway-card.selected {
  background: linear-gradient(135deg, rgba(240, 165, 0, 0.12) 0%, rgba(255, 94, 26, 0.06) 100%);
  border-color: var(--primary-accent);
  box-shadow: 0 0 16px rgba(240, 165, 0, 0.22);
}

.gateway-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.gateway-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(240, 165, 0, 0.12);
  border: 1px solid rgba(240, 165, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary-accent);
  flex-shrink: 0;
}

.payment-gateway-card.selected .gateway-card-icon {
  background: var(--primary-accent);
  color: #070A12;
  box-shadow: 0 2px 8px rgba(240, 165, 0, 0.35);
}

.gateway-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.gateway-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gateway-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.gateway-card-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(240, 165, 0, 0.2);
  color: var(--primary-accent);
  letter-spacing: 0.03em;
}

.gateway-card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gateway-card-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  margin-left: 10px;
}

.payment-gateway-card.selected .gateway-card-radio {
  border-color: var(--primary-accent);
  background: var(--primary-accent);
}

.gateway-card-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #070A12;
  opacity: 0;
  transform: scale(0.4);
  transition: all 0.2s ease;
}

.payment-gateway-card.selected .gateway-card-radio::after {
  opacity: 1;
  transform: scale(1);
}

/* Single Gateway Card Display Variant */
.payment-gateway-card.single-gateway {
  cursor: default;
  border-color: rgba(240, 165, 0, 0.4);
  background: rgba(240, 165, 0, 0.06);
}

.payment-gateway-card.single-gateway .gateway-card-radio {
  background: rgba(16, 217, 139, 0.2);
  border-color: #10D98B;
  color: #10D98B;
  font-size: 12px;
}

.payment-gateway-card.single-gateway .gateway-card-radio::after {
  display: none;
}

/* No Gateway Alert */
.no-gateway-alert {
  background: rgba(255, 94, 26, 0.08);
  border: 1px solid rgba(255, 94, 26, 0.3);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  color: #F8FAFC;
  font-size: 13px;
  line-height: 1.5;
}

/* Automatic Payment Status Pulse Animation */
@keyframes statusPulseAnim {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* ==========================================================
   WAR ZONE UNIFIED FLOATING SUPPORT SYSTEM
   Responsive circular launcher & animated multi-channel contact stack
   Works seamlessly across Mobile, Tablet, Laptop, and PC/Desktop
   ========================================================== */

/* 1. Global Viewport-Level Mounting Container (Prevents any clipping) */
#floating-support-widget,
.floating-support-widget-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99990;
  overflow: visible;
  user-select: none;
}

/* 2. Main Fixed Viewport Wrap */
.wz-contact-launcher-wrap {
  position: fixed;
  z-index: 99991;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* 3. Base Sizing Tokens (Fluid Across Breakpoints) */
/* Default Mobile / Base (< 769px) */
.wz-launcher-main-btn {
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
}
.wz-launcher-item {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
}
.wz-main-icon svg {
  width: 26px;
  height: 26px;
}
.wz-main-icon.wz-icon-close svg {
  width: 22px;
  height: 22px;
}
.wz-item-icon svg {
  width: 22px;
  height: 22px;
}

/* Tablet (769px to 991px) */
@media (min-width: 769px) and (max-width: 991px) {
  .wz-launcher-main-btn {
    width: 62px;
    height: 62px;
    min-width: 62px;
    min-height: 62px;
  }
  .wz-launcher-item {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
  .wz-main-icon svg {
    width: 28px;
    height: 28px;
  }
  .wz-main-icon.wz-icon-close svg {
    width: 24px;
    height: 24px;
  }
  .wz-item-icon svg {
    width: 23px;
    height: 23px;
  }
}

/* Desktop & Laptop (>= 992px) */
@media (min-width: 992px) {
  .wz-launcher-main-btn {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
  }
  .wz-launcher-item {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
  }
  .wz-main-icon svg {
    width: 30px;
    height: 30px;
  }
  .wz-main-icon.wz-icon-close svg {
    width: 26px;
    height: 26px;
  }
  .wz-item-icon svg {
    width: 25px;
    height: 25px;
  }
}

/* 4. Base Positioning Coordinates */
.wz-contact-launcher-wrap.pos-bottom-right,
.wz-contact-launcher-wrap.pos-right {
  right: var(--wz-offset-x, 24px);
  bottom: var(--wz-offset-y, 24px);
  left: auto;
  top: auto;
  transform: none;
}
.wz-contact-launcher-wrap.pos-bottom-left,
.wz-contact-launcher-wrap.pos-left {
  left: var(--wz-offset-x, 24px);
  bottom: var(--wz-offset-y, 24px);
  right: auto;
  top: auto;
  transform: none;
}
.wz-contact-launcher-wrap.pos-middle-right {
  top: 50%;
  bottom: auto;
  right: var(--wz-offset-x, 24px);
  left: auto;
  transform: translateY(-50%);
}
.wz-contact-launcher-wrap.pos-middle-left {
  top: 50%;
  bottom: auto;
  left: var(--wz-offset-x, 24px);
  right: auto;
  transform: translateY(-50%);
}
.wz-contact-launcher-wrap.pos-top-right {
  top: var(--wz-offset-y, 24px);
  bottom: auto;
  right: var(--wz-offset-x, 24px);
  left: auto;
  transform: none;
}
.wz-contact-launcher-wrap.pos-top-left {
  top: var(--wz-offset-y, 24px);
  bottom: auto;
  left: var(--wz-offset-x, 24px);
  right: auto;
  transform: none;
}

/* 5. Mobile Responsive Positioning (<= 768px): Safely clears Bottom Navigation bar (68px) */
@media (max-width: 768px) {
  .wz-contact-launcher-wrap.pos-bottom-right,
  .wz-contact-launcher-wrap.pos-right,
  .wz-contact-launcher-wrap.pos-mobile-bottom-right {
    right: var(--wz-offset-x, 16px);
    left: auto;
    bottom: var(--wz-mobile-bottom-offset, calc(var(--bottom-nav-height, 68px) + 20px + env(safe-area-inset-bottom, 0px)));
    top: auto;
    transform: none;
  }
  .wz-contact-launcher-wrap.pos-bottom-left,
  .wz-contact-launcher-wrap.pos-left,
  .wz-contact-launcher-wrap.pos-mobile-bottom-left {
    left: var(--wz-offset-x, 16px);
    right: auto;
    bottom: var(--wz-mobile-bottom-offset, calc(var(--bottom-nav-height, 68px) + 20px + env(safe-area-inset-bottom, 0px)));
    top: auto;
    transform: none;
  }
  .wz-contact-launcher-wrap.pos-mobile-top-right {
    top: calc(var(--header-height, 64px) + 14px);
    bottom: auto;
    right: var(--wz-offset-x, 16px);
    left: auto;
    transform: none;
  }
  .wz-contact-launcher-wrap.pos-mobile-top-left {
    top: calc(var(--header-height, 64px) + 14px);
    bottom: auto;
    left: var(--wz-offset-x, 16px);
    right: auto;
    transform: none;
  }
}

/* 6. Tablet Responsive Positioning (769px to 991px):
   CRITICAL FIX: Bottom navigation bar is 68px on Tablet.
   Widget must clear 68px + offset so it is NEVER hidden behind bottom nav! */
@media (min-width: 769px) and (max-width: 991px) {
  .wz-contact-launcher-wrap.pos-bottom-right,
  .wz-contact-launcher-wrap.pos-tablet-bottom-right {
    right: var(--wz-offset-x, 22px);
    bottom: calc(var(--bottom-nav-height, 68px) + var(--wz-offset-y, 22px));
    left: auto;
    top: auto;
    transform: none;
  }
  .wz-contact-launcher-wrap.pos-bottom-left,
  .wz-contact-launcher-wrap.pos-tablet-bottom-left {
    left: var(--wz-offset-x, 22px);
    bottom: calc(var(--bottom-nav-height, 68px) + var(--wz-offset-y, 22px));
    right: auto;
    top: auto;
    transform: none;
  }
  .wz-contact-launcher-wrap.pos-middle-right,
  .wz-contact-launcher-wrap.pos-tablet-middle-right {
    top: 50%;
    bottom: auto;
    right: var(--wz-offset-x, 22px);
    left: auto;
    transform: translateY(-50%);
  }
  .wz-contact-launcher-wrap.pos-middle-left,
  .wz-contact-launcher-wrap.pos-tablet-middle-left {
    top: 50%;
    bottom: auto;
    left: var(--wz-offset-x, 22px);
    right: auto;
    transform: translateY(-50%);
  }
  .wz-contact-launcher-wrap.pos-top-right,
  .wz-contact-launcher-wrap.pos-tablet-top-right {
    top: calc(var(--header-height, 66px) + var(--wz-offset-y, 20px));
    bottom: auto;
    right: var(--wz-offset-x, 22px);
    left: auto;
    transform: none;
  }
  .wz-contact-launcher-wrap.pos-top-left,
  .wz-contact-launcher-wrap.pos-tablet-top-left {
    top: calc(var(--header-height, 66px) + var(--wz-offset-y, 20px));
    bottom: auto;
    left: var(--wz-offset-x, 22px);
    right: auto;
    transform: none;
  }
}

/* 7. Desktop & Laptop Responsive Positioning (>= 992px)
   Bottom navigation is hidden. Widget sits above footer and content. */
@media (min-width: 992px) {
  .wz-contact-launcher-wrap.pos-bottom-right,
  .wz-contact-launcher-wrap.pos-desktop-bottom-right {
    right: var(--wz-offset-x, 28px);
    bottom: var(--wz-offset-y, 28px);
    left: auto;
    top: auto;
    transform: none;
  }
  .wz-contact-launcher-wrap.pos-bottom-left,
  .wz-contact-launcher-wrap.pos-desktop-bottom-left {
    left: var(--wz-offset-x, 28px);
    bottom: var(--wz-offset-y, 28px);
    right: auto;
    top: auto;
    transform: none;
  }
  .wz-contact-launcher-wrap.pos-middle-right,
  .wz-contact-launcher-wrap.pos-desktop-middle-right {
    top: 50%;
    bottom: auto;
    right: var(--wz-offset-x, 28px);
    left: auto;
    transform: translateY(-50%);
  }
  .wz-contact-launcher-wrap.pos-middle-left,
  .wz-contact-launcher-wrap.pos-desktop-middle-left {
    top: 50%;
    bottom: auto;
    left: var(--wz-offset-x, 28px);
    right: auto;
    transform: translateY(-50%);
  }
  .wz-contact-launcher-wrap.pos-top-right,
  .wz-contact-launcher-wrap.pos-desktop-top-right {
    top: calc(var(--header-height, 72px) + var(--wz-offset-y, 24px));
    bottom: auto;
    right: var(--wz-offset-x, 28px);
    left: auto;
    transform: none;
  }
  .wz-contact-launcher-wrap.pos-top-left,
  .wz-contact-launcher-wrap.pos-desktop-top-left {
    top: calc(var(--header-height, 72px) + var(--wz-offset-y, 24px));
    bottom: auto;
    left: var(--wz-offset-x, 28px);
    right: auto;
    transform: none;
  }
}

/* 8. Expansion Direction Layouts */
/* UP (Default vertical stack expanding upwards) */
.wz-contact-launcher-wrap.dir-up {
  flex-direction: column;
}
.wz-contact-launcher-wrap.dir-up .wz-launcher-stack {
  flex-direction: column-reverse;
  margin-bottom: 12px;
}

/* DOWN */
.wz-contact-launcher-wrap.dir-down {
  flex-direction: column-reverse;
}
.wz-contact-launcher-wrap.dir-down .wz-launcher-stack {
  flex-direction: column;
  margin-top: 12px;
}

/* LEFT */
.wz-contact-launcher-wrap.dir-left {
  flex-direction: row;
}
.wz-contact-launcher-wrap.dir-left .wz-launcher-stack {
  flex-direction: row-reverse;
  margin-right: 12px;
}

/* RIGHT */
.wz-contact-launcher-wrap.dir-right {
  flex-direction: row-reverse;
}
.wz-contact-launcher-wrap.dir-right .wz-launcher-stack {
  flex-direction: row;
  margin-left: 12px;
}

/* 9. Outside-Click Scrim Backdrop */
.wz-launcher-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 99980;
  pointer-events: none;
  opacity: 0;
  display: none;
}
.wz-contact-launcher-wrap.is-open .wz-launcher-backdrop {
  display: block;
  pointer-events: auto;
}

/* 10. Vertical Stack of Circular Contact Items */
.wz-launcher-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 99992;
}

/* 11. Individual Round Circular Contact Buttons */
.wz-launcher-item {
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  outline: none;
  cursor: pointer;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px) scale(0.5);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  z-index: 99993;
  flex-shrink: 0;
}

/* Brand Button Presets */
.wz-launcher-item.wz-item-whatsapp {
  background-color: #25D366;
  color: #FFFFFF;
}
.wz-launcher-item.wz-item-telegram {
  background-color: #0088cc;
  color: #FFFFFF;
}
.wz-launcher-item.wz-item-email {
  background-color: #EA4335;
  color: #FFFFFF;
}
.wz-launcher-item.wz-item-phone {
  background-color: #10B981;
  color: #FFFFFF;
}
.wz-launcher-item.wz-item-contact,
.wz-launcher-item.wz-item-support {
  background-color: var(--primary-accent, #F0A500);
  color: #070A12;
}
.wz-launcher-item.wz-item-discord {
  background-color: #5865F2;
  color: #FFFFFF;
}
.wz-launcher-item.wz-item-instagram {
  background-color: #E1306C;
  color: #FFFFFF;
}
.wz-launcher-item.wz-item-youtube {
  background-color: #FF0000;
  color: #FFFFFF;
}
.wz-launcher-item.wz-item-facebook {
  background-color: #1877F2;
  color: #FFFFFF;
}
.wz-launcher-item.wz-item-messenger {
  background-color: #0084FF;
  color: #FFFFFF;
}

/* Custom Overrides & Theme Inheritance */
.wz-launcher-item.use-theme {
  background: var(--primary-accent-gradient, var(--primary-accent, #F0A500)) !important;
  color: #070A12 !important;
}
.wz-launcher-item[style*="--btn-custom-bg"] {
  background-color: var(--btn-custom-bg) !important;
}
.wz-launcher-item[style*="--icon-custom-color"] {
  color: var(--icon-custom-color) !important;
}

.wz-launcher-item .wz-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Open Animation - Smooth Staggered Cascade */
.wz-contact-launcher-wrap.is-open .wz-launcher-item {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: calc(var(--item-index, 0) * 45ms);
}

.wz-contact-launcher-wrap.dir-left.is-open .wz-launcher-item,
.wz-contact-launcher-wrap.dir-right.is-open .wz-launcher-item {
  transform: translateX(0) scale(1);
}

.wz-launcher-item:hover {
  transform: scale(1.15) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 18px var(--border-glow, rgba(240, 165, 0, 0.45));
}
.wz-launcher-item:active {
  transform: scale(0.92) !important;
}

/* 12. Desktop Tooltip Flyout */
.wz-item-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: rgba(10, 15, 29, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 99996;
  font-family: inherit;
}

/* Tooltip on left-aligned launchers points to the right */
.wz-contact-launcher-wrap.pos-bottom-left .wz-item-tooltip,
.wz-contact-launcher-wrap.pos-middle-left .wz-item-tooltip,
.wz-contact-launcher-wrap.pos-top-left .wz-item-tooltip,
.wz-contact-launcher-wrap.pos-desktop-bottom-left .wz-item-tooltip,
.wz-contact-launcher-wrap.pos-desktop-middle-left .wz-item-tooltip,
.wz-contact-launcher-wrap.pos-desktop-top-left .wz-item-tooltip {
  right: auto;
  left: calc(100% + 12px);
  transform: translateY(-50%) translateX(-8px);
}

@media (min-width: 992px) {
  .wz-launcher-item:hover .wz-item-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
  }
}

/* Mobile & Tablet: Tooltips strictly hidden for clean touch UI */
@media (max-width: 991px) {
  .wz-item-tooltip {
    display: none !important;
  }
}

/* 13. Main Circular Floating Launcher Button */
.wz-launcher-main-btn {
  pointer-events: auto;
  border-radius: 50% !important;
  background: var(--primary-accent-gradient, linear-gradient(135deg, #F0A500 0%, #FF5E1A 100%));
  color: #070A12;
  border: 2px solid rgba(255, 255, 255, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6), 0 0 20px var(--border-glow, rgba(240, 165, 0, 0.45));
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.24s ease, background 0.24s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  position: relative;
  z-index: 99995;
  flex-shrink: 0;
}

.wz-launcher-main-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 26px var(--border-glow, rgba(240, 165, 0, 0.6));
}

.wz-launcher-main-btn:active {
  transform: scale(0.94);
}

/* Dual Icon Transformation: Chat Icon <-> Close X Icon */
.wz-main-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wz-main-icon.wz-icon-chat {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.wz-main-icon.wz-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.wz-contact-launcher-wrap.is-open .wz-main-icon.wz-icon-chat {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}
.wz-contact-launcher-wrap.is-open .wz-main-icon.wz-icon-close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Breathing Glow Animation */
@keyframes wzContactLauncherPulse {
  0% {
    box-shadow: 0 0 0 0 var(--border-glow, rgba(240, 165, 0, 0.55)), 0 8px 24px rgba(0, 0, 0, 0.55);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(0, 0, 0, 0), 0 8px 24px rgba(0, 0, 0, 0.55);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0), 0 8px 24px rgba(0, 0, 0, 0.55);
  }
}

.wz-launcher-main-btn.has-pulse {
  animation: wzContactLauncherPulse 2.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.wz-contact-launcher-wrap.is-open .wz-launcher-main-btn {
  background: var(--wz-close-bg, #FF4D6A) !important;
  color: #FFFFFF !important;
  box-shadow: 0 8px 26px rgba(255, 77, 106, 0.6), 0 0 18px rgba(255, 77, 106, 0.45) !important;
  animation: none !important;
}
.wz-launcher-main-btn.has-pulse:hover {
  animation: none;
}

/* 14. Customer Support Page & Card Hover Styles */
.support-channel-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-accent) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.faq-accordion-list details[open] {
  border-color: rgba(240, 165, 0, 0.3) !important;
}
.faq-accordion-list details[open] summary {
  color: var(--primary-accent) !important;
}

/* 15. Permanent Global Floating Contact Elimination & Customer Support Card Styles */
#floating-support-widget,
#floatingContactWidget,
#wzContactLauncherWrap,
.wz-contact-launcher-wrap,
.wz-launcher-backdrop,
.wz-launcher-stack,
.wz-launcher-main-btn,
.wz-launcher-item,
.wz-floating-contacts,
.wz-contact-btn,
.floating-contact-container,
.floating-contact-launcher,
.floating-support-btn,
.floating-contact-btn,
.whatsapp-float,
.telegram-float,
.support-bubble,
.chat-bubble-launcher {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  z-index: -9999 !important;
}

/* Customer Support Page Channels Responsive Layout */
.support-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.support-channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.support-channel-card:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 165, 0, 0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

@media (max-width: 640px) {
  .support-channels-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
