/* ========================================
   Modern Game Platform - Complete Redesign
   ======================================== */

:root {
  /* Color Palette - Vibrant & Modern */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  
  --secondary: #ec4899;
  --secondary-dark: #db2777;
  --secondary-light: #f472b6;
  
  --accent: #14b8a6;
  --accent-light: #5eead4;
  
  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #14b8a6 100%);
  --gradient-card: linear-gradient(145deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  --gradient-btn: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  --gradient-btn-hover: linear-gradient(135deg, #4f46e5 0%, #db2777 100%);
  
  /* Background Colors */
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #252542;
  --bg-card: #1e1e3f;
  --bg-card-hover: #2a2a4a;
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b80;
  
  /* Border Colors */
  --border-color: rgba(99, 102, 241, 0.2);
  --border-glow: rgba(99, 102, 241, 0.4);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem; 
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  --shadow-glow-hover: 0 0 30px rgba(236, 72, 153, 0.5);
  
  /* Font Sizes */
  --text-xs: 0.875rem;
  --text-sm: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.5rem;
  --text-xl: 2rem;
  --text-2xl: 2.5rem;
  --text-3xl: 3.5rem;
}

/* ========================================
   Reset & Base Styles
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 40px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

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

* {
  box-sizing: border-box;
}

.section {
  overflow-x: hidden;
  width: 100%;
}

/* ========================================
   Layout Utilities
   ======================================== */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
  overflow-x: hidden;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--space-md) / 2);
  width: 100%;
}

.row > * {
  padding: 0 calc(var(--space-md) / 2);
  box-sizing: border-box;
}

.col-12 { width: 100%; }
.col-lg-8 { width: 66.666%; }
.col-lg-4 { width: 33.333%; }
.col-md-6 { width: 50%; }
.col-md-4 { width: 33.333%; }
.col-md-3 { width: 25%; }

@media (max-width: 991px) {
  .col-lg-8, .col-lg-4 { width: 100%; }
  .col-md-6, .col-md-4, .col-md-3 { width: 50%; }
  .row {
    margin: 0 calc(-1 * var(--space-sm) / 2);
  }
  .row > * {
    padding: 0 calc(var(--space-sm) / 2);
  }
}

@media (max-width: 767px) {
  .col-md-6, .col-md-4, .col-md-3, .col-lg-7, .col-lg-5, .col-lg-8, .col-lg-4 { width: 100%; }
  .row {
    margin: 0;
    flex-direction: column;
  }
  .row > * {
    padding: 0;
  }
  .container {
    padding: 0 var(--space-sm);
    text-align: center;
  }
  
  /* Show sidebar first on mobile */
  .col-lg-4.sidebar-wrapper {
    order: -1;
  }
}

/* ========================================
   Header & Navigation
   ======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 15, 35, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-base);
  overflow: visible;
}

@media (max-width: 767px) {
  .header {
    z-index: 1003;
  }
}

.header.scrolled {
  background: rgba(15, 15, 35, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
}

.logo {
  font-size: var(--text-xl);
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: var(--transition-fast);
}

.logo:hover {
  transform: scale(1.02);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  position: relative;
  padding: var(--space-xs) var(--space-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition-fast);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
  background: var(--gradient-card);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: var(--gradient-hero);
  transition: var(--transition-fast);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* ===== Nav Auth Buttons ===== */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-auth-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-auth-btn {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-login {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-login:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--text-secondary);
}

.btn-register {
  background: var(--gradient-btn);
  color: #fff;
  border: none;
}

.btn-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

/* Nav User (Logged In) */
.nav-user {
  position: relative;
}

.nav-user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.3s ease;
  user-select: none;
}

.nav-user-trigger:hover {
  background: rgba(255,255,255,0.06);
}

.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-btn);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.nav-user-name {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-arrow {
  color: var(--text-secondary);
  font-size: 10px;
  transition: transform 0.25s ease;
  line-height: 1;
}

.nav-user.active .nav-user-arrow {
  transform: rotate(180deg);
}

/* User Dropdown */
.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.nav-user.active .nav-user-dropdown,
.nav-user:hover .nav-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
}

.nav-dropdown-item:hover {
  background: rgba(255,255,255,0.06);
}

.nav-logout-item {
  color: #ff6b6b;
}

