/* Pruned for index: keep only classes used on promo/trending cards */
.promo-container {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.border-animation {
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.promo-container:hover .border-animation {
  opacity: 1;
}

/* Hover effect to mimic featured-game-card link behavior */
.promo-container:hover {
  transform: translateZ(0);
}

/* Dual sweep lines from top-left: horizontal (top) and vertical (left) */
.promo-background::before,
.promo-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(255,255,255,0.95);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  animation-play-state: paused;
  z-index: 2;
  border-radius: inherit;
}

/* Top horizontal line */
.promo-background::before {
  height: 2px;
  width: 0;
  animation: line-sweep-x 1.8s ease-in-out infinite;
}

/* Left vertical line */
.promo-background::after {
  width: 2px;
  height: 0;
  animation: line-sweep-y 1.8s ease-in-out infinite;
}

.promo-container:hover .promo-background::before,
.promo-container:hover .promo-background::after {
  opacity: 1;
  animation-play-state: running;
}

/* Hover overlay elements not used on index have been removed */

@keyframes float-1 {
  0% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(40px, 20px) rotate(80deg); }
  40% { transform: translate(-30px, 60px) rotate(160deg); }
  60% { transform: translate(50px, -30px) rotate(240deg); }
  80% { transform: translate(-20px, 40px) rotate(320deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes float-2 {
  0% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-50px, -30px) rotate(90deg); }
  40% { transform: translate(30px, -40px) rotate(180deg); }
  60% { transform: translate(-40px, 50px) rotate(270deg); }
  80% { transform: translate(20px, -20px) rotate(320deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes float-3 {
  0% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(30px, -50px) rotate(70deg); }
  40% { transform: translate(-40px, 30px) rotate(140deg); }
  60% { transform: translate(20px, 40px) rotate(210deg); }
  80% { transform: translate(-30px, -30px) rotate(280deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

/* Keep bubble base (index uses .bubble divs) */
.bubble {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

/* Bubble positions/animations moved from page styles */
.promo-background .bubble:nth-child(1) {
  width: 40px;
  height: 40px;
  top: 20%;
  left: 30%;
  animation: float-1 15s ease-in-out infinite;
}

.promo-background .bubble:nth-child(2) {
  width: 30px;
  height: 30px;
  top: 40%;
  right: 25%;
  animation: float-2 18s ease-in-out infinite;
}

/* Minimal hover tweaks only */

.promo-container {
  position: relative;
  overflow: hidden;
}

.promo-content {
  position: relative;
  z-index: 2;
}

.promo-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 15px;
  z-index: 1;
}

@keyframes strobo-purple {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(105,108,255,0.00), 0 0 0 0 rgba(112,127,235,0.00);
  }
  50% {
    box-shadow: 0 0 24px 4px rgba(105,108,255,0.35), 0 0 48px 10px rgba(112,127,235,0.25);
  }
}

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

/* Sweep animations: go from 0 -> 100% -> 0 to return to the left/top */
@keyframes line-sweep-x {
  0% { width: 0; }
  50% { width: 100%; }
  100% { width: 0; }
}

@keyframes line-sweep-y {
  0% { height: 0; }
  50% { height: 100%; }
  100% { height: 0; }
}

/* Hover effect via .blur-sharp (requested) */
.blur-sharp {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: #000;
  transition: box-shadow 0.3s ease, outline-color 0.3s ease;
}

.blur-sharp img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 1s ease;
}

.blur-sharp:hover img {
  filter: blur(40px);
}

.blur-sharp:hover {
  animation: strobo-purple 1.5s ease-in-out infinite;
  outline: 2px solid rgba(105,108,255,0.65);
  outline-offset: 2px;
}

.blur-sharp::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  pointer-events: none;
  border: 2px solid transparent;
}

.blur-sharp:hover::after {
  border-color: rgba(112,127,235,0.5);
}

/* Map same effects to existing sample markup (featured-game-card) */
.featured-game-card {
  position: relative;
  display: block;
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #000;
}

.featured-game-card .blur-sharp img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 1s ease;
}

.featured-game-card:hover .blur-sharp img {
  filter: blur(40px);
}

.featured-game-card .cover {
  position: absolute !important;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 1s ease;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.55) 100%);
  border-radius: 1rem;
}

