/* TikTok/Reels-Style HTML5 Gaming Platform - Unified Responsive Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Dark Theme Tokens (Default) */
  --bg-primary: #090d16;
  --bg-secondary: #121827;
  --bg-card: rgba(22, 30, 48, 0.75);
  --bg-glass: rgba(15, 22, 36, 0.88);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(99, 102, 241, 0.4);
  
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-primary: #6366f1;
  --accent-hover: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  
  --header-height: 56px;
  --cat-bar-height: 46px;
  --bottom-nav-height: 60px;
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.92);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

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

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

input, textarea, select {
  user-select: text;
  -webkit-user-select: text;
}

/* Base Layout Container */
#app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  position: relative;
}

/* ==========================================================================
   GLOBAL TOP HEADER BAR (Mobile-Optimized)
   ========================================================================== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  display: inline-block;
  background: linear-gradient(135deg, #ffffff 40%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .brand-name {
  background: linear-gradient(135deg, #0f172a 40%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header Branding Display Modes (Configurable from Admin Panel) */
@media (min-width: 769px) {
  .brand-logo.pc-show-both img {
    display: block !important;
  }
  .brand-logo.pc-show-both .brand-name {
    display: inline-block !important;
  }
  .brand-logo.pc-show-logo_only .brand-name {
    display: none !important;
  }
  .brand-logo.pc-show-logo_only img {
    display: block !important;
  }
  .brand-logo.pc-show-name_only img {
    display: none !important;
  }
  .brand-logo.pc-show-name_only .brand-name {
    display: inline-block !important;
  }
}

@media (max-width: 768px) {
  .brand-logo.mobile-show-both img {
    display: block !important;
  }
  .brand-logo.mobile-show-both .brand-name {
    display: inline-block !important;
    font-size: 1rem;
    white-space: nowrap;
  }
  .brand-logo.mobile-show-logo_only .brand-name {
    display: none !important;
  }
  .brand-logo.mobile-show-logo_only img {
    display: block !important;
  }
  .brand-logo.mobile-show-name_only img {
    display: none !important;
  }
  .brand-logo.mobile-show-name_only .brand-name {
    display: inline-block !important;
    font-size: 1.1rem;
    white-space: nowrap;
  }
}

/* Header Search Container */
.header-search {
  flex: 1;
  max-width: 400px;
  margin: 0 1rem;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
}

.header-search input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.header-search .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.search-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Header Controls Right */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle-btn, .header-icon-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle-btn:hover, .header-icon-btn:hover {
  border-color: var(--accent-primary);
  transform: scale(1.05);
}

.mobile-search-trigger {
  display: none;
}

.header-username {
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#headerUserBtn {
  width: auto;
  min-width: 36px;
  padding: 0 0.5rem;
  border-radius: 9999px;
  gap: 0.35rem;
}

/* Mobile Header Breakpoint (<= 768px) */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex !important;
  }

  .app-header {
    height: 54px;
    padding: 0 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .brand-logo img {
    height: 32px;
  }

  /* Hide user and brand text names on mobile nav, keeping clean icons */
  .brand-logo span, .brand-name, .header-user-name, .header-username {
    display: none !important;
  }

  .mobile-search-trigger {
    display: flex !important;
  }

  .theme-toggle-btn {
    display: flex !important;
  }

  /* Expandable Mobile Search Bar */
  .header-search {
    display: none;
  }

  .header-search.mobile-active {
    display: flex !important;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 100%;
    margin: 0;
    padding: 0 0.75rem;
    background: var(--bg-secondary);
    z-index: 110;
    gap: 0.5rem;
  }

  .header-search.mobile-active input {
    font-size: 0.95rem;
    padding-left: 2.25rem;
  }

  .header-search.mobile-active .search-close-btn {
    display: block;
  }

  /* Hide Profile icon on mobile header */
  #headerUserBtn {
    display: none !important;
  }
}

/* ==========================================================================
   MOBILE SLIDE-OUT NAVIGATION DRAWER
   ========================================================================== */
.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 82vw;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  z-index: 1600;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.6);
}

.mobile-drawer.active {
  transform: translateX(0);
}

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

.drawer-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.drawer-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.85rem;
  margin-bottom: 0.25rem;
  padding-left: 0.5rem;
}

