/* ============================================================
   ELKY GAMES — style.css
   Adsterra Optimized — Ads always visible
   ============================================================ */

/* ==================== ROOT VARIABLES ==================== */
:root {
  --primary-bg: #09090b;
  --secondary-bg: #121215;
  --card-bg: #1a1a1e;
  --accent-color: #ff0055;
  --text-primary: #ffffff;
  --text-secondary: #a0a0ab;
  --border-color: #27272a;
  --cyan-highlight: #00E5FF;
  --gold-highlight: #FFD700;
  --purple-button: #8b3dff;
}

/* ==================== RESET & BASE ==================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--primary-bg);
  background-image: linear-gradient(rgba(9, 9, 11, 0.85), rgba(9, 9, 11, 0.85)),
                    url('https://i.pinimg.com/originals/b3/52/c1/b352c12ea6df6fc4175498f0eca8bac8.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* ==================== NAVBAR ==================== */
.navbar {
  background-color: var(--secondary-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  flex-wrap: wrap;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.settings-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  flex-shrink: 0;
}
.settings-btn:hover {
  border-color: var(--cyan-highlight);
  color: var(--cyan-highlight);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
  transform: scale(1.08) rotate(5deg);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.brand-logo:hover { transform: scale(1.03); }

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  transition: border-color 0.3s ease;
}
.brand-logo:hover .brand-icon { border-color: var(--cyan-highlight); }

.brand-title {
  font-family: 'Aladin', cursive;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 1px;
}
.brand-title .c1 { color: #FF2A6D; }
.brand-title .c2 { color: #05D9E8; }
.brand-title .c3 { color: #00F5D4; }
.brand-title .c4 { color: #FFB703; }

.search-container {
  position: relative;
  flex-grow: 1;
  max-width: 500px;
  min-width: 200px;
}
.search-container input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background-color: var(--primary-bg);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  color: var(--text-primary);
  outline: none;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
}
.search-container input::placeholder { color: var(--text-secondary); }
.search-container input:focus {
  border-color: #05D9E8;
  box-shadow: 0 0 12px rgba(5, 217, 232, 0.4);
}
.search-container i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  font-size: 14px;
}

.search-view-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
  max-width: 460px;
  min-width: 200px;
}

.view-toggle-box {
  display: flex;
  background-color: var(--primary-bg);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.view-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}
.view-btn.active {
  background-color: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 0, 85, 0.6);
}
.view-btn:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-filter-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.icon-filter-btn:hover,
.icon-filter-btn.active {
  transform: translateY(-3px) scale(1.08);
  border-color: currentColor;
  box-shadow: 0 4px 15px currentColor;
}

.btn-latest { color: #00E5FF; }
.btn-popular { color: #FF2A6D; }
.btn-random { color: #FFB703; }
.btn-liked { color: #FF0055; }
.btn-history { color: #00F5D4; }
.btn-pages { color: #9D50FF; }
.btn-reverse { color: #FF6B35; }

.playstore-nav-btn {
  background: linear-gradient(135deg, #01d679, #008f4c);
  color: #ffffff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(1, 214, 121, 0.4);
  animation: playpulse 2s infinite;
}
@keyframes playpulse {
  0% { box-shadow: 0 0 0 0 rgba(1, 214, 121, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(1, 214, 121, 0); }
  100% { box-shadow: 0 0 0 0 rgba(1, 214, 121, 0); }
}
.playstore-nav-btn:hover { transform: scale(1.12) rotate(-5deg); }

@media (max-width: 768px) {
  .navbar {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 10px 12px;
  }
  .nav-left { grid-column: 1; grid-row: 1; }
  .brand-logo { grid-column: 2; grid-row: 1; justify-self: center; }
  .nav-right-actions { grid-column: 3; grid-row: 1; }
  .icon-filter-btn { display: none; }
  .icon-filter-btn.btn-pages { display: flex; }
  .search-view-wrapper {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: 100%;
  }
  .search-container {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: 100%;
  }
  .brand-title { font-size: 26px; }
}

/* ==================== DRAWERS & MODALS ==================== */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 200;
}

.settings-drawer {
  position: fixed;
  top: 0;
  left: -340px;
  width: 320px;
  height: 100%;
  background-color: var(--secondary-bg);
  border-right: 1px solid var(--border-color);
  z-index: 201;
  padding: 20px;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.settings-drawer.open { left: 0; }

.playstore-modal,
.pages-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.playstore-modal-box {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 229, 255, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.playstore-header-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}
.playstore-app-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
  overflow-y: auto;
  padding-right: 4px;
  max-height: 60vh;
}
.playstore-app-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.playstore-app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}
.playstore-app-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
  min-width: 0;
}
.playstore-app-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playstore-app-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.playstore-download-btn {
  background: linear-gradient(135deg, #01d679, #008f4c);
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pages-modal-box {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 420px;
  border-radius: 18px;
  padding: 20px;
}
.close-popup-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
.close-popup-btn:hover {
  background: var(--accent-color);
  transform: rotate(90deg);
}
.pages-modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}
.pages-modal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s ease;
}
.pages-modal-item:hover {
  border-color: var(--cyan-highlight);
  color: var(--cyan-highlight);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.stat-number {
  font-size: 28px;
  font-weight: 900;
  color: var(--cyan-highlight);
}
.drawer-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.drawer-action-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}
.drawer-action-btn:hover { border-color: var(--cyan-highlight); }
.drawer-category-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.drawer-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.drawer-category-item:hover {
  border-color: var(--gold-highlight);
  background: rgba(255, 215, 0, 0.1);
}
.drawer-category-count {
  background: var(--primary-bg);
  color: var(--cyan-highlight);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 800;
}

/* ==================== MAIN CONTAINER ==================== */
.container {
  max-width: 1400px;
  width: 100%;
  margin: 10px auto 20px auto;
  padding: 0 15px;
  flex: 1;
}

/* ==================== CATEGORIES BAR ==================== */
.categories-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}
.category-chip {
  background-color: var(--secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.3s ease;
}
.category-chip.active,
.category-chip:hover {
  background-color: var(--gold-highlight);
  color: #000;
  border-color: var(--gold-highlight);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
  transform: translateY(-2px);
}

/* ==================== GAMES GRID ==================== */
.games-grid {
  display: grid;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 0px 50px;
}
.games-grid.icon-mode { grid-template-columns: repeat(8, 1fr); }
@media (max-width: 1200px) { .games-grid.icon-mode { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .games-grid.icon-mode { grid-template-columns: repeat(3, 1fr); } }
.games-grid.cover-mode { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1200px) { .games-grid.cover-mode { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 900px) { .games-grid.cover-mode { grid-template-columns: repeat(3, 1fr); } }
.icon-mode .card-thumbnail-wrapper { aspect-ratio: 1 / 1; }
.cover-mode .card-thumbnail-wrapper { aspect-ratio: 16 / 9; }

.game-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 1;
  transform-origin: center center;
  max-width: 100%;
}
.cover-mode .game-card:hover {
  transform: scale(1.18);
  border-color: #05D9E8;
  z-index: 99;
  box-shadow: 0 10px 25px rgba(5, 217, 232, 0.4);
}
.icon-mode .game-card:hover {
  transform: translateY(-4px);
  border-color: #05D9E8;
  box-shadow: 0 6px 18px rgba(5, 217, 232, 0.3);
}
.card-thumbnail-wrapper {
  width: 100%;
  position: relative;
  background-color: var(--secondary-bg);
  overflow: hidden;
}
.card-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: block;
}
.card-hover-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  display: none;
}
.card-details {
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  background-color: var(--card-bg);
  justify-content: space-between;
}
.card-title {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  width: 100%;
}
.card-submeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: auto;
  width: 100%;
}
.card-badge {
  color: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  max-width: 35%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}
.card-views {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  justify-content: center;
}
.card-like-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transition: all 0.2s ease;
  padding: 0 2px;
}
.card-like-btn:hover {
  transform: scale(1.2);
  color: #ff0055;
}
.card-like-btn.liked { color: #ff0055; }

@media (max-width: 600px) {
  .container { padding: 0 4px; }
  .games-grid {
    padding: 0px 2px !important;
    gap: 6px !important;
  }
  .games-grid.icon-mode { grid-template-columns: repeat(3, 1fr) !important; }
  .games-grid.cover-mode { grid-template-columns: repeat(2, 1fr) !important; }
  .card-details { padding: 6px 4px; gap: 4px; }
  .card-title { font-size: 10px; }
  .card-submeta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
  }
  .card-badge {
    font-size: 8px;
    padding: 1px 5px;
    max-width: 100%;
    text-align: center;
  }
  .card-bottom-row-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .card-views { font-size: 9px; }
  .card-like-btn { font-size: 11px; }
  .cover-mode .game-card:hover {
    transform: scale(1.03) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important;
  }
  .random-card:hover {
    transform: scale(1.03) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6) !important;
  }
}

/* ==================== GAME DETAILS — HERO ==================== */
.details-screen { display: block; }

.details-top-banner {
  width: 100%;
  margin-bottom: 20px;
}

.hero-purple-box {
  background: #0d0d12;
  border-radius: 18px;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  width: 100%;
  overflow: hidden;
}
.hero-bg-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(16px) brightness(0.4);
  transform: scale(1.15);
  z-index: 0;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}
.hero-cover-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  position: relative;
  background-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 20px 0;
}
.hero-cover-img {
  max-width: 60%;
  max-height: 55%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.hero-iframe-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: none;
  z-index: 10;
}
.hero-play-btn {
  margin-top: 15px;
  background-color: var(--purple-button);
  color: #ffffff;
  border: none;
  padding: 12px 42px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(139, 61, 255, 0.6);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 5;
  font-family: inherit;
}
.hero-play-btn:hover {
  transform: scale(1.08);
  background-color: #9d50ff;
  box-shadow: 0 8px 25px rgba(157, 80, 255, 0.8);
}

.hero-bottom-info {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0 !important;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: 0 0 18px 18px;
  flex-wrap: nowrap;
  gap: 10px;
  z-index: 2;
}
.hero-info-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-shrink: 1;
}
.hero-game-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.hero-title-text {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  white-space: normal;
  word-break: break-word;
}
.hero-category-text {
  font-size: 11px;
  color: #bfa8e6;
  font-weight: 600;
}
.hero-info-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.detail-stats-pill {
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
  color: #ffffff;
}