.nav-logout-item:hover {
  background: rgba(231,76,60,0.12);
}

/* ===== Auth Modal Styles ===== */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.auth-modal {
  background: var(--bg-secondary);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  z-index: 9999;
  border: 1px solid var(--border-color);
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  transition: color 0.3s;
}

.auth-modal-close:hover {
  color: var(--text-primary);
}

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-header h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  text-align: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-size: 0.9rem;
}

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

.auth-tab.active {
  color: var(--gradient-start, #667eea);
  border-bottom-color: var(--gradient-start, #667eea);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.85rem;
}

.form-group input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--gradient-start, #667eea);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
}

.form-group .error-text {
  color: #ff6b6b;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group.has-error input {
  border-color: #ff6b6b;
}

.form-group.has-error .error-text {
  display: block;
}

.btn-auth {
  width: 100%;
  padding: 0.8rem 1.5rem;
  background: var(--gradient-btn);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}

.btn-auth:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-auth.loading {
  position: relative;
  color: transparent;
}

.btn-auth.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin-left: -9px;
  margin-top: -9px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

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

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.auth-footer p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.auth-footer a {
  color: var(--gradient-start, #667eea);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.alert-box {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  display: none;
}

.alert-box.show {
  display: block;
}

.alert-box.success {
  background: rgba(39,174,96,0.15);
  color: #27ae60;
  border: 1px solid rgba(39,174,96,0.3);
}

.alert-box.error {
  background: rgba(231,76,60,0.15);
  color: #ff6b6b;
  border: 1px solid rgba(231,76,60,0.3);
}

.password-toggle {
  position: relative;
}

.password-toggle input {
  padding-right: 2.5rem;
}

.password-toggle .toggle-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  user-select: none;
  transition: color 0.3s;
}

.password-toggle .toggle-icon:hover {
  color: var(--text-primary);
}

.slicknav_menu {
  display: none;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  margin-top: -1px;
}

.slicknav_btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  padding: 0;
  width: 40px;
  height: 40px;
  margin: 0;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slicknav_btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.slicknav_btn:active {
  transform: scale(0.95);
}

.slicknav_btn .slicknav_icon {
  width: 18px;
  height: 14px;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  float: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slicknav_btn .slicknav_icon-bar {
  background-color: #fff;
  height: 2px;
  border-radius: 2px;
  box-shadow: none;
  transition: all 0.3s ease;
  width: 100%;
}

.slicknav_btn .slicknav_icon-bar + .slicknav_icon-bar {
  margin-top: 4px;
}

/* Animation for hamburger menu when menu is open */
.slicknav_open .slicknav_icon-bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.slicknav_open .slicknav_icon-bar:nth-child(2) {
  opacity: 0;
}

.slicknav_open .slicknav_icon-bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -7px);
}

.slicknav_nav a {
  color: #e2e8f0;
  font-weight: 600;
  border-radius: var(--radius-md);
  margin: 0.25rem 0;
  padding: 12px 20px;
  display: block;
  transition: all 0.3s ease;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.slicknav_nav a:hover {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
  color: #ffffff;
  transform: translateX(5px);
  border: 1px solid rgba(102, 126, 234, 0.3);
}

/* Active state for slicknav navigation */
.slicknav_nav a.active {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.slicknav_nav a.slicknav_item {
  background: transparent;
}

.slicknav_nav .slicknav_row:hover {
  background: var(--gradient-card);
  border-radius: var(--radius-sm);
}

/* Add close button styling */

@media (max-width: 767px) {
  .main-nav { display: none; }

  /* Hide auth buttons on mobile (use hamburger menu instead) */
  .nav-auth-btns { display: none; }

  .nav-auth {
    gap: 6px;
  }

  .nav-user {
    position: relative;
  }

  .nav-user-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .nav-user-dropdown {
    min-width: 120px;
    right: auto;
    left: 50%;
    transform: translate(-50%, -6px);
  }

  .nav-user.active .nav-user-dropdown {
    transform: translate(-50%, 0);
  }

  /* Show slicknav menu */
  .slicknav_menu {
    display: block;
    position: absolute;
    top: 50%;
    left: var(--space-md);
    transform: translateY(-50%);
    background: transparent;
    border: none;
    margin: 0;
    z-index: 1005;
  }

  /* Position the button container */
  .slicknav_menu .slicknav_btn {
    margin: 0;
    width: 40px;
    height: 40px;
  }

  /* Style the dropdown menu */
  .slicknav_menu .slicknav_nav {
    position: absolute !important;
    top: calc(100% + 2px);
    left: calc(-1 * var(--space-md));
    width: 100vw !important;
    max-width: 100vw !important;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%) !important;
    border: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding: var(--space-md) var(--space-lg) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    display: none;
    animation: slideDown 0.3s ease;
    max-height: calc(100vh - 70px) !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
  }

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

  .slicknav_menu.open .slicknav_nav {
    display: block;
  }

  .header-inner {
    padding: var(--space-sm) var(--space-md);
    padding-left: 56px;
    position: relative;
  }

  .logo {
    font-size: var(--text-lg);
  }
}

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
  position: relative;
  padding: 120px 0 var(--space-2xl);
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: rotate 30s linear infinite;
}

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

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: var(--text-3xl);
  font-weight: 900;
  margin-bottom: var(--space-md);
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--space-xl);
}

.hero-btn {
  display: inline-block;
  padding: var(--space-md) var(--space-2xl);
  background: white;
  color: var(--primary);
  font-size: var(--text-md);
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  transition: var(--transition-base);
}

.hero-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* ========================================
   Section Styling
   ======================================== */

.section {
  padding: var(--space-lg) 0 var(--space-2xl);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  position: relative;
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
}

.section-subtitle {
  font-size: var(--text-md);
  color: var(--text-secondary);
  text-align: center;
  flex: 1;
}

.section-more-btn {
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
  flex-shrink: 0;
  position: absolute;
  right: 0;
}

.section-more-btn:hover {
  opacity: 0.8;
}

.section-more-btn::after {
  content: '→';
  font-size: var(--text-xs);
  transition: transform 0.2s;
}

.section-more-btn:hover::after {
  transform: translateX(3px);
}

@media (max-width: 767px) {
  .section-subtitle-wrap {
    position: static;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: center;
  }

  .section-more-btn {
    position: static;
  }

  .section-subtitle {
    text-align: center;
  }
}

/* ========================================
   Game Cards
   ======================================== */

.game-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
  gap: var(--space-lg) !important;
}

@media (min-width: 768px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 992px) {
  .game-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* 4-Column Layout (for specific modules) */
.game-grid-4col {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: var(--space-lg) !important;
}

@media (min-width: 768px) {
  .game-grid-4col {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 992px) {
  .game-grid-4col {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (min-width: 1200px) {
  .game-grid-4col {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* 2-Column Layout (for tags page) */
.game-grid-2col {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: var(--space-lg) !important;
}

@media (min-width: 576px) {
  .game-grid-2col {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile game card layout optimization */
@media (max-width: 767px) {
  .game-grid,
  .game-grid-4col,
  .game-grid-2col {
    grid-template-columns: 1fr !important;
    gap: var(--space-md) !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}

.game-card {
  position: relative;
  background: transparent;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition-base);
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.game-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.game-card-image img {
  width: 100%;
  /* height: 100%; */
  object-fit: cover;
  transition: var(--transition-slow);
}

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

.game-card-content {
  padding: var(--space-sm) var(--space-md);
}

.game-card-tag {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.game-card-badge {
  display: inline-block;
  max-width: 100px;
  padding: 4px 10px;
  background: transparent;
  color: #667eea;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card-image .game-card-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 10;
}

.game-card-badge-alt {
  padding: 5px 12px;
  /* background: linear-gradient(135deg, #eab308 0%, #f59e0b 100%); */
  font-size: 10px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}

.game-card-badge:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-1px);
}

.game-card-badge-alt:hover {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.5);
  transform: translateY(-1px);
}

.list-card-badge {
  display: inline-block;
  max-width: 100px;
  padding: 4px 10px;
  background: transparent;
  color: #667eea;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card-title {
  font-size: var(--text-md);
  font-weight: 700;
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.game-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
  color: #fbbf24;
  font-size: var(--text-xs);
}

.game-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.5;
}

.game-card-btn {
  display: block;
  width: 100%;
  padding: var(--space-sm);
  background: var(--gradient-btn);
  color: white;
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.game-card-btn:hover {
  background: var(--gradient-btn-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-hover);
}

/* Featured Game Card */
.game-card.featured .game-card-image {
  aspect-ratio: 21/10;
}

.game-card.featured .game-card-title {
  font-size: var(--text-xl);
}

/* Compact Game Card - Second Module Style */
.game-card.game-card-compact {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
  box-shadow: 0 10px 30px rgba(15, 12, 41, 0.5);
}

.game-card.game-card-compact::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border-radius: inherit;
  z-index: -1;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.game-card.game-card-compact:hover::before {
  opacity: 1;
}

.game-card.game-card-compact:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 20px 50px rgba(15, 12, 41, 0.7);
}

.game-card.game-card-compact .game-card-image {
  aspect-ratio: 4/3;
  margin: 0;
  position: relative;
  overflow: hidden;
}

.game-card.game-card-compact .game-card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.5) 100%);
  z-index: 1;
}

.game-card.game-card-compact .game-card-image img {
  border-radius: 0;
  transition: all 0.4s ease;
}

.game-card.game-card-compact:hover .game-card-image img {
  transform: scale(1.15);
  filter: brightness(1.2) contrast(1.1);
}

.game-card.game-card-compact .game-card-content {
  padding: var(--space-md);
  text-align: center;
  position: relative;
  z-index: 2;
}

.game-card.game-card-compact .game-card-tag {
  font-size: 10px;
  padding: 5px 14px;
  /* background: linear-gradient(90deg, #667eea 0%, #764ba2 100%); */
  color: #ffffff;
  font-weight: 700;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: var(--space-sm);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  /* box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4); */
  /* animation: tagGlow 2s ease-in-out infinite; */
  max-width: 100%;
  /* overflow: hidden;
  text-overflow: ellipsis; */
  white-space: nowrap;
}

@keyframes tagGlow {
  0%, 100% {
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 2px 20px rgba(102, 126, 234, 0.7);
  }
}

.game-card.game-card-compact .game-card-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
}

.game-card.game-card-compact .game-card-meta {
  margin-bottom: var(--space-md);
  font-size: 11px;
  justify-content: center;
  color: #a8a4e5;
}

.game-card.game-card-compact .game-card-desc {
  display: none;
}

.game-card.game-card-compact .game-card-btn {
  background: linear-gradient(90deg, #ff6b6b 0%, #feca57 50%, #ff6b6b 100%);
  background-size: 200% 200%;
  font-size: 11px;
  padding: 12px 24px;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  border: 3px solid rgba(255, 255, 255, 0.3);
  animation: gradientMove 3s ease infinite;
  position: relative;
  overflow: hidden;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.game-card.game-card-compact .game-card-btn:hover {
  animation: none;
  background: linear-gradient(90deg, #ff8e8e 0%, #ffdd82 50%, #ff8e8e 100%);
  box-shadow: 0 6px 25px rgba(255, 107, 107, 0.6);
  transform: translateY(-4px) scale(1.05);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   List View Cards
   ======================================== */

.list-card {
  display: flex;
  gap: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition-base);
}

.list-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md);
  transform: translateX(5px);
}

.list-card-image {
  flex-shrink: 0;
  width: 160px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.list-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.list-card-tag {
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.list-card-title {
  font-size: var(--text-md);
  font-weight: 700;
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.list-card-meta {
  color: #fbbf24;
  margin-bottom: var(--space-xs);
}

.list-card-desc {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

.list-card-btn {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--gradient-btn);
  color: white;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  align-self: flex-start;
}

@media (max-width: 767px) {
  .list-card { flex-direction: column; }
  .list-card-image { width: 100%;  margin: 0 auto; }
  .list-card-image img { width: 100%; height: 100%; }
  .list-card-content { text-align: center; }
  .list-card-btn { margin: 0 auto; }
  
  /* Mobile sidebar styles */
  .sidebar {
    position: static;
    margin-bottom: var(--space-lg);
    margin-top: var(--space-lg);
  }
  
  .sidebar-wrapper {
    order: -1;
  }
  
  .widget {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }
  
  .widget-title {
    font-size: var(--text-md);
  }

  /* Mobile widget-item fix */
  .widget-item {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .widget-item img {
    width: 80px;
    height: 80px;
  }

  .widget-item-content {
    min-width: 0;
    flex: 1;
  }

  .widget-item-tag {
    width: 100% !important;
  }

  .widget-item-title {
    width: 100% !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Fix detail page col-lg-4 layout */
  .section .row > .col-lg-4 {
    width: 100%;
    order: 1;
    margin-top: var(--space-lg);
  }
}
  
  /* Mobile widget-item styles - with image version */
  .widget-item img {
    width: 50px;
    height: 50px;
  }

  /* Mobile category module optimization - grid layout, 3 per row */
  .categories-list {
    gap: 6px !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    flex-direction: unset !important;
  }

  /* Category item styles */
  .category-item {
    padding: 8px 4px !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-card) !important;
    text-align: center !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 0 !important;
    display: flex !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    min-height: 36px !important;
  }

  .category-item:hover {
    background: var(--gradient-card) !important;
  }

  /* Category item content styles */
  .category-item .widget-item-content {
    padding: 0 !important;
  }

  .category-item .widget-item-content span {
    font-size: 12px !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 0 !important;
    line-height: 1.2 !important;
  }

  .category-item.active {
    background: var(--gradient-btn) !important;
    color: white !important;
    border-color: transparent !important;
  }

  .category-item.active .widget-item-content span {
    color: white !important;
  }

  /* Keep existing widget-item active styles (for items with images) */
  .widget-item.active {
    background: var(--gradient-btn);
    color: white;
  }

  .widget-item.active .widget-item-content span {
    color: white;
  }
  
  .widget-item-content {
    padding-left: var(--space-sm);
    overflow: hidden;
    min-width: 0;
  }
  
  /* Fix mobile text overflow */
  .widget-item-title {
    max-width: 100%;
  }
  
  .widget-item-tag {
    max-width: 100%;
  }
  
  /* Mobile detail image styles */
  .detail-image {
    aspect-ratio: 16/10;
  }
  
  .detail-image img {
    /* min-height: 200px!important; */
    max-height: none;
  }
}

/* ========================================
   Sidebar Widget
   ======================================== */

.sidebar {
  position: sticky;
  /* top: 100px; */
}

.widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border-color);
  margin-bottom: var(--space-lg);
}

.widget-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--border-color);
}

.widget-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.widget-item {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  position: relative;
}

.widget-item:hover {
  background: var(--gradient-card);
}

.widget-item.active {
  background: var(--gradient-btn);
  color: white;
}

.widget-item.active .widget-item-content span {
  color: white;
}

.widget-item-rank {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-btn);
  color: white;
  font-weight: 800;
  font-size: 12px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 10;
}

.widget-item img {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.widget-item-content {
  flex: 1;
  min-width: 0;
}

.widget-item-tag {
  font-size: var(--text-xs);
  color: var(--accent);
  margin-bottom: 2px;
  width: 100% !important;
}

.widget-item-title {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100% !important;
}

.widget-item-meta {
  color: #fbbf24;
  font-size: var(--text-xs);
}

/* ========================================
   Detail Page
   ======================================== */

.detail-container {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.detail-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: 100%;
  /* min-height: 250px!important; */
  /* max-height: 400px; */
  object-fit: cover;
}

.detail-content {
  padding: var(--space-2xl);
}

.detail-tag {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--gradient-btn);
  color: white;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.detail-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
}

.detail-body {
  font-size: var(--text-md);
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
}

.play-btn {
  display: block;
  width: 100%;
  padding: var(--space-lg);
  background: var(--gradient-btn);
  color: white;
  font-size: var(--text-lg);
  font-weight: 800;
  text-align: center;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  transition: var(--transition-base);
}

.play-btn:hover {
  background: var(--gradient-btn-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-hover);
}

/* Comments Section */
.comments-section {
  margin-top: var(--space-2xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--border-color);
}

.comments-section h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 90%;
  margin: 0 auto;
  padding-bottom: 50px;
}