.featured-game-card:hover .cover {
  opacity: 1;
}

.featured-game-card:hover {
  animation: strobo-purple 1.5s ease-in-out infinite;
  outline: 2px solid rgba(105,108,255,0.65);
  outline-offset: 2px;
  transform: translateZ(0);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.9);
}

/* Grid helper: 8 kolom pada layar >= 1280px */
@media (min-width: 1280px) {
  .grid-cols-8-xl {
    grid-template-columns: repeat(8, 1fr) !important;
  }
}

/* Trending Grid (moved from main.css) */
.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.trending-item {
  position: relative;
}

/* Navbar search overrides (moved from main.css) */
.navbar-search-wrapper .search-toggler {
  color: #000 !important;
  display: flex !important;
  align-items: center !important;
  vertical-align: middle !important;
}

.navbar-search-wrapper .search-toggler span {
  color: #000 !important;
  font-weight: 500 !important;
}

.navbar-nav .navbar-search-wrapper {
  display: flex !important;
  align-items: center !important;
}
/* Index page styles (moved from inline <style> blocks) */
/* index.php style block 0 */
/* Lazy loading for images - apply only to images with data-src */
.game-ui img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-ui img[data-src][data-loaded="true"] {
  opacity: 1;
}

/* Order info styles */
.order-info {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  color: white;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.order-info:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

.order-info i {
  font-size: 0.6rem;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

/* Order info styles untuk trending - sama seperti promo */
.order-info-trending {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  color: white;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.order-info-trending:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

.order-info-trending i {
  font-size: 0.6rem;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

@media (min-width: 1400px) {
  .container-xxl {
    max-width: 1440px;
  }
}

.container-xxl {
  width: 100%;
  max-width: 1440px;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

.container-p-y {
  padding-top: 1.625rem;
  padding-bottom: 1.625rem;
}

/* Ensure proper layout width */
.layout-page {
  width: 100%;
  max-width: 100%;
}

.layout-container {
  width: 100%;
  max-width: 100%;
}

/* (dibersihkan) Hapus override navbar dan utilitas global yang tidak spesifik halaman */

/* index.php style block 1 */
/* Alert variants for empty states */
.alert-dot {
  border-style: dotted !important;
}

.alert-dash-dot {
  border-width: 2px;
  border-style: solid;
  border-color: transparent;
  border-image-slice: 1;
  border-image-source: repeating-linear-gradient(
    90deg,
    currentColor 0 10px,               /* dash */
    transparent 10px 16px,             /* gap */
    currentColor 16px 18px,            /* dot */
    transparent 18px 24px              /* gap */
  );
}

/* Border styles */
.alert-dashed { border-style: dashed !important; }
.alert-double { border-style: double !important; border-width: 3px !important; border-color: currentColor !important; }

/* Visual effects */
.alert-glow { box-shadow: 0 0 0.5rem rgba(var(--bs-primary-rgb), 0.35), 0 0 1.25rem rgba(var(--bs-primary-rgb), 0.25); }
.alert-glow.alert-outline-success { box-shadow: 0 0 0.5rem rgba(var(--bs-success-rgb), 0.35), 0 0 1.25rem rgba(var(--bs-success-rgb), 0.25); }
.alert-glow.alert-outline-warning { box-shadow: 0 0 0.5rem rgba(var(--bs-warning-rgb), 0.35), 0 0 1.25rem rgba(var(--bs-warning-rgb), 0.25); }
.alert-glow.alert-outline-danger { box-shadow: 0 0 0.5rem rgba(var(--bs-danger-rgb), 0.35), 0 0 1.25rem rgba(var(--bs-danger-rgb), 0.25); }
.alert-glow.alert-outline-info { box-shadow: 0 0 0.5rem rgba(var(--bs-info-rgb), 0.35), 0 0 1.25rem rgba(var(--bs-info-rgb), 0.25); }

.alert-stripes {
  background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0 10px, rgba(0,0,0,0.02) 10px 20px);
  background-size: auto;
}

/* Layout with icon */
.alert-with-icon { display: flex; align-items: center; gap: 10px; }
.alert-with-icon .alert-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: currentColor; color: #fff; font-size: 14px; }
.alert-with-icon .alert-content { flex: 1; }

/* index.php style block 2 */
.trending-item h6,
.trending-item p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trending-item h6 {
  font-size: 0.85rem !important;
}

.trending-item p {
  font-size: 0.75rem !important;
}

.trending-item .avatar {
  width: 60px !important;
  height: 60px !important;
}

.trending-item .avatar i {
  font-size: 2rem !important;
}

/* grid trending memakai kelas CSS halaman ini saja */
.trending-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1199.98px) {
  .trending-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991.98px) {
  .trending-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .trending-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .trending-item:nth-child(n+5) {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .trending-item:nth-child(n+5) {
    display: none !important;
  }
}

/* index.php style block 3 */
.nav-pills .nav-link:not(.active) {
  color: #566a7f;
  background: #ebeef0;
}

.nav-pills .nav-link.active {
  background: var(--bs-primary);
  color: white;
}

.nav-pills {
  margin-bottom: 1rem;
}

/* Horizontal scroll for tabs */
.nav-pills.flex-nowrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f7fafc;
}

.nav-pills.flex-nowrap::-webkit-scrollbar {
  height: 4px;
}

.nav-pills.flex-nowrap::-webkit-scrollbar-track {
  background: #f7fafc;
  border-radius: 2px;
}

.nav-pills.flex-nowrap::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 2px;
}

.nav-pills.flex-nowrap::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}


.container-xxl {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.row>.col-12.px-0 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Grid is now controlled by Tailwind utility classes on the container */

/* Custom Game Card Styles */
.custom-game-card {
  position: relative;
  display: block;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s ease;
  aspect-ratio: 194 / 286;
  cursor: pointer;
  border: 2px solid transparent;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.custom-game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: purpleStrobe 1.5s infinite;
}

.custom-game-card:active {
  transform: translateY(-2px);
}

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

.game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: all 0.3s ease;
  opacity: 0;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.game-image img[data-loaded="true"] {
  opacity: 1;
}

.custom-game-card:hover .game-image img {
  filter: blur(5px);
  transform: scale(1.1);
}

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: all 0.3s ease;
  padding: 20px;
  text-align: center;
}

.custom-game-card:hover .game-overlay {
  opacity: 1;
}

.game-logo {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  backdrop-filter: blur(10px);
}

.game-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-logo img[data-loaded="true"] {
  opacity: 1;
}

.game-info h3 {
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 6px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
  word-wrap: break-word;
  hyphens: auto;
}

.game-info p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.7rem;
  margin: 0;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  word-wrap: break-word;
  hyphens: auto;
}

/* Ensure overlay text has proper wrapping */
.featured-game-card .cover .text-center p {
  word-wrap: break-word !important;
  hyphens: auto !important;
  white-space: normal !important;
  max-width: 100% !important;
}

/* Ensure small favicon/logo inside featured cards doesn't get cropped */
.featured-game-card .cover img[alt="icon"] {
  object-fit: contain !important;
  object-position: center;
}

/* Center icon, name, and subtitle within the overlay */
.featured-game-card .cover .flex.flex-col {
  justify-content: center !important;
  align-items: center !important;
  gap: 2px;
  text-align: center;
}

/* Mobile positioning for overlay content - centered */
@media (max-width: 768px) {
  .featured-game-card .cover .flex.flex-col {
    justify-content: center !important;
    align-items: center !important;
    gap: 12px;
    text-align: center;
    padding-top: 0 !important;
  }

  .game-overlay {
    justify-content: center !important;
    align-items: center !important;
    padding-top: 0 !important;
  }

  /* Add margin between icon and text on mobile */
  .featured-game-card .cover .flex.flex-col > div:first-child {
    margin-bottom: 8px;
  }
}

/* Extra small mobile positioning */
@media (max-width: 576px) {
  .featured-game-card .cover .flex.flex-col {
    justify-content: center !important;
    align-items: center !important;
    gap: 10px;
    text-align: center;
    padding-top: 0 !important;
  }

  .game-overlay {
    justify-content: center !important;
    align-items: center !important;
    padding-top: 0 !important;
  }

  /* Add margin between icon and text on small mobile */
  .featured-game-card .cover .flex.flex-col > div:first-child {
    margin-bottom: 6px;
  }
}

