/* ==========================================================================
   XEMGAME.TOP - BRIGHT & CHEERFUL DESIGN SYSTEM (CSS)
   ========================================================================== */

:root {
  --primary: #ff6b6b;
  --primary-hover: #ee5253;
  --secondary: #4dabf7;
  --accent-mint: #38d9a9;
  --accent-yellow: #ffd43b;
  --accent-purple: #cc5de8;
  --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
  --card-bg: #ffffff;
  --text-main: #2d3748;
  --text-muted: #718096;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 20px 35px -10px rgba(0, 0, 0, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.08);
  --border-color: #e2e8f0;
}

/* ==========================================================================
   GAME PLAYER PAGE THEME CONTRAST & ADAPTIVE STYLES
   ========================================================================== */
.game-card-wrapper {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

.game-topbar {
  background: #f8fafc;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 12px;
}

.game-player-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
  color: #1e293b !important;
}

.game-info-body {
  background: #ffffff;
  padding: 24px;
  color: #334155;
}

.game-info-body h3,
.game-info-body h4 {
  color: #0f172a !important;
}

.game-badge-box {
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

.comment-item-card {
  background: #f8fafc;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.comment-item-user {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a !important;
}

.comment-item-text {
  font-size: 0.9rem;
  color: #475569 !important;
  margin-top: 4px;
}

/* ==========================================================================
   VIBRANT & RICH CYBER GAMING DARK THEME SYSTEM
   ========================================================================== */
[data-theme="dark"] {
  --bg-gradient: linear-gradient(135deg, #0b0f19 0%, #111827 50%, #0f172a 100%);
  --card-bg: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(99, 102, 241, 0.25);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.1);
  --shadow-hover: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 107, 107, 0.25);
}

[data-theme="dark"] body {
  background: var(--bg-gradient);
  color: var(--text-main);
}

/* Headings & Typography */
[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6 {
  color: #ffffff !important;
}

[data-theme="dark"] p, 
[data-theme="dark"] li {
  color: #cbd5e1;
}

[data-theme="dark"] .game-title {
  color: #f8fafc !important;
}

[data-theme="dark"] .game-meta {
  color: #94a3b8 !important;
}

[data-theme="dark"] .section-title h2, 
[data-theme="dark"] .section-title span {
  color: #f8fafc !important;
}

/* Game Player Page Dark Overrides */
[data-theme="dark"] .game-card-wrapper {
  background: #0f172a !important;
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7) !important;
}

[data-theme="dark"] .game-topbar {
  background: #1e293b !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.25) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .game-player-title {
  color: #ffffff !important;
}

[data-theme="dark"] .game-info-body {
  background: #1e293b !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .game-info-body h3,
[data-theme="dark"] .game-info-body h4 {
  color: #ffffff !important;
}

[data-theme="dark"] .game-badge-box {
  background: #0f172a !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .comment-item-card {
  background: #0f172a !important;
  border: 1px solid rgba(99, 102, 241, 0.2) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .comment-item-user {
  color: #ffffff !important;
}

[data-theme="dark"] .comment-item-text {
  color: #cbd5e1 !important;
}

/* Modal Card in Dark Mode - Vibrant Glassmorphism */
[data-theme="dark"] .modal-card {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%) !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(99, 102, 241, 0.2) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] #authTabs {
  border-bottom-color: rgba(99, 102, 241, 0.3) !important;
}

/* Buttons in Dark Mode */
[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(255, 107, 107, 0.45) !important;
  border: none !important;
}
[data-theme="dark"] .btn-primary:hover {
  background: linear-gradient(135deg, #ee5253 0%, #ff7979 100%) !important;
  box-shadow: 0 6px 26px rgba(255, 107, 107, 0.65) !important;
  transform: translateY(-2px);
}

[data-theme="dark"] .btn-secondary {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}
[data-theme="dark"] .btn-secondary:hover {
  background: #334155 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.25) !important;
}

/* Auth Quick Test Buttons in Dark Mode */
[data-theme="dark"] .auth-quick-btn {
  background: rgba(30, 41, 59, 0.9) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
}
[data-theme="dark"] .auth-quick-btn:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4) !important;
}