.form-row {
  display: flex;
  gap: var(--space-md);
}

.form-input {
  flex: 1;
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-textarea {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  min-height: 150px;
  resize: vertical;
  font-family: inherit;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* ========================================
   About & Contact Pages
   ======================================== */

.page-header {
  text-align: center;
  padding: var(--space-2xl) 0;
  background: var(--gradient-card);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-2xl);
}

.page-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-content {
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  border: 1px solid var(--border-color);
  width: 100%;
}

.about-content h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: var(--space-xl) 0 var(--space-md);
  color: var(--text-primary);
}

.about-content p {
  font-size: var(--text-md);
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.about-content ul {
  list-style: none;
  margin: var(--space-md) 0;
}

.about-content li {
  padding: var(--space-sm) 0;
  padding-left: var(--space-lg);
  position: relative;
  color: var(--text-secondary);
}

.about-content li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Contact Form */
.contact-layout {
  /* display: grid; */
  grid-template-columns: 2fr 1fr;
  gap: var(--space-2xl);
}

.contact-form-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  border: 1px solid var(--border-color);
}

.contact-form-wrapper h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-info-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  border: 1px solid var(--border-color);
}

.contact-info-wrapper h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.info-item i {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-card);
  color: var(--primary);
  font-size: var(--text-lg);
  border-radius: var(--radius-md);
}

.info-item p {
  margin: 4px 0;
  font-size: var(--text-sm);
}

.info-item p:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.social-links a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.social-links a:hover {
  background: var(--gradient-btn);
  border-color: transparent;
  transform: translateY(-3px);
}

@media (max-width: 991px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* ========================================
   Terms & Privacy Pages
   ======================================== */

.policy-content {
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  border: 1px solid var(--border-color);
  text-align: left;
  width: 100%;
}

.policy-content h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: var(--space-xl) 0 var(--space-md);
  color: var(--text-primary);
}

.policy-content h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: var(--space-lg) 0 var(--space-md);
  color: var(--text-primary);
}

.policy-content p {
  font-size: var(--text-md);
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.policy-content ul {
  list-style: none;
  margin: var(--space-md) 0 var(--space-md) var(--space-lg);
}

.policy-content li {
  padding: var(--space-xs) 0;
  position: relative;
}

.policy-content li::before {
  content: '•';
  position: absolute;
  left: -1rem;
  color: var(--accent);
  font-weight: 700;
}

.policy-update {
  text-align: right;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

/* ========================================
   Footer
   ======================================== */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-section h4 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-section h2 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-section h1 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-section p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}
.footer-section .footer-section-title {
  font-size: var(--text-lg)!important;
  font-weight: 700!important;
  margin-bottom: var(--space-md)!important;
  background: var(--gradient-hero)!important;
  -webkit-background-clip: text!important;
  -webkit-text-fill-color: transparent!important;
  background-clip: text!important;
}
.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-xs);
}

.footer-links a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: var(--space-xs);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: var(--text-xs);
}

/* ========================================
   Pagination
   ======================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  /* height: 44px; */
  background: var(--bg-card);
  /* border: 1px solid var(--border-color); */
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: var(--transition-fast);
  color: var(--text-secondary);
  text-decoration: none;
}

.pagination a:hover {
  background: var(--gradient-btn);
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
}

.pagination .active {
  background: var(--gradient-btn);
  border-color: transparent;
  color: white;
  border-radius: 10px;
}

.pagination .disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination .disabled:hover {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-secondary);
  transform: none;
}

/* Tag Pagination Container */
#tagPaginationContainer .pagination-container {
  display: flex;
  justify-content: center;
  margin-top: var(--space-xl);
}

#tagPaginationContainer .pagination {
  margin: 0;
}

#tagPaginationContainer .pagination-list {
  display: flex;
  list-style: none;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
}

#tagPaginationContainer .pagination-item {
  margin: 0;
}

#tagPaginationContainer .pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 var(--space-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: var(--transition-fast);
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
}

#tagPaginationContainer .pagination-link:hover:not(.current):not(.disabled) {
  background: var(--gradient-btn);
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
}

#tagPaginationContainer .pagination-link.current {
  background: var(--gradient-btn);
  border-color: transparent;
  color: white;
}

#tagPaginationContainer .pagination-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

#tagPaginationContainer .pagination-link.prev,
#tagPaginationContainer .pagination-link.next {
  padding: 0 var(--space-md);
}

#tagPaginationContainer .pagination-link[aria-hidden="true"] {
  font-size: var(--text-lg);
}

/* ========================================
   Utility Classes
   ======================================== */

.text-line1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-line2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.text-line3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.spad {
  padding: var(--space-2xl) 0;
}

/* ========================================
   Animations
   ======================================== */

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

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ========================================
   Mobile Responsive
   ======================================== */

@media (max-width: 767px) {
  :root {
    --text-3xl: 2.5rem;
    --text-2xl: 2rem;
    --text-xl: 1.5rem;
  }

  body {
    padding-top: 32px;
  }

  .hero-section {
    padding: 140px 0 var(--space-xl);
  }

  .hero-title {
    font-size: var(--text-2xl);
  }

  .section {
    padding: var(--space-xl) 0;
  }

  .form-row {
    flex-direction: column;
  }

  .detail-content {
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
  }

  /* Detail page modules spacing on mobile */
  .detail-container .detail-image {
    margin-bottom: var(--space-md);
  }

  .comments-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
  }

  .widget {
    margin-bottom: var(--space-lg);
    margin-top: 50px;
  }

  .sidebar {
    margin-bottom: var(--space-lg);
  }

  /* Privacy/Terms page - full width on mobile */
  .policy-content {
    max-width: 100% !important;
    padding: var(--space-md) !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  /* About page - full width on mobile */
  .about-content {
    max-width: 100% !important;
    padding: var(--space-md) !important;
  }

  /* Contact page - full width on mobile */
  .contact-form-wrapper {
    max-width: 100% !important;
    padding: var(--space-md) !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  .contact-info-wrapper {
    max-width: 100% !important;
    padding: var(--space-md) !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: var(--space-md) !important;
  }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top:hover {
  background: var(--secondary-color);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.back-to-top:hover svg {
  transform: translateY(-3px);
}

/* Back to top button mobile responsive */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* ========================================
   Share Buttons
   ======================================== */
.geme-social-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.geme-social-share p {
  margin: 0 6px 0 0;
  color: #6366f1;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .3px;
}
.geme-social-share a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-size: 17px;
  line-height: 1;
  border-radius: 50%;
  background: rgba(99, 102, 241, .1);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, .28);
  overflow: hidden;
  transition: color .3s ease, border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.geme-social-share a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transform: scale(.4);
  border-radius: 50%;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 0;
}
.geme-social-share a i {
  position: relative;
  z-index: 1;
  transition: color .3s ease;
}
.geme-social-share a:hover {
  color: #6366f1;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}
.geme-social-share a:hover::before {
  opacity: 1;
  transform: scale(1);
}
.geme-social-share a:hover i {
  color: #fff;
}
.geme-social-share a[title="facebook"]:hover  { color: #1877f2; }
.geme-social-share a[title="twitter"]:hover   { color: #1da1f2; }
.geme-social-share a[title="instagram"]:hover { color: #e4405f; }
.geme-social-share a[title="youtube"]:hover   { color: #ff0000; }

/* ========================================
   Share URL Copy Modal
   ======================================== */
.share-copy-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 35, .82);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 15px;
}
.share-copy-modal.show {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-animation: shareModalFade .25s ease;
  animation: shareModalFade .25s ease;
}
@-webkit-keyframes shareModalFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shareModalFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.share-copy-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 100%;
  padding: 28px 24px 24px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 30px rgba(99, 102, 241, .25);
  -webkit-animation: shareBoxPop .3s cubic-bezier(.18, .89, .32, 1.28);
  animation: shareBoxPop .3s cubic-bezier(.18, .89, .32, 1.28);
}
@-webkit-keyframes shareBoxPop {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes shareBoxPop {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.share-copy-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
}
.share-copy-close:hover {
  color: var(--primary);
}
.share-copy-title {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--text-primary);
}
.share-copy-desc {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 14px;
}
.share-copy-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 8px;
}
.share-copy-input {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-tertiary);
}
.share-copy-input:focus {
  outline: none;
  border-color: var(--primary);
}
.share-copy-btn {
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gradient-btn);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.share-copy-btn:hover {
  background: var(--gradient-btn-hover);
  transform: translateY(-1px);
}
.share-copy-status {
  margin: 12px 0 0;
  min-height: 18px;
  font-size: 13px;
  color: var(--accent, #14b8a6);
}