.drawer-section-title:first-child {
  margin-top: 0;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.drawer-link:hover, .drawer-link.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

/* ==========================================================================
   TOP NAVIGATION BAR (PC / Desktop View)
   ========================================================================== */
.top-nav-bar {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  height: 50px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

.top-nav-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.top-nav-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-nav-tab .tab-icon {
  font-size: 1rem;
  line-height: 1;
}

.top-nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.top-nav-tab.active {
  color: #ffffff;
  background: var(--accent-gradient);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

/* ==========================================================================
   TOP NAV "MORE" DROPDOWN (Desktop Static Pages & Admin CMS)
   ========================================================================== */
.top-nav-dropdown-wrapper {
  position: relative;
  display: inline-flex;
}

.top-nav-dropdown-btn {
  background: none;
  border: none;
  font-family: inherit;
}

.top-nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 0;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 120;
  display: none;
  flex-direction: column;
}

.top-nav-dropdown-wrapper:hover .top-nav-dropdown-menu,
.top-nav-dropdown-wrapper:focus-within .top-nav-dropdown-menu {
  display: flex;
}

.dropdown-item {
  padding: 0.65rem 1.2rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #ffffff;
  padding-left: 1.4rem;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.4rem 0;
}

/* ==========================================================================
   CATEGORY FILTER PILLS (Used in Category & Trending Views)
   ========================================================================== */
.cat-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.cat-pill:hover, .cat-pill.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   FEED HORIZONTAL CATEGORY BAR
   ========================================================================== */
.feed-category-bar-wrapper {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 20;
  padding: 0.4rem 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  flex-shrink: 0;
}

.feed-category-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  padding: 0.2rem 0.2rem;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.feed-category-bar::-webkit-scrollbar {
  display: none;
}

.feed-category-bar .cat-pill {
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.feed-category-bar .cat-pill:hover {
  transform: translateY(-1px);
  color: var(--text-primary);
  border-color: rgba(99, 102, 241, 0.4);
}

.feed-category-bar .cat-pill.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.feed-category-bar-wrapper + .reels-feed-container {
  height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - 46px);
  height: calc(100dvh - var(--header-height) - var(--bottom-nav-height) - 46px);
}

@media (max-width: 768px) {
  .feed-category-bar-wrapper {
    max-width: 100%;
    padding: 0.3rem 0.5rem;
  }
  .feed-category-bar .cat-pill {
    padding: 0.28rem 0.7rem;
    font-size: 0.74rem;
  }
}

/* ==========================================================================
   MAIN DYNAMIC VIEW CONTAINER
   ========================================================================== */
.main-view-container {
  flex: 1;
  margin-top: var(--header-height);
  margin-bottom: var(--bottom-nav-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  transition: margin-bottom 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   TIKTOK / REELS VERTICAL FEED (Buttery Smooth Scroll-Snap)
   ========================================================================== */
/* ==========================================================================
   PULL / SCROLL TO REFRESH INDICATOR
   ========================================================================== */
.pull-refresh-indicator {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.pull-refresh-indicator.visible {
  opacity: 1;
}

.pull-refresh-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.35);
  user-select: none;
}

.pull-refresh-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.25);
  color: #818cf8;
  font-size: 0.85rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.pull-refresh-indicator.ready .pull-refresh-icon {
  background: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.pull-refresh-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: pullSpinnerSpin 0.75s linear infinite;
}

.pull-refresh-indicator.refreshing .pull-refresh-icon {
  display: none;
}

.pull-refresh-indicator.refreshing .pull-refresh-spinner {
  display: inline-block;
}

.pull-refresh-indicator.refreshing {
  transform: translateX(-50%) translateY(12px) !important;
  opacity: 1 !important;
}

.pull-refresh-indicator.done .pull-refresh-icon {
  display: inline-flex;
  background: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.pull-refresh-indicator.done .pull-refresh-spinner {
  display: none;
}

@keyframes pullSpinnerSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.reels-container,
.reels-feed-container {
  width: 100%;
  max-width: 460px;
  height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
  height: calc(100dvh - var(--header-height) - var(--bottom-nav-height));
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  position: relative;
  border-radius: var(--radius-lg);
  transition: height 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (max-width: 768px) {
  .reels-container,
  .reels-feed-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
}

.reels-container::-webkit-scrollbar,
.reels-feed-container::-webkit-scrollbar {
  width: 4px;
}
.reels-container::-webkit-scrollbar-thumb,
.reels-feed-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

/* Individual Reel Card */
.reel-card {
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.reel-thumbnail-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  background: #000000;
  margin: 0;
  padding: 0;
}

/* Responsive Fullscreen Fixed Thumbnail (100% full screen fix on any device) */
.reel-fullscreen-thumb,
.reel-thumbnail-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  border: none;
  outline: none;
  margin: 0;
  padding: 0;
  transform: scale(1.0);
  transition: transform 0.35s ease;
  user-select: none;
}

.reel-card:hover .reel-fullscreen-thumb,
.reel-card:hover .reel-thumbnail-wrap img {
  transform: scale(1.02);
}

/* Dynamic Game Iframe */
.reel-game-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000000;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

/* When the game is actively playing inside the reel card */
.reel-card.game-playing .reel-game-iframe {
  opacity: 1;
  pointer-events: auto;
}

.reel-card.game-playing .reel-center-play-trigger {
  display: none !important;
}

.reel-card.game-playing .reel-info-box {
  opacity: 0.15;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.reel-card.game-playing:hover .reel-info-box {
  opacity: 1;
  pointer-events: auto;
}

/* Center Glowing Tap-to-Play Trigger on Reel Thumbnail */
.reel-center-play-trigger {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.reel-center-play-trigger:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.reel-center-play-trigger:active {
  transform: translate(-50%, -50%) scale(0.95);
}

.center-play-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.7), 0 0 0 4px rgba(255, 255, 255, 0.25);
  animation: playPulse 2.2s infinite ease-in-out;
}

.center-play-circle .play-triangle {
  font-size: 28px;
  color: #ffffff;
  margin-left: 6px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.center-play-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 14px;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

@keyframes playPulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7), 0 0 30px rgba(99, 102, 241, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(99, 102, 241, 0), 0 0 45px rgba(99, 102, 241, 0.7); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0), 0 0 30px rgba(99, 102, 241, 0.5); }
}

/* Dedicated Swipe Drag Zone for Mobile & Desktop Touch Gestures */
.reel-swipe-strip {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.reel-swipe-strip:active {
  cursor: grabbing;
}

.reel-swipe-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  padding: 4px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.reel-swipe-strip:hover .reel-swipe-pill {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.reel-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 45%, rgba(9,13,22,0.55) 75%, rgba(9,13,22,0.96) 100%);
  z-index: 3;
  pointer-events: none;
}

.reel-info-box {
  position: relative;
  z-index: 3;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: calc(100% - 64px); /* Leave room for right action rail */
}

.reel-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reel-category-badge {
  padding: 0.25rem 0.65rem;
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  user-select: none;
}

.reel-category-badge:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.45);
  filter: brightness(1.1);
}

