/* GLOBAL RESET */
html, body {
  height: 100%;
  margin: 0;
  /* Removed solid black to allow video to show */
  background-color: transparent; 
}

body {
  height: 100%;
  margin: 0;
  position: relative;
  color: #fff;
  font-family: Arial, sans-serif;
  text-align: center;
}

/* BACKGROUND VIDEO */
.background-video-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -2; /* Pushed further back */
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent; /* Changed from black */
}

#background-video {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 100vw;
  min-height: 100vh;
  object-fit: cover;
  pointer-events: none;
  z-index: -2;
}

/* Optional Overlay - Adjust opacity (0.4) to make text readable without hiding video */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
  pointer-events: none;
}

/* LOGO & DISCLOSURE */
.logo-container {
  text-align: center;
  margin: 20px 0;
  position: relative;
  z-index: 10;
}

.logo {
  max-width: 100%;
  height: auto;
}

.affiliate-disclosure {
  font-size: 0.65rem; 
  color: #aaa; /* Lighter grey for visibility on video */
  padding: 5px;
  max-width: 800px;
  margin: 0 auto;
  font-style: italic;
  line-height: 1.2;
}

/* GALLERY GRID - THE LAW */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch; 
  margin: 0 auto;
  gap: 10px;
  max-width: 1400px;
  position: relative;
  z-index: 10;
}

.galleryitem {
  box-sizing: border-box;
  margin: 5px;
  display: flex;
  flex-direction: column;
  height: 275px; 
  border-radius: 15px;
  overflow: hidden;
  background-color: transparent;
}

.gallery::after {
  content: "";
  flex: auto;
}

.galleryitem > a {
  display: block;
  width: 100%;
  height: 100%;
}

.galleryitem figure {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

/* CAROUSEL */
.carousel-container {
  position: relative;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  z-index: 1;
}

.carousel-slide.active {
  position: relative;
  opacity: 1;
  z-index: 2;
}

.galleryimg {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  object-position: center;
  border-radius: inherit;
}

/* IFRAME / PLAYER */
.iframe-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 15px;
}

#player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill; 
}

/* BUTTONS */
.iframe-button {
  cursor: pointer;
  position: absolute;
  z-index: 99999;
  background-color: #000;
  color: #fff;
  border: 2px solid #fff;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 20px;
  transition: background-color 0.3s ease;
}

.iframe-button:hover:not(:disabled) {
  background-color: #ffffff;
  color: #000;
  border: 2px solid #000;
}

.iframe-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: #444;
}

.next-button { top: 10px; right: 10px; }
.prev-button { top: 10px; left: 10px; }
.unmute-button { bottom: 10px; left: 50%; transform: translateX(-50%); }
.popout-button { bottom: 10px; left: 54px; transform: translateX(-50%); }
.vol-up-button { bottom: 50px; right: 8px; }
.vol-down-button { bottom: 10px; right: 10px; }

/* BLACKJACK CABINET - THE 4TH SLOT */
.galleryitem-bj {
  /* Semi-transparent black so the video peeks through behind the machine */
  background-color: rgba(0, 0, 0, 0.75) !important;
  border: 1px solid #d4af37;
  padding: 10px;
  backdrop-filter: blur(4px);
}

.bj-score-badge {
  background: #111;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #d4af37;
  font-family: monospace;
  font-size: 12px;
}

.ascii-card {
  display: inline-block;
  animation: card-pop 0.3s ease-out;
  background: #fff;
  padding: 2px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  white-space: pre;
  font-size: 10px;
  line-height: 1.1;
  color: #000;
  border: 1px solid #d4af37;
  box-shadow: 2px 2px 0px #000;
}

.bj-main-btn {
  background: #d4af37;
  color: #000;
  border: none;
  font-weight: bold;
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
}

.bj-bet-btn {
  background: #222;
  color: #fff;
  border: 1px solid #444;
  padding: 3px 8px;
  font-size: 10px;
  border-radius: 3px;
  cursor: pointer;
}

/* ANIMATIONS */
@keyframes card-pop {
  0% { transform: translateY(15px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes slowInvert {
  0% { background-color: #000; color: #fff; border-color: #fff; }
  50% { background-color: #fff; color: #000; border-color: #000; box-shadow: 0 0 20px rgba(255,255,255,0.8); }
  100% { background-color: #000; color: #fff; border-color: #fff; }
}

.unmute-anim {
  animation: slowInvert 2.5s infinite ease-in-out !important;
}

/* RESPONSIVE QUERIES - THE LAW */
@media only screen and (min-width: 1200px) {
  .galleryitem { flex: 0 0 calc(33.33% - 20px); max-width: calc(33.33% - 20px); }
}

@media only screen and (max-width: 1199px) and (min-width: 768px) {
  .galleryitem { flex: 0 0 calc(50% - 20px); max-width: calc(50% - 20px); }
}

@media only screen and (max-width: 767px) {
  .galleryitem {
    flex: 0 0 calc(100% - 20px);
    max-width: calc(100% - 20px);
    height: 250px;
  }
  .iframe-container {
    padding-top: 56.25%; 
  }
  #player {
    object-fit: cover;
  }
}

/* FOOTER LOGOS */
.bottom-logos-container {
  text-align: center;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
}

.bottom-logos {
  margin-top: 10px;
  margin-bottom: -40px;
}

.bottom-logo {
  max-width: 100%;
  height: auto;
}

.article-container {
  max-width: 700px;
  margin: 10px auto;
  padding: 0 20px;
  line-height: 1.6;
  text-align: center;
  font-weight: bold;
  position: relative;
  z-index: 10;
}