.featured-game-card .cover .subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.65rem;
  line-height: 1.2;
}

/* Remove auto margins that keep icon/text from moving */
.featured-game-card .cover .my-auto {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Nudge title and subtitle a bit upward */
.featured-game-card .cover .text-center {
  margin-top: 0 !important;
  transform: translateY(-6px);
}

/* Apply purple strobe effect on featured cards */
.featured-game-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: none;
  transition: all 0.3s ease;
  /* neutralize tailwind ring colors to avoid black edges */
  --tw-ring-color: transparent;
  --tw-ring-offset-color: transparent;
}

.featured-game-card:hover {
  transform: translateY(-3px);
  animation: purpleStrobe 1.5s infinite;
}

/* Purple Strobe Animation */
@keyframes purpleStrobe {
  0% {
    border-color: transparent;
    box-shadow: 0 0 0 0 rgba(147, 51, 234, 0);
  }

  25% {
    border-color: rgba(147, 51, 234, 0.5);
    box-shadow: 0 0 10px 2px rgba(147, 51, 234, 0.3);
  }

  50% {
    border-color: rgba(147, 51, 234, 0.8);
    box-shadow: 0 0 15px 3px rgba(147, 51, 234, 0.5);
  }

  75% {
    border-color: rgba(147, 51, 234, 0.5);
    box-shadow: 0 0 10px 2px rgba(147, 51, 234, 0.3);
  }

  100% {
    border-color: transparent;
    box-shadow: 0 0 0 0 rgba(147, 51, 234, 0);
  }
}

/* Responsive adjustments - Maintain good proportions like desktop */

@media (max-width: 992px) {

  .game-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }

  .game-logo img {
    width: 30px;
    height: 30px;
  }

  .game-info h3 {
    font-size: 0.8rem;
  }

  .game-info p {
    font-size: 0.6rem;
  }
}

@media (max-width: 768px) {
  .custom-game-card {
    aspect-ratio: 110 / 265;
  }

  .game-logo {
    width: 45px;
    height: 45px;
    margin-bottom: 8px;
  }

  .game-logo img {
    width: 28px;
    height: 28px;
  }

  .game-info h3 {
    font-size: 0.75rem;
  }

  .game-info p {
    font-size: 0.55rem;
  }

  .game-overlay {
    padding: 12px;
  }
}

@media (max-width: 576px) {
  .custom-game-card {
    aspect-ratio: 110 / 265;
  }

  .game-logo {
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
  }

  .game-logo img {
    width: 25px;
    height: 25px;
  }

  .game-info h3 {
    font-size: 0.7rem;
    margin-bottom: 2px;
  }

  .game-info p {
    font-size: 0.5rem;
    line-height: 1.2;
    display: none;
    /* Hide description on very small screens */
  }

  .game-overlay {
    padding: 10px;
  }
}

@media (max-width: 400px) {

  .game-logo {
    width: 35px;
    height: 35px;
    margin-bottom: 4px;
  }

  .game-logo img {
    width: 20px;
    height: 20px;
  }

  .game-info h3 {
    font-size: 0.65rem;
    margin-bottom: 1px;
  }

  .game-info p {
    display: none;
    /* Hide description on very small screens */
  }

  .game-overlay {
    padding: 8px;
  }
}