/* Category Filter Bar Chips in Dark Mode */
[data-theme="dark"] .cat-chip {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
[data-theme="dark"] .cat-chip:hover, 
[data-theme="dark"] .cat-chip.active {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: #ffffff !important;
  border-color: #ff6b6b;
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.45);
}

/* Heart Favorite Button on Game Cards in Dark Mode */
[data-theme="dark"] .fav-btn {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  color: #94a3b8 !important;
}
[data-theme="dark"] .fav-btn.active,
[data-theme="dark"] .fav-btn:hover {
  background: #1e293b !important;
  color: #ff6b6b !important;
  border-color: #ff6b6b !important;
  box-shadow: 0 0 14px rgba(255, 107, 107, 0.5) !important;
}

/* Header Navbar in Dark Mode */
[data-theme="dark"] .navbar {
  background: rgba(15, 23, 42, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.25) !important;
}

/* Search Input in Dark Mode */
[data-theme="dark"] .search-input {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #ffffff !important;
}
[data-theme="dark"] .search-input:focus {
  background: #1e293b !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.3) !important;
}
[data-theme="dark"] .search-input::placeholder {
  color: #64748b !important;
}

[data-theme="dark"] .user-profile-btn {
  background: #1e293b !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="dark"] .user-profile-name {
  color: #f8fafc !important;
}

[data-theme="dark"] .btn-secondary {
  background: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
}
[data-theme="dark"] .btn-secondary:hover {
  background: #334155 !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
}

/* Hero Section in Dark Mode */
[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, #311042 0%, #1e1b4b 50%, #0f172a 100%) !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
}
[data-theme="dark"] .hero-title {
  color: #ffffff !important;
}
[data-theme="dark"] .hero-subtitle {
  color: #cbd5e1 !important;
}

/* News Portal Header Banner Styling */
.news-portal-banner {
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.95) 0%, rgba(245, 243, 255, 0.95) 50%, rgba(253, 242, 248, 0.95) 100%);
  border-radius: 24px;
  padding: 36px 28px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.08);
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.news-portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 14px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.news-portal-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.news-portal-desc {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.6;
}

/* Dark Mode Overrides for News Portal Header Banner */
[data-theme="dark"] .news-portal-banner {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.85) 0%, rgba(49, 16, 66, 0.85) 50%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), inset 0 0 35px rgba(168, 85, 247, 0.18) !important;
  backdrop-filter: blur(12px);
}

[data-theme="dark"] .news-portal-badge {
  background: rgba(168, 85, 247, 0.25) !important;
  color: #c084fc !important;
  border-color: rgba(168, 85, 247, 0.4) !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3) !important;
}

[data-theme="dark"] .news-portal-title {
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .news-portal-desc {
  color: #cbd5e1 !important;
}

/* Game Cards in Dark Mode */
[data-theme="dark"] .game-card {
  background: #1e293b !important;
  border: 1px solid rgba(99, 102, 241, 0.2) !important;
}
[data-theme="dark"] .game-card:hover {
  border-color: #ff6b6b !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 107, 107, 0.3) !important;
}

/* Sections in Dark Mode (Synchronized with Light Mode) */
[data-theme="dark"] main section {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #f8fafc !important;
}
[data-theme="dark"] main section h3, 
[data-theme="dark"] main section h4 {
  color: #ffffff !important;
}
[data-theme="dark"] main section p {
  color: #94a3b8 !important;
}

[data-theme="dark"] main section div[style*="background: #fff"],
[data-theme="dark"] main section div[style*="border: 1px solid #e2e8f0"] {
  background: #0f172a !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
  color: #f8fafc !important;
}
[data-theme="dark"] main section div[style*="font-size: 0.75rem"] {
  color: #94a3b8 !important;
}
[data-theme="dark"] main section div[style*="font-weight: 800"] {
  color: #f8fafc !important;
}

/* SEO Article Card */
[data-theme="dark"] article {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(99, 102, 241, 0.2) !important;
}
[data-theme="dark"] article h2, 
[data-theme="dark"] article h3 {
  color: #ffffff !important;
}
[data-theme="dark"] article p, 
[data-theme="dark"] article li, 
[data-theme="dark"] article strong {
  color: #cbd5e1 !important;
}

/* Form Controls in Dark Mode */
[data-theme="dark"] .modal-close {
  background: #334155;
  color: #94a3b8;
}
[data-theme="dark"] .modal-close:hover {
  background: #475569;
  color: #ffffff;
}
[data-theme="dark"] .form-label {
  color: #f8fafc !important;
}
[data-theme="dark"] .form-control {
  background: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .form-control:focus {
  background: #1e293b !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25) !important;
}
[data-theme="dark"] .form-control::placeholder {
  color: #64748b !important;
}

/* ==========================================================================
   EXCLUSIVE STANDALONE EXECUTIVE DARK ADMIN DASHBOARD STYLES
   ========================================================================== */
.admin-page-wrapper {
  background: linear-gradient(135deg, #0b0f19 0%, #111827 50%, #0f172a 100%);
  min-height: 100vh;
  color: #f8fafc;
}

.admin-header-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #1e293b 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 24px;
  padding: 28px 32px;
  margin-bottom: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.admin-nav-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.25);
  padding-bottom: 16px;
  flex-wrap: wrap;
}

.admin-nav-btn {
  padding: 12px 22px !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  border-radius: 14px !important;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.admin-card {
  background: #1e293b !important;
  padding: 28px !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
}

.admin-item-box {
  background: #0f172a !important;
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
  border-radius: 16px !important;
  padding: 20px 24px !important;
  margin-bottom: 18px !important;
}

.admin-table-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 20px;
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #1e293b !important;
}

.admin-table th {
  background: #0f172a !important;
  color: #94a3b8 !important;
  padding: 18px 20px !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  border-bottom: 2px solid rgba(99, 102, 241, 0.3) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 18px 20px !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.15) !important;
  vertical-align: middle;
}

/* Footer Section in Dark Mode */
[data-theme="dark"] .footer {
  background: #0f172a !important;
  border-top-color: rgba(99, 102, 241, 0.25) !important;
  color: #94a3b8 !important;
}
[data-theme="dark"] .footer h4 {
  color: #ffffff !important;
}
[data-theme="dark"] .footer a {
  color: #cbd5e1 !important;
}
[data-theme="dark"] .footer div[style*="background: #f8fafc"] {
  background: #1e293b !important;
  border-color: rgba(99, 102, 241, 0.25) !important;
  color: #cbd5e1 !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
}

button, input, select, textarea, .btn, .cat-chip, .news-cat-chip, .admin-sidebar-link, .profile-nav-tab {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif !important;
}

body {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.brand-logo-text {
  font-weight: 900;
  font-size: 1.45rem;
  color: var(--text-main);
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary), #ff8e8e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  white-space: nowrap;
}

[data-theme="dark"] .brand-logo-text {
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.logo:hover .brand-logo-img {
  transform: scale(1.05);
}

.footer-logo-img {
  height: 38px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.admin-sidebar-logo-img {
  height: 38px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.admin-login-logo-img {
  height: 52px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  margin-bottom: 14px;
}

.drawer-logo-img {
  height: 34px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.35);
  transform: rotate(-4deg);
  transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
  transform: rotate(6deg) scale(1.08);
}

/* Search Bar */
.search-box {
  position: relative;
  width: 320px;
}
.search-input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  border-radius: 30px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}
.search-input:focus {
  border-color: var(--secondary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(77, 171, 247, 0.15);
}
.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* User Controls */
.user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #ff8787);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 107, 107, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.45);
}

.btn-secondary {
  background: #edf2f7;
  color: var(--text-main);
}
.btn-secondary:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.btn-admin {
  background: linear-gradient(135deg, #7950f2, #9c36b5);
  color: #fff;
  box-shadow: 0 4px 14px rgba(121, 80, 242, 0.3);
}
.btn-admin:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(121, 80, 242, 0.45);
}

/* User Profile Badge Controls */
.user-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 4px 14px 4px 6px;
  border-radius: 30px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: all 0.2s ease;
}
.user-profile-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.25);
}
.user-profile-btn img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.user-profile-name {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-main);
}
.user-points-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Category Filter Bar */
.category-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.category-bar::-webkit-scrollbar { display: none; }

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 30px;
  background: #ffffff;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}
.cat-chip:hover, .cat-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Hero Section */
.hero-section {
  margin: 20px 0 30px 0;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.hero-content {
  max-width: 550px;
  z-index: 2;
}
.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: #2b2d42;
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 24px;
}

/* Games Grid */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}

.game-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.game-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.thumb-wrapper {
  position: relative;
  width: 100%;
  padding-top: 65%; /* Aspect ratio */
  overflow: hidden;
  background: #cbd5e1;
}
.thumb-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.game-card:hover .thumb-img {
  transform: scale(1.08);
}

/* Badges */
.badge-orientation {
  display: none !important;
}
.badge-portrait {
  background: rgba(204, 93, 232, 0.9);
}
.badge-landscape {
  background: rgba(56, 217, 169, 0.9);
}

.badge-featured {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 212, 59, 0.95);
  color: #2b2d42;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  z-index: 2;
}

.fav-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: #cbd5e1;
  transition: all 0.2s ease;
  z-index: 3;
}
.fav-btn.active, .fav-btn:hover {
  color: #ff6b6b;
  transform: scale(1.15);
}

.game-info {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.game-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}
.game-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #f59e0b;
  font-weight: 700;
}

/* Google AdSlot Component */
.ad-container {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 24px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ad-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.ad-banner-mock {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #0369a1;
  font-weight: 700;
}

/* Modal Overlay & Dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: background 0.2s;
}
.modal-close:hover { background: #e2e8f0; color: #0f172a; }

/* Game Player Modal & Responsive Viewport */
.game-modal-content {
  width: 100%;
  max-width: 1100px;
  background: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.game-header-bar {
  background: #1e293b;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  border-bottom: 1px solid #334155;
}

/* Game Frame Viewports */
.game-frame-wrapper {
  position: relative;
  width: 100%;
  background: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 1;
  min-height: 480px;
}

/* Landscape Viewport (16:9) */
.viewport-landscape {
  width: 100%;
  height: 100%;
  aspect-ratio: 16/9;
  max-height: 70vh;
}

/* Portrait Viewport (9:16) with Mobile Phone Mockup Frame on PC */
.viewport-portrait-container {
  padding: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}
.phone-mockup {
  width: 360px;
  height: 640px;
  max-height: 75vh;
  aspect-ratio: 9/16;
  background: #000;
  border-radius: 36px;
  border: 12px solid #334155;
  box-shadow: 0 0 40px rgba(0,0,0,0.8), 0 0 0 2px #475569;
  position: relative;
  overflow: hidden;
}

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

/* Pre-Game Interstitial Ad Modal */
.interstitial-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 30px;
  text-align: center;
}
.btn-skip-ad {
  margin-top: 20px;
  padding: 12px 28px;
  border-radius: 30px;
  background: #38bdf8;
  color: #0f172a;
  font-weight: 800;
  border: none;
  cursor: pointer;
}
.btn-skip-ad:disabled {
  background: #475569;
  color: #94a3b8;
  cursor: not-allowed;
}

/* Form Controls */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
  font-size: 0.9rem;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid #e2e8f0;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-control:focus {
  border-color: var(--primary);
}

/* Footer */
.footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 40px 0 24px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

/* Admin Dashboard Table */
.admin-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 16px;
}
.admin-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.admin-table th, .admin-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}
.admin-table th {
  background: #f8fafc;
  font-weight: 700;
  color: #475569;
}

/* TOAST & CONFIRM MODAL STYLES (BOTTOM-LEFT POSITIONED) */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  top: auto;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
  border-left: 6px solid var(--primary);
  animation: toastInLeft 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: opacity 0.3s, transform 0.3s;
}

[data-theme="dark"] .toast-item {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-right: 1px solid rgba(99, 102, 241, 0.3);
  border-top: 1px solid rgba(99, 102, 241, 0.3);
  border-bottom: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.toast-item.success { border-left-color: #10b981; }
.toast-item.error { border-left-color: #ef4444; }
.toast-item.info { border-left-color: #3b82f6; }
.toast-item.warning { border-left-color: #f59e0b; }

@keyframes toastInLeft {
  from { opacity: 0; transform: translateX(-50px) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

/* Mobile Navigation & Desktop Utilities */
.mobile-only-btn {
  display: none !important;
}

.mobile-avatar-btn img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: var(--card-bg);
  z-index: 9999;
  box-shadow: -10px 0 30px rgba(0,0,0,0.3);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow-y: auto;
  border-left: 1px solid var(--border-color);
}

.mobile-nav-drawer.active {
  right: 0;
}

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

.mobile-drawer-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.mobile-user-card {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: transparent;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.2s ease;
}

.mobile-drawer-link:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--primary);
}

.mobile-drawer-link.primary-link {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff !important;
}

.mobile-drawer-link.admin-link {
  background: linear-gradient(135deg, #7950f2, #9c36b5);
  color: #fff !important;
}

.mobile-drawer-link.danger-link {
  background: rgba(244, 63, 94, 0.1);
  color: #f43f5e !important;
  border-color: rgba(244, 63, 94, 0.2);
}

/* Enforce No Horizontal Overflow */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* ==========================================================================
   OPTIMIZED MOBILE RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 768px) {
  .desktop-only-btn {
    display: none !important;
  }
  .mobile-only-btn {
    display: inline-flex !important;
  }

  .container {
    padding: 0 14px;
    max-width: 100vw !important;
  }

  .navbar-inner {
    height: auto;
    padding: 10px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
  }

  .logo {
    font-size: 1.3rem;
  }
  .brand-logo-img {
    height: 34px !important;
    max-width: 140px !important;
  }
  .brand-logo-text {
    font-size: 1.25rem !important;
  }
  .logo-icon {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }

  .search-box {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 4px;
  }
  .search-input {
    padding: 10px 16px 10px 38px;
    font-size: 0.88rem;
  }

  .user-actions {
    gap: 8px;
  }
  .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  /* Article Detail Responsiveness */
  article {
    padding: 18px 14px !important;
    border-radius: 16px !important;
    box-shadow: none !important;
  }

  .news-spotlight-card {
    grid-template-columns: 1fr !important;
  }
  .news-portal-banner {
    padding: 24px 16px !important;
  }
  .news-portal-title {
    font-size: 1.55rem !important;
  }

  .hero-section {
    padding: 22px 16px;
    margin: 12px 0 18px 0;
    border-radius: 18px;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }
  .hero-thumbs-preview {
    display: none !important;
  }

  .category-bar {
    gap: 8px;
    padding: 10px 0;
  }
  .cat-chip {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
  }
  .game-card {
    border-radius: 14px;
  }
  .game-info {
    padding: 10px;
  }
  .game-title {
    font-size: 0.9rem;
  }
  .game-meta {
    font-size: 0.75rem;
  }
  .badge-orientation, .badge-featured {
    font-size: 0.68rem;
    padding: 3px 7px;
  }

  .game-frame-wrapper {
    min-height: 340px;
  }
  .phone-mockup {
    width: 100%;
    height: 100%;
    max-height: 80vh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .admin-layout-container {
    flex-direction: column !important;
  }
  .admin-left-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2) !important;
  }
  .admin-main-content {
    padding: 20px 14px !important;
  }

  .modal-card {
    padding: 20px 16px;
    border-radius: 18px;
    width: 95% !important;
  }

  #toast-container {
    left: 14px;
    bottom: 14px;
    right: auto;
    top: auto;
  }
  .toast-item {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .section-title {
    font-size: 1.2rem;
  }
}

/* Unified Comments Styling for Game & Article in Dark Mode */
[data-theme="dark"] #articleCommentForm {
  background: #1e293b !important;
  border-color: rgba(99, 102, 241, 0.25) !important;
}

[data-theme="dark"] .comment-card-item {
  background: #1e293b !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
}

[data-theme="dark"] #articleCommentsSection h3,
[data-theme="dark"] .comment-card-item strong {
  color: #ffffff !important;
}

[data-theme="dark"] .comment-card-item p {
  color: #cbd5e1 !important;
}