.detail-action-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  font-family: inherit;
}
.detail-action-icon:hover {
  background: rgba(255, 0, 85, 0.2);
  color: #ff0055;
  border-color: #ff0055;
  transform: scale(1.1);
}
.detail-action-icon.liked {
  background: rgba(255, 0, 85, 0.2);
  color: #ff0055;
  border-color: #ff0055;
}

.fullscreen-btn-inline {
  background: linear-gradient(135deg, #00E5FF, #008F4C);
  color: #fff;
  border: none;
  padding: 0 14px;
  height: 38px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.3);
  flex-shrink: 0;
  font-family: inherit;
}
.fullscreen-btn-inline:hover {
  transform: scale(1.06);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.6);
}

.share-btn-inline {
  background: linear-gradient(135deg, #00C6FF, #0072FF);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 198, 255, 0.3);
}
.share-btn-inline:hover {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 6px 18px rgba(0, 198, 255, 0.6);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .fullscreen-btn-inline .fs-text { display: none; }
  .fullscreen-btn-inline {
    width: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .player-text-label { display: none; }
  .hero-cover-img { max-width: 80%; max-height: 60%; }
  .hero-title-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
  }
}

/* ==================== CATEGORY BADGES ROW ==================== */
.cat-badges-row {
  margin: 20px 0;
  padding: 16px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}
.cat-badges-title {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cat-badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a1a1e, #27272a);
  border: 1px solid var(--border-color);
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}
.cat-badge:hover {
  border-color: var(--cyan-highlight);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(139, 61, 255, 0.15));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.25);
}
.cat-name { display: inline-block; }
.cat-count {
  background: linear-gradient(135deg, #FF007A, #8b3dff);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

/* ============================================================
   AD SLOTS — Adsterra Optimized
   ============================================================
   Simple rules: har ad container ko hamesha display block rakhna hai.
   Koi 'ad-loaded' class, koi detection logic, koi hide nahi.
   ============================================================ */

.ad-slot-container {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  text-align: center;
  margin: 0 auto;
  min-height: 0;
  border: none;
  background: transparent;
}

/* Adsterra inject karta hai <iframe> andar — usko sahi se dikhane ke liye */
.ad-slot-container iframe {
  display: block;
  margin: 0 auto;
  border: none;
  max-width: 100%;
}

/* Sticky side ads — Desktop only */
.sticky-side-ad {
  position: fixed;
  top: 150px;
  width: 160px;
  z-index: 90;
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}
.left-sticky-ad { left: 10px; }
.right-sticky-ad { right: 10px; }

/* ✅ Mobile / tablet par left/right sticky ads hide */
@media (max-width: 1400px) {
  .sticky-side-ad { display: none !important; }
}

/* ==================== DOUBLE AD ROW (2× 728x90) ==================== */
.double-ad-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.double-ad-row .ad-slot-container {
  flex-shrink: 0;
  width: auto;
}
@media (max-width: 1500px) {
  .double-ad-row { flex-direction: column; }
}

/* ==================== MID GAMES ==================== */
.mid-games-wrapper { margin: 20px 0; }

.mid-games-grid-row1 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
@media (min-width: 500px) { .mid-games-grid-row1 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .mid-games-grid-row1 { grid-template-columns: repeat(8, 1fr); } }
.mid-games-grid-row2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 600px) { .mid-games-grid-row2 { grid-template-columns: repeat(4, 1fr); } }

.random-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              border-color 0.3s,
              box-shadow 0.3s;
  background-color: var(--card-bg);
  z-index: 1;
  transform-origin: center center;
}
.random-card:hover {
  transform: scale(1.15);
  border-color: var(--cyan-highlight);
  z-index: 99;
  box-shadow: 0 10px 25px rgba(0,0,0,0.9);
}
.random-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
  display: block;
}
.random-card-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  display: none;
}
.random-card-badge {
  position: absolute;
  top: 6px; left: 6px;
  background: #ff0055;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}
.random-card-icon {
  position: absolute;
  bottom: 6px; left: 6px;
  width: 24px; height: 24px;
  border-radius: 6px;
  object-fit: cover;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.8);
  z-index: 2;
}