.reel-rating-badge {
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  color: #facc15;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
}

.reel-plays-badge {
  padding: 0.2rem 0.55rem;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.4);
  backdrop-filter: blur(6px);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.reel-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.reel-description {
  font-size: 0.85rem;
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.reel-play-btn {
  margin-top: 0.4rem;
  padding: 0.75rem 1.4rem;
  background: var(--accent-gradient);
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: fit-content;
}

.reel-play-btn:hover, .reel-play-btn:active {
  transform: scale(1.04);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.6);
}

/* Action Rail (Right Side Controls) */
.reel-action-rail {
  position: absolute;
  right: 0.85rem;
  bottom: 1.5rem;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.action-btn {
  background: rgba(18, 24, 39, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn .action-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.action-btn.active {
  color: var(--accent-pink);
  border-color: var(--accent-pink);
  background: rgba(236, 72, 153, 0.25);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
}

.action-btn.active .action-icon {
  animation: actionBtnPop 0.45s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}

@keyframes actionBtnPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* Floating Animated Heart on Double Tap */
.reel-heart-burst {
  position: absolute;
  pointer-events: none;
  z-index: 15;
  font-size: 5.5rem;
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 0 25px rgba(236, 72, 153, 0.9));
  animation: reelHeartPop 0.85s cubic-bezier(0.17, 0.89, 0.32, 1.25) forwards;
}

@keyframes reelHeartPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(-15deg);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.35) rotate(0deg);
  }
  65% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.12) rotate(6deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -125%) scale(1.6) rotate(-8deg);
  }
}

.action-btn:hover, .action-btn:active {
  transform: scale(1.12);
}

.action-count {
  font-size: 0.65rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}

/* ==========================================================================
   PROMINENT CENTER PLAY BUTTON OVERLAY (On Reel Card Thumbnail)
   ========================================================================== */
.reel-center-play-trigger {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reel-center-play-trigger:hover, .reel-center-play-trigger:active {
  transform: translate(-50%, -50%) scale(1.12);
}

.center-play-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: pulse-ring 2.4s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7), 0 0 25px rgba(99, 102, 241, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(99, 102, 241, 0), 0 0 35px rgba(168, 85, 247, 0.6); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0), 0 0 25px rgba(99, 102, 241, 0.5); }
}

.play-triangle {
  font-size: 1.75rem;
  color: #ffffff;
  margin-left: 5px; /* Visual optical center */
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.center-play-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* ==========================================================================
   PC & DESKTOP TOP MENU & VIEWPORT RESPONSIVENESS (min-width: 769px)
   ========================================================================== */
@media (min-width: 769px) {
  .app-header {
    height: 64px;
    padding: 0 2rem;
  }

  .brand-logo img {
    height: 38px;
  }

  .brand-logo span {
    font-size: 1.35rem;
  }

  .header-search {
    display: flex;
    max-width: 440px;
    margin: 0 auto;
  }

  .header-search input {
    padding: 0.65rem 1.25rem 0.65rem 2.6rem;
    font-size: 0.95rem;
  }

  .top-nav-bar {
    display: flex !important;
  }

  /* Bottom bar is mobile-only */
  .bottom-nav-bar {
    display: none !important;
  }

  .main-view-container {
    margin-top: calc(64px + 50px);
    margin-bottom: 0 !important;
  }

  .reels-feed-container {
    max-width: 440px;
    height: calc(100vh - 64px - 50px - 20px) !important;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 1px solid var(--border-color);
  }
}

/* ==========================================================================
   MOBILE TOP MENU & FEED ADJUSTMENTS (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .app-header {
    height: 54px;
    padding: 0 0.85rem;
  }

  /* Hide the top sub-bar (feed, popular, categories tabs) completely on mobile view */
  .top-nav-bar, .category-filter-bar {
    display: none !important;
  }

  .main-view-container {
    margin-top: 54px;
  }

  .reels-feed-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    height: calc(100vh - 54px - var(--bottom-nav-height));
    height: calc(100dvh - 54px - var(--bottom-nav-height));
    touch-action: pan-y;
  }

  .reel-info-box {
    padding: 1.25rem 1rem;
  }

  .reel-title {
    font-size: 1.25rem;
  }

  .reel-action-rail {
    right: 0.65rem;
    bottom: 1.25rem;
  }
}

/* ==========================================================================
   FULL-SCREEN GAME RUNTIME OVERLAY
   ========================================================================== */
.fullscreen-player-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000000;
  z-index: 1000;
  display: none;
  flex-direction: column;
}

.fullscreen-player-overlay.active {
  display: flex;
}

.player-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 10;
  padding-top: env(safe-area-inset-top, 0px);
}

.player-title {
  display: none !important;
}

.player-close-btn, .player-control-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.player-close-btn:hover, .player-control-btn:hover {
  transform: scale(1.1);
}

.player-iframe-container {
  width: 100%;
  height: 100%;
  border: none;
  background: #000000;
}

.player-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.game-loader-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #090d16;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  gap: 1rem;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transition: transform 0.32s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.28s ease;
  will-change: transform;
}

.bottom-nav-bar.nav-hidden {
  transform: translateY(calc(100% + 20px)) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Full Size Screen View Expansion when Footer Nav is Hidden */
body.nav-hidden {
  --bottom-nav-height: 0px !important;
}

body.nav-hidden .main-view-container {
  margin-bottom: 0 !important;
}

body.nav-hidden .reels-container,
body.nav-hidden .reels-feed-container {
  height: calc(100vh - var(--header-height)) !important;
  height: calc(100dvh - var(--header-height)) !important;
}

body.nav-hidden .feed-category-bar-wrapper + .reels-feed-container {
  height: calc(100vh - var(--header-height) - 46px) !important;
  height: calc(100dvh - var(--header-height) - 46px) !important;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  flex: 1;
  padding: 0.4rem 0;
}

/* Hide Blog tab from bottom nav on mobile */
.bottom-nav-item[data-route="blog"] {
  display: none !important;
}

.bottom-nav-item .nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.bottom-nav-item:hover, .bottom-nav-item.active {
  color: var(--accent-primary);
}

.bottom-nav-item.active .nav-icon {
  transform: scale(1.15);
}

/* ==========================================================================
   GRID VIEWS (Search, Categories, Trending, Profile)
   ========================================================================== */
.content-grid-view {
  width: 100%;
  max-width: 1100px;
  padding: 1.5rem 1rem;
}

.grid-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.games-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

@media (max-width: 768px) {
  .games-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
}

/* Game Grid Card base styles unified in Section: CONTENT GRID & GAME CARDS */

/* ==========================================================================
   MODAL POPUP DIALOGS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-box .auth-tabs-header {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.modal-box .auth-tab-btn {
  cursor: pointer;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}

.modal-box .auth-tab-btn.active {
  color: var(--accent-primary) !important;
}

.modal-box .auth-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -0.55rem;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-primary);
  border-radius: 3px 3px 0 0;
}

.modal-box label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-box .form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-primary);
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-box .form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.modal-box .form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.modal-box small {
  color: var(--text-muted);
  font-size: 0.75rem;
  display: block;
  margin-top: 0.25rem;
}

/* Light Theme Overrides for Auth Modal */
[data-theme="light"] .modal-box {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .modal-box label {
  color: #1e293b !important;
}

[data-theme="light"] .modal-box .form-control {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .modal-box .form-control:focus {
  background: #ffffff !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

[data-theme="light"] .modal-box .form-control::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] .modal-box small {
  color: #64748b !important;
}

[data-theme="light"] .modal-box .auth-tab-btn {
  color: #64748b;
}

[data-theme="light"] .modal-box .auth-tab-btn.active {
  color: #4f46e5 !important;
}

[data-theme="light"] .modal-box .auth-tabs-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {
  .modal-box {
    padding: 1.5rem 1.25rem;
  }
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* Footer has been deprecated and moved to navigation menus */
.app-footer {
  display: none !important;
}

/* ==========================================================================
   BLOG POSTS & ARTICLES SECTION
   ========================================================================== */
.blog-view-wrapper {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
}

.blog-header-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.blog-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0.25rem 0 0 0;
}

.blog-search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.25rem 0.5rem 0.25rem 1rem;
  box-shadow: var(--shadow-sm);
  max-width: 320px;
  width: 100%;
}

.blog-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  flex: 1;
}

.blog-search-box input::placeholder {
  color: var(--text-muted);
}

.blog-search-box button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
  border-radius: 50%;
  color: var(--text-primary);
}

.blog-filter-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.75rem;
  scrollbar-width: none;
}

.blog-filter-chips::-webkit-scrollbar {
  display: none;
}

.blog-chip {
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.blog-chip:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.blog-chip.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg);
}

.blog-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-primary);
  overflow: hidden;
}

.blog-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-thumb-wrap img {
  transform: scale(1.05);
}

.blog-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.blog-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.blog-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0 0 1rem 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
}

.blog-card-author {
  color: var(--text-muted);
  font-weight: 500;
}

.blog-card-cta {
  color: var(--accent-primary);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-cta {
  transform: translateX(4px);
}

/* Single Article Reader View */
.blog-detail-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
}

.blog-breadcrumb {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.blog-back-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.blog-back-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
}

.blog-detail-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  line-height: 1.3;
}

.blog-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.blog-author-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.82rem;
}

.meta-divider {
  color: var(--border-color);
}

.blog-detail-excerpt {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 1.75rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-primary);
}

.blog-hero-image-wrap {
  width: 100%;
  max-height: 420px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.blog-hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-article-content {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.blog-article-content h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin: 2rem 0 0.85rem 0;
  font-weight: 800;
}

.blog-article-content h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin: 1.75rem 0 0.75rem 0;
  font-weight: 700;
}

.blog-article-content p {
  margin: 0 0 1.25rem 0;
}

.blog-article-content ul, .blog-article-content ol {
  margin: 0 0 1.25rem 1.5rem;
  padding: 0;
}

.blog-article-content li {
  margin-bottom: 0.5rem;
}

.blog-article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: rgba(99, 102, 241, 0.08);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-primary);
}

.blog-article-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

.blog-detail-footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}

.blog-related-section {
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .blog-detail-wrapper {
    padding: 1.5rem 1rem;
  }
  .blog-detail-title {
    font-size: 1.5rem;
  }
  .blog-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* Light Mode Overrides for Blog */
[data-theme="light"] .blog-back-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .blog-search-box {
  background: #f8fafc;
  border-color: #cbd5e1;
}

[data-theme="light"] .blog-chip {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

[data-theme="light"] .blog-chip:hover {
  background: #eef2ff;
}

[data-theme="light"] .blog-article-content blockquote {
  background: rgba(99, 102, 241, 0.06);
}

/* ==========================================================================
   USER PROFILE AVATARS & GAMER DASHBOARD STYLES
   ========================================================================== */

/* Header User Avatar Chip */
.header-user-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  padding: 3px 10px 3px 4px !important;
  border-radius: 9999px !important;
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 38px;
}

.header-user-chip:hover {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.user-chip-avatar-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.header-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
  display: block;
}

.user-online-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  border: 1.5px solid var(--bg-primary);
}

/* Bottom Navigation Avatar (Mobile) */
.bottom-nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent-primary);
  vertical-align: middle;
  display: inline-block;
}

/* Profile Dashboard View */
.profile-dashboard-view {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  animation: fadeIn 0.3s ease;
}

.profile-hero-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.profile-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #6366f1, #ec4899, #f59e0b);
}

.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.profile-large-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.4);
  display: block;
}

.profile-avatar-upload-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid var(--bg-secondary);
}

.profile-avatar-upload-badge:hover {
  transform: scale(1.15);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

.profile-user-info {
  flex: 1;
  min-width: 220px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.profile-username {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.5px;
}

.profile-role-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

.profile-role-badge.gamer {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.profile-role-badge.admin {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.profile-role-badge.guest {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.profile-email {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0.35rem 0 0;
}

/* Guest Profile Card */
.profile-guest-card {
  text-align: left;
  position: relative;
}

.profile-guest-avatar-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.profile-guest-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}

.profile-guest-feature-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transition: all 0.2s ease;
}

.profile-guest-feature-item:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.profile-feature-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.profile-guest-feature-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.profile-guest-feature-item small {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
  display: block;
}

.profile-guest-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.5rem;
}

/* Preset Avatars Selector */
.profile-preset-avatars-box {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}

.preset-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preset-avatars-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.preset-avatar-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: visible;
  position: relative;
}

.preset-avatar-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.preset-avatar-btn:hover {
  transform: scale(1.18);
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

.preset-avatar-btn.active {
  border-color: #6366f1;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.85);
  transform: scale(1.15);
}

.preset-avatar-btn.active::after {
  content: '✓';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  border: 1.5px solid var(--bg-secondary);
}

/* Stats Row */
.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.profile-stat-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-stat-item:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-2px);
}

.profile-stat-icon {
  font-size: 1.5rem;
}

.profile-stat-item strong {
  display: block;
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 800;
}

.profile-stat-item small {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

/* Profile Action Buttons */
.profile-actions-bar {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Profile Tabs Header */
.profile-tabs-header {
  display: flex;
  gap: 0.5rem;
  margin: 2rem 0 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.25rem;
}

.profile-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

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

.profile-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

@media (max-width: 600px) {
  .profile-avatar-section {
    flex-direction: column;
    text-align: center;
  }
  .profile-name-row {
    justify-content: center;
  }
  .profile-stats-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   CONTENT GRID & GAME CARDS (Trending, Categories, Favorites, Profile, Search)
   ========================================================================== */
.content-grid-view {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 5rem;
}

.grid-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.games-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 1.25rem;
}

.game-grid-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.game-grid-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35);
}

/* Thumbnail Wrap - Large, Clear, Beautiful Visibility */
.game-grid-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-grid-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.35s ease;
  display: block;
}

.game-grid-card:hover .game-grid-card-thumb-wrap img {
  transform: scale(1.06);
}

/* Play Badge on Thumbnail */
.game-grid-play-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.55);
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  letter-spacing: 0.5px;
  transition: transform 0.2s ease;
}

.game-grid-card:hover .game-grid-play-badge {
  transform: scale(1.08);
}

/* Card Body - ONLY Game Title */
.game-grid-card-body {
  padding: 0.7rem 0.65rem;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
}

.game-grid-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.3;
}

/* Mobile Responsive Grid: 2 games per row, large clear square thumbnail, remaining on scroll */
@media (max-width: 768px) {
  .reels-feed-container {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
  }
  .content-grid-view {
    padding: 0.85rem 0.65rem calc(var(--bottom-nav-height) + 1.25rem) !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .grid-title {
    font-size: 1.2rem !important;
    margin-bottom: 0.7rem !important;
  }
  .games-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  .game-grid-card {
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  }
  .game-grid-card-thumb-wrap {
    aspect-ratio: 1 / 1 !important;
  }
  .game-grid-card-body {
    padding: 0.55rem 0.45rem;
  }
  .game-grid-card-title {
    font-size: 0.82rem;
  }
  .game-grid-play-badge {
    bottom: 6px;
    right: 6px;
    font-size: 0.65rem;
    padding: 3px 8px;
  }
}