/* ==================== DETAILS MAIN LAYOUT ==================== */
.details-main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 1024px) {
  .details-main-layout { grid-template-columns: 1fr 300px; }
}
.ads-sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: sticky;
  top: 75px;
  align-self: start;
}
.ads-sidebar .ad-slot-container {
  width: 100%;
  min-height: 0;
}

/* ==================== DESCRIPTION BOX ==================== */
.description-box {
  background: linear-gradient(135deg, #121215 0%, #1a0b2e 100%);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 14px;
  line-height: 1.75;
  color: #cbd5e1;
  margin-top: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}
.description-box p {
  margin: 0 0 12px 0;
}
.description-box .desc-intro {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.description-box .desc-text {
  color: #cbd5e1;
  margin-bottom: 12px;
  font-size: 14px;
  white-space: pre-line;
}
.description-box .desc-line {
  margin-bottom: 8px;
  font-size: 14px;
}
.description-box .desc-label {
  color: var(--cyan-highlight);
  font-weight: 700;
}
.description-box .desc-value {
  color: #e2e8f0;
}
.description-box .desc-q {
  color: #FFB703;
  font-weight: 700;
  margin-top: 14px;
  margin-bottom: 4px;
  font-size: 14px;
}
.description-box .desc-q strong { color: #FFB703; }
.description-box .desc-a {
  color: #cbd5e1;
  margin-bottom: 10px;
  padding-left: 16px;
  border-left: 3px solid #8b3dff;
  font-size: 14px;
}
.description-box .desc-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px 0;
}
.description-box .desc-list li {
  padding: 6px 0 6px 24px;
  position: relative;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
}
.description-box .desc-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--cyan-highlight);
  font-weight: 900;
  font-size: 14px;
}
.description-box .desc-list li strong { color: #ffffff; }

/* ==================== VIDEO CONTAINER ==================== */
.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 15px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #000;
}
.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==================== LATEST UPLOADS ==================== */
.latest-uploads-container {
  margin-top: 20px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px;
}
.latest-uploads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 14px;
}
@media (min-width: 600px) {
  .latest-uploads-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==================== FOOTER ==================== */
.site-footer {
  background-color: var(--secondary-bg);
  border-top: 1px solid var(--border-color);
  padding: 24px 20px;
  margin-top: 40px;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}
.footer-link-btn {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.3s ease;
}
.footer-link-btn:hover { color: var(--cyan-highlight); }
.footer-copyright {
  color: var(--text-secondary);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.footer-copyright img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
}

/* ==================== RESPONSIVE EXTRAS ==================== */
@media (max-width: 900px) {
  .hero-cover-img { max-width: 80%; max-height: 65%; }
}

@media (max-width: 768px) {
  .hero-bottom-info { padding: 10px 12px; }
}

@media (max-width: 600px) {
  .container { padding: 0 8px; }
  .hero-cover-img { max-width: 85%; max-height: 70%; }
  .hero-play-btn {
    padding: 10px 32px;
    font-size: 16px;
  }
  .detail-stats-pill { padding: 5px 8px; font-size: 11px; }
  .hero-info-right { gap: 6px; }
  .action-row { gap: 6px; }
  .hero-bottom-info {
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-info-left { flex: 1 1 100%; justify-content: center; text-align: center; }
  .hero-info-right { flex: 1 1 100%; justify-content: center; margin-left: 0; }
  .cat-badge { font-size: 11px; padding: 6px 10px; }
  .cat-count { font-size: 10px; padding: 1px 6px; }
  .description-box { padding: 16px; }
  .description-box .desc-intro { font-size: 14px; }
  .description-box .desc-text { font-size: 13px; }
}

@media (max-width: 480px) {
  .brand-icon { width: 34px; height: 34px; }
  .brand-title { font-size: 22px; }
  .search-container input { font-size: 13px; padding: 8px 12px 8px 36px; }
  .hero-title-text { max-width: 100px; font-size: 13px; }
  .cat-badges-row { padding: 12px; }
}