/* Desktop Shoutbox - Side by Side with Game */
.game-shoutbox-sidebar {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 500px; /* Default height, will be adjusted by JS */
}

.shoutbox-header {
  background: linear-gradient(135deg, #118ed5 0%, #0d6efd 100%);
  color: white;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shoutbox-header strong {
  font-size: 13px;
  font-weight: 600;
}

.shoutbox-online-count {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.online-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.shoutbox-welcome {
  background: linear-gradient(135deg, rgba(17, 142, 213, 0.05) 0%, rgba(13, 110, 253, 0.05) 100%);
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.welcome-text {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
}

.welcome-text i {
  color: #118ed5;
  font-size: 14px;
}

.shoutbox-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0;
  background: #fafafa;
  scroll-behavior: smooth;
}

.shoutbox-messages::-webkit-scrollbar {
  width: 6px;
}

.shoutbox-messages::-webkit-scrollbar-track {
  background: transparent;
}

.shoutbox-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.shoutbox-messages::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.shoutbox-message {
  padding: 5px 12px;
  margin-bottom: 2px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: background 0.2s;
  animation: messageSlideIn 0.3s ease;
  position: relative;
}

.shoutbox-message:hover .message-delete-btn {
  opacity: 1;
}

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

.shoutbox-message:hover {
  background: rgba(0, 0, 0, 0.02);
}

.shoutbox-message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #118ed5 0%, #0d6efd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 11px;
  overflow: hidden;
}

.shoutbox-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shoutbox-message-content {
  flex: 1;
  min-width: 0;
}

.shoutbox-message-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.shoutbox-message-author {
  font-weight: 600;
  font-size: 12px;
  color: #1f2937;
}

.shoutbox-message-time {
  font-size: 10px;
  color: #94a3b8;
}

.shoutbox-message-text {
  font-size: 13px;
  line-height: 1.4;
  color: #374151;
  word-wrap: break-word;
}

.shoutbox-message-own .shoutbox-message-author {
  color: #118ed5;
  font-weight: 700;
}

.message-delete-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #ef4444;
  border: none;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  padding: 0;
}

.message-delete-btn:hover {
  background: #dc2626;
  transform: translateY(-50%) scale(1.1);
}

.shoutbox-input-container {
  border-top: 1px solid #e5e7eb;
  background: white;
  padding: 10px;
  flex-shrink: 0;
  position: relative;
}

.shoutbox-input-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
  border-radius: 20px;
  padding: 4px 4px 4px 4px;
}

.emoji-picker-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  transition: background 0.2s;
  flex-shrink: 0;
}

.emoji-picker-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.shoutbox-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: #1f2937;
  min-width: 0;
  padding: 4px;
}

.shoutbox-input::placeholder {
  color: #9ca3af;
}

.shoutbox-send-btn {
  background: linear-gradient(135deg, #118ed5 0%, #0d6efd 100%);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  color: white;
}

.shoutbox-send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(17, 142, 213, 0.4);
}

.shoutbox-send-btn:active {
  transform: scale(0.95);
}

.emoji-picker {
  position: absolute;
  bottom: 100%;
  left: 10px;
  right: 10px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 5px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.emoji-picker.hidden {
  display: none;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
  gap: 5px;
  font-size: 20px;
  text-align: center;
}

.emoji-grid span {
  cursor: pointer;
  padding: 1px;
  border-radius: 6px;
  transition: background 0.2s;
}

.emoji-grid span:hover {
  background: #f3f4f6;
}

.shoutbox-char-limit {
  text-align: right;
  font-size: 10px;
  color: #9ca3af;
  margin-top: 3px;
}

.shoutbox-empty {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
}

.shoutbox-empty i {
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.3;
}

.shoutbox-empty p {
  font-size: 12px;
  margin: 0;
}

/* Mobile Floating Chat - Smaller and Better Positioned */
/* Mobile Floating Chat */
.game-shoutbox-mobile {
  position: fixed;
  bottom: 80px;
  right: 15px;
  z-index: 999;
}

.shoutbox-toggle-btn {
  background: linear-gradient(135deg, #118ed5 0%, #0d6efd 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(17, 142, 213, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  padding: 0;
}

.shoutbox-toggle-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(17, 142, 213, 0.5);
}

.shoutbox-toggle-btn:active {
  transform: translateY(-1px);
}

.shoutbox-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  border-radius: 10px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shoutbox-badge.hidden {
  display: none;
}

.shoutbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  display: flex;
  align-items: flex-end;
  transition: opacity 0.3s ease;
  padding-bottom: 60px; /* Space for footer */
}

.shoutbox-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.shoutbox-modal {
  background: white;
  width: 100%;
  max-height: calc(100vh - 80px); /* Account for footer */
  height: 70vh;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 0.3s ease;
  position: relative;
  margin-bottom: 0;
}

.shoutbox-overlay.hidden .shoutbox-modal {
  transform: translateY(100%);
}

.shoutbox-close-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 18px;
}

/* Adjust for very small screens */
@media (max-height: 600px) {
  .shoutbox-modal {
    height: 60vh;
  }
}

@media (max-width: 576px) {
  .game-shoutbox-mobile {
    right: 10px;
    bottom: 70px;
  }
  
  .shoutbox-toggle-btn {
    width: 45px;
    height: 45px;
  }
  
  .shoutbox-toggle-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .shoutbox-overlay {
    padding-bottom: 50px;
  }
  
  .shoutbox-modal {
    max-height: calc(100vh - 70px);
    height: 65vh;
  }
}

/* Ensure input stays at bottom */
.shoutbox-modal .shoutbox-input-container {
  position: relative;
  bottom: 0;
  width: 100%;
  background: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
  .shoutbox-modal {
    height: 65vh;
    max-height: calc(100vh - 100px);
  }
  
  .shoutbox-overlay {
    padding-bottom: 70px;
  }
}

/* Mention Styles */
.mention-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 5px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.mention-dropdown.hidden {
  display: none;
}

.mention-user-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.mention-user-item:hover,
.mention-user-item.active {
  background: #f3f4f6;
}

.mention-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #118ed5 0%, #0d6efd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 12px;
  overflow: hidden;
}

.mention-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mention-user-info {
  flex: 1;
  min-width: 0;
}

.mention-user-name {
  font-weight: 600;
  font-size: 13px;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mention-user-username {
  font-size: 11px;
  color: #94a3b8;
}
/* body.night-mode overrides for mentions */
body.night-mode .mention-dropdown {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.65);
}

body.night-mode .mention-user-item:hover,
body.night-mode .mention-user-item.active {
  background: rgba(255,255,255,0.06);
}

body.night-mode .mention-user-name {
  color: #e2e8f0;
}

body.night-mode .mention-user-username {
  color: #94a3b8;
}

/* Highlighted mentions in messages */
.user-mention {
  background: linear-gradient(135deg, rgba(17, 142, 213, 0.15) 0%, rgba(13, 110, 253, 0.15) 100%);
  color: #118ed5;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}

.user-mention:hover {
  background: linear-gradient(135deg, rgba(17, 142, 213, 0.25) 0%, rgba(13, 110, 253, 0.25) 100%);
}
/* body.night-mode overrides for shoutbox */
body.night-mode .game-shoutbox-sidebar {
  background: #1e293b;
  box-shadow: 0 2px 14px rgba(0,0,0,0.55);
}

body.night-mode .shoutbox-welcome {
  background: linear-gradient(135deg, rgba(17,142,213,0.12) 0%, rgba(13,110,253,0.12) 100%);
  border-bottom-color: #334155;
}
body.night-mode .welcome-text { color: #94a3b8; }
body.night-mode .welcome-text i { color: #60a5fa; }

body.night-mode .shoutbox-messages {
  background: #0f172a;
}
body.night-mode .shoutbox-messages::-webkit-scrollbar-thumb {
  background: #475569;
}
body.night-mode .shoutbox-messages::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

body.night-mode .shoutbox-message:hover {
  background: rgba(255,255,255,0.04);
}

body.night-mode .shoutbox-message-author { color: #e2e8f0; }
body.night-mode .shoutbox-message-time { color: #64748b; }
body.night-mode .shoutbox-message-text { color: #cbd5e1; }
body.night-mode .shoutbox-message-own .shoutbox-message-author { color: #60a5fa; }

body.night-mode .shoutbox-input-container {
  background: #1e293b;
  border-top-color: #334155;
}

body.night-mode .shoutbox-input-wrapper {
  background: #0f172a;
}

body.night-mode .emoji-picker-btn:hover {
  background: rgba(255,255,255,0.06);
}

body.night-mode .shoutbox-input {
  color: #e2e8f0;
}
body.night-mode .shoutbox-input::placeholder {
  color: rgba(226,232,240,0.55);
}

body.night-mode .emoji-picker {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.65);
}
body.night-mode .emoji-grid span:hover {
  background: rgba(255,255,255,0.06);
}

body.night-mode .shoutbox-char-limit,
body.night-mode .shoutbox-empty {
  color: #94a3b8;
}

/* mobile modal + overlay */
body.night-mode .shoutbox-overlay {
  background: rgba(0,0,0,0.65);
}
body.night-mode .shoutbox-modal {
  background: #1e293b;
}


.game-card-overlay { pointer-events: none; }
.game-card a { display:block; }

/* ============================
   Game page custom styles
============================ */
.js_game-rate:hover { transform: scale(1.2); }
.js_game-rate:hover .rating-star { filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6)); }

.btn.js_game-favorite { transition: all 0.3s ease; }
.btn.js_game-favorite:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); }

.card { transition: transform 0.3s ease, box-shadow 0.3s ease; }

.side-nav li { transition: all 0.2s ease; }
.side-nav li:hover { background: rgba(17, 142, 213, 0.05); }
.side-nav li.active {
  background: linear-gradient(135deg, rgba(17, 142, 213, 0.1) 0%, rgba(13, 110, 253, 0.1) 100%);
  border-left: 3px solid #118ed5;
}

/* Related games hover effects */
.related-game-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(17, 142, 213, 0.2) !important; }
.related-game-card:hover .related-game-img { transform: scale(1.05); }
.related-game-card:hover .related-game-overlay { opacity: 1 !important; }

/* Featured games slider styles */
.featured-play-overlay:hover { opacity: 1 !important; }

#featuredGamesCarousel .carousel-item { transition: transform 0.6s ease-in-out; }
#featuredGamesCarousel .btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  color: #fff;
  background: #118ed5 !important;
}

.carousel-indicators li {
  width: 12px; height: 12px;
  border-radius: 50%;
  background-color: rgba(0,0,0,0.3);
}
.carousel-indicators .active { background-color: #000; }

/* Vertical ratio */
.ratio-9x16 { --bs-aspect-ratio: 177.78%; }
.ratio-9x16::before { padding-top: 177.78%; }

/* Admin feature button */
.js_admin-feature-game:hover { transform: scale(1.05); box-shadow: 0 6px 16px rgba(0,0,0,0.4) !important; }

/* Game Tag Badges */
.game-tag-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5) !important;
  background: linear-gradient(135deg, #f2f2f2 0%, #f1f1f1 100%) !important;
}
.game-tag-badge:active { transform: translateY(0); }
.game-tag-badge i { animation: pulse-icon 2s ease-in-out infinite; }

@media (min-width: 768px) {
  .js_game-favorite { flex: 2 !important; width: auto !important; }
  .js_game-share { flex: 1 !important; width: auto !important; }
}
@media (max-width: 767px) {
  .js_game-favorite, .js_game-share { width: 100% !important; margin-bottom: 0 !important; }
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Mobile horizontal scroll tabs */
@media (max-width: 767.98px) {
  .content-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .content-tabs::-webkit-scrollbar { display: none; }
  .content-tabs > ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
    margin: 0;
    padding: 8px 10px;
  }
  .content-tabs > ul > li { flex: 0 0 auto; float: none !important; }
  .content-tabs > ul > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
  }
  .content-tabs svg { flex: 0 0 auto; }
}
/* Vertical game container */
.game-container-vertical {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  min-height: 400px;
}

.game-wrapper-vertical {
  position: relative;
  width: 100%;
  max-width: 500px; /* Max width on desktop */
  height: 0;
  padding-bottom: 177.78%; /* 9:16 aspect ratio */
  max-height: 85vh; 
}

.game-wrapper-vertical iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


@media (min-width: 769px) {
  .game-wrapper-vertical {
    max-width: 450px;
    padding-bottom: 0;
    height: min(800px, 85vh); /* Max 800px OR 85% of screen height, whichever is smaller */
  }
}

/* Mobile: Full width but still reasonable height */
@media (max-width: 768px) {
  .game-wrapper-vertical {
    max-width: 100%;
    padding-bottom: 177.78%;
    max-height: 90vh;
  }
  
  .game-container-vertical {
    min-height: 0;
  }
}

/* Tablet: Medium size */
@media (min-width: 769px) and (max-width: 1024px) {
  .game-wrapper-vertical {
    max-width: 400px;
    height: min(700px, 85vh);
  }
}
.badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  filter: brightness(1.1);
}

/* Genre badge hover */
a.badge[href*="genre"]:hover {
  background: linear-gradient(135deg, #0d6efd 0%, #118ed5 100%) !important;
}

/* Tag badge hover */
a.badge.bg-light:hover {
  background: #e2e8f0 !important;
  color: #2d3748 !important;
  font-weight: 600 !important;
}

/* Mobile ready badge hover */
a.badge.bg-success:hover {
  background: #059669 !important;
  transform: translateY(-2px);
}
 /* Featured Games Carousel Styles */
    #featuredGamesCarousel .carousel-indicators {
      bottom: -45px;
      margin-bottom: 0;
    }
    
    #featuredGamesCarousel .carousel-indicators li {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background-color: rgba(0, 0, 0, 0.3);
      border: 2px solid transparent;
      margin: 0 6px;
      text-indent: -999px;
      overflow: hidden;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    
    #featuredGamesCarousel .carousel-indicators li.active {
      width: 32px;
      border-radius: 6px;
      background-color: #000;
      border-color: #000;
    }
    
    #featuredGamesCarousel .carousel-indicators li:hover {
      background-color: rgba(0, 0, 0, 0.6);
    }
    
    .featured-play-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0,0,0,0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity 0.3s;
    }
    
    .carousel-item:hover .featured-play-overlay {
      opacity: 1;
    }
    
    #featuredGamesCarousel .carousel-control-prev,
    #featuredGamesCarousel .carousel-control-next {
      width: 50px;
      opacity: 0.8;
      transition: opacity 0.3s;
    }
    
    #featuredGamesCarousel .carousel-control-prev:hover,
    #featuredGamesCarousel .carousel-control-next:hover {
      opacity: 1;
    }
    
    @media (max-width: 768px) {
      #featuredGamesCarousel .carousel-indicators {
        bottom: -35px;
      }
      
      #featuredGamesCarousel .carousel-indicators li {
        width: 8px;
        height: 8px;
        margin: 0 4px;
      }
      
      #featuredGamesCarousel .carousel-indicators li.active {
        width: 24px;
      }
    }
.js_game-embed:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#embedGameModal .modal-content {
  border-radius: 16px;
  border: none;
}

#embedGameModal .close {
  opacity: 1;
  text-shadow: none;
}

.share-social {
  flex: 1;
  transition: all 0.3s ease;
}

.share-social:hover {
  transform: translateY(-2px);
}

#game-embed-code {
  resize: vertical;
}
/* ============================
   NIGHT MODE OVERRIDES
============================ */

/* Vertical game container */
body.night-mode .game-container-vertical{
  background: #0b0f14; /* instead of pure #000 */
}

/* Badges hover (keep effect, tune shadow for dark) */
body.night-mode .badge:hover{
  box-shadow: 0 6px 14px rgba(0,0,0,0.55);
  filter: brightness(1.15);
}

/* Genre badge hover (same gradient ok on dark) */
body.night-mode a.badge[href*="genre"]:hover{
  background: linear-gradient(135deg, #0d6efd 0%, #118ed5 100%) !important;
  color: #fff !important;
}

/* Tag badge hover (bg-light badges) */
body.night-mode a.badge.bg-light:hover{
  background: rgba(255,255,255,0.10) !important;
  color: #e5eef7 !important;
  font-weight: 600 !important;
}

/* Mobile ready badge hover (bg-success) */
body.night-mode a.badge.bg-success:hover{
  background: #10b981 !important;
}
/* ============================
   NIGHT MODE OVERRIDES
============================ */

/* Indicators */
body.night-mode #featuredGamesCarousel .carousel-indicators li{
  background-color: rgba(255,255,255,0.22);
  border-color: transparent;
}

body.night-mode #featuredGamesCarousel .carousel-indicators li.active{
  background-color: rgba(255,255,255,0.92);
  border-color: rgba(255,255,255,0.92);
}

body.night-mode #featuredGamesCarousel .carousel-indicators li:hover{
  background-color: rgba(255,255,255,0.45);
}

/* Overlay (slightly lighter on dark UIs) */
body.night-mode .featured-play-overlay{
  background: rgba(0,0,0,0.35);
}

/* Controls (keep same behavior; just ensure readable) */
body.night-mode #featuredGamesCarousel .carousel-control-prev,
body.night-mode #featuredGamesCarousel .carousel-control-next{
  opacity: 0.9;
}
body.night-mode #featuredGamesCarousel .carousel-control-prev:hover,
body.night-mode #featuredGamesCarousel .carousel-control-next:hover{
  opacity: 1;
}

/* ============================
   NIGHT MODE OVERRIDES
   (add body.night-mode class)
============================ */
body.night-mode .side-nav li:hover {
  background: rgba(17, 142, 213, 0.10);
}
body.night-mode .side-nav li.active {
  background: linear-gradient(135deg, rgba(17, 142, 213, 0.18) 0%, rgba(13, 110, 253, 0.14) 100%);
  border-left-color: #118ed5;
}

body.night-mode .related-game-card:hover {
  box-shadow: 0 8px 22px rgba(17, 142, 213, 0.28) !important;
}

/* carousel dots in dark */
body.night-mode .carousel-indicators li {
  background-color: rgba(255,255,255,0.25);
}
body.night-mode .carousel-indicators .active {
  background-color: rgba(255,255,255,0.9);
}

/* tag badge hover background in dark */
body.night-mode .game-tag-badge:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.05) 100%) !important;
}

/* optional: keep btn-dark hover shadow nicer on dark bg */
body.night-mode #featuredGamesCarousel .btn-dark:hover {
  box-shadow: 0 10px 26px rgba(0,0,0,0.65);
}

.game-card-overlay { pointer-events: none; }
.game-card a { display:block; }

/* ============================
   Game page custom styles
============================ */
.js_game-rate:hover { transform: scale(1.2); }
.js_game-rate:hover .rating-star { filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6)); }

.btn.js_game-favorite { transition: all 0.3s ease; }
.btn.js_game-favorite:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); }

.card { transition: transform 0.3s ease, box-shadow 0.3s ease; }

.side-nav li { transition: all 0.2s ease; }
.side-nav li:hover { background: rgba(17, 142, 213, 0.05); }
.side-nav li.active {
  background: linear-gradient(135deg, rgba(17, 142, 213, 0.1) 0%, rgba(13, 110, 253, 0.1) 100%);
  border-left: 3px solid #118ed5;
}

/* Related games hover effects */
.related-game-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(17, 142, 213, 0.2) !important; }
.related-game-card:hover .related-game-img { transform: scale(1.05); }
.related-game-card:hover .related-game-overlay { opacity: 1 !important; }

/* Featured games slider styles */
.featured-play-overlay:hover { opacity: 1 !important; }

#featuredGamesCarousel .carousel-item { transition: transform 0.6s ease-in-out; }
#featuredGamesCarousel .btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  color: #fff;
  background: #118ed5 !important;
}

.carousel-indicators li {
  width: 12px; height: 12px;
  border-radius: 50%;
  background-color: rgba(0,0,0,0.3);
}
.carousel-indicators .active { background-color: #000; }

/* Vertical ratio */
.ratio-9x16 { --bs-aspect-ratio: 177.78%; }
.ratio-9x16::before { padding-top: 177.78%; }

/* Admin feature button */
.js_admin-feature-game:hover { transform: scale(1.05); box-shadow: 0 6px 16px rgba(0,0,0,0.4) !important; }

/* Game Tag Badges */
.game-tag-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5) !important;
  background: linear-gradient(135deg, #f2f2f2 0%, #f1f1f1 100%) !important;
}
.game-tag-badge:active { transform: translateY(0); }
.game-tag-badge i { animation: pulse-icon 2s ease-in-out infinite; }

@media (min-width: 768px) {
  .js_game-favorite { flex: 2 !important; width: auto !important; }
  .js_game-share { flex: 1 !important; width: auto !important; }
}
@media (max-width: 767px) {
  .js_game-favorite, .js_game-share { width: 100% !important; margin-bottom: 0 !important; }
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Mobile horizontal scroll tabs */
@media (max-width: 767.98px) {
  .content-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .content-tabs::-webkit-scrollbar { display: none; }
  .content-tabs > ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
    margin: 0;
    padding: 8px 10px;
  }
  .content-tabs > ul > li { flex: 0 0 auto; float: none !important; }
  .content-tabs > ul > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
  }
  .content-tabs svg { flex: 0 0 auto; }
}
/* Vertical game container */
.game-container-vertical {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  min-height: 400px;
}

.game-wrapper-vertical {
  position: relative;
  width: 100%;
  max-width: 500px; /* Max width on desktop */
  height: 0;
  padding-bottom: 177.78%; /* 9:16 aspect ratio */
  max-height: 85vh; 
}

.game-wrapper-vertical iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


@media (min-width: 769px) {
  .game-wrapper-vertical {
    max-width: 450px;
    padding-bottom: 0;
    height: min(800px, 85vh); /* Max 800px OR 85% of screen height, whichever is smaller */
  }
}

/* Mobile: Full width but still reasonable height */
@media (max-width: 768px) {
  .game-wrapper-vertical {
    max-width: 100%;
    padding-bottom: 177.78%;
    max-height: 90vh;
  }
  
  .game-container-vertical {
    min-height: 0;
  }
}

/* Tablet: Medium size */
@media (min-width: 769px) and (max-width: 1024px) {
  .game-wrapper-vertical {
    max-width: 400px;
    height: min(700px, 85vh);
  }
}
.badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  filter: brightness(1.1);
}

/* Genre badge hover */
a.badge[href*="genre"]:hover {
  background: linear-gradient(135deg, #0d6efd 0%, #118ed5 100%) !important;
}

/* Tag badge hover */
a.badge.bg-light:hover {
  background: #e2e8f0 !important;
  color: #2d3748 !important;
  font-weight: 600 !important;
}

/* Mobile ready badge hover */
a.badge.bg-success:hover {
  background: #059669 !important;
  transform: translateY(-2px);
}
 /* Featured Games Carousel Styles */
    #featuredGamesCarousel .carousel-indicators {
      bottom: -45px;
      margin-bottom: 0;
    }
    
    #featuredGamesCarousel .carousel-indicators li {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background-color: rgba(0, 0, 0, 0.3);
      border: 2px solid transparent;
      margin: 0 6px;
      text-indent: -999px;
      overflow: hidden;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    
    #featuredGamesCarousel .carousel-indicators li.active {
      width: 32px;
      border-radius: 6px;
      background-color: #000;
      border-color: #000;
    }
    
    #featuredGamesCarousel .carousel-indicators li:hover {
      background-color: rgba(0, 0, 0, 0.6);
    }
    
    .featured-play-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0,0,0,0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity 0.3s;
    }
    
    .carousel-item:hover .featured-play-overlay {
      opacity: 1;
    }
    
    #featuredGamesCarousel .carousel-control-prev,
    #featuredGamesCarousel .carousel-control-next {
      width: 50px;
      opacity: 0.8;
      transition: opacity 0.3s;
    }
    
    #featuredGamesCarousel .carousel-control-prev:hover,
    #featuredGamesCarousel .carousel-control-next:hover {
      opacity: 1;
    }
    
    @media (max-width: 768px) {
      #featuredGamesCarousel .carousel-indicators {
        bottom: -35px;
      }
      
      #featuredGamesCarousel .carousel-indicators li {
        width: 8px;
        height: 8px;
        margin: 0 4px;
      }
      
      #featuredGamesCarousel .carousel-indicators li.active {
        width: 24px;
      }
    }
.js_game-embed:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#embedGameModal .modal-content {
  border-radius: 16px;
  border: none;
}

#embedGameModal .close {
  opacity: 1;
  text-shadow: none;
}

.share-social {
  flex: 1;
  transition: all 0.3s ease;
}

.share-social:hover {
  transform: translateY(-2px);
}

#game-embed-code {
  resize: vertical;
}
/* ============================
   NIGHT MODE OVERRIDES
============================ */

/* Vertical game container */
body.night-mode .game-container-vertical{
  background: #0b0f14; /* instead of pure #000 */
}

/* Badges hover (keep effect, tune shadow for dark) */
body.night-mode .badge:hover{
  box-shadow: 0 6px 14px rgba(0,0,0,0.55);
  filter: brightness(1.15);
}

/* Genre badge hover (same gradient ok on dark) */
body.night-mode a.badge[href*="genre"]:hover{
  background: linear-gradient(135deg, #0d6efd 0%, #118ed5 100%) !important;
  color: #fff !important;
}

/* Tag badge hover (bg-light badges) */
body.night-mode a.badge.bg-light:hover{
  background: rgba(255,255,255,0.10) !important;
  color: #e5eef7 !important;
  font-weight: 600 !important;
}

/* Mobile ready badge hover (bg-success) */
body.night-mode a.badge.bg-success:hover{
  background: #10b981 !important;
}
/* ============================
   NIGHT MODE OVERRIDES
============================ */

/* Indicators */
body.night-mode #featuredGamesCarousel .carousel-indicators li{
  background-color: rgba(255,255,255,0.22);
  border-color: transparent;
}

body.night-mode #featuredGamesCarousel .carousel-indicators li.active{
  background-color: rgba(255,255,255,0.92);
  border-color: rgba(255,255,255,0.92);
}

body.night-mode #featuredGamesCarousel .carousel-indicators li:hover{
  background-color: rgba(255,255,255,0.45);
}

/* Overlay (slightly lighter on dark UIs) */
body.night-mode .featured-play-overlay{
  background: rgba(0,0,0,0.35);
}

/* Controls (keep same behavior; just ensure readable) */
body.night-mode #featuredGamesCarousel .carousel-control-prev,
body.night-mode #featuredGamesCarousel .carousel-control-next{
  opacity: 0.9;
}
body.night-mode #featuredGamesCarousel .carousel-control-prev:hover,
body.night-mode #featuredGamesCarousel .carousel-control-next:hover{
  opacity: 1;
}

/* ============================
   NIGHT MODE OVERRIDES
   (add body.night-mode class)
============================ */
body.night-mode .side-nav li:hover {
  background: rgba(17, 142, 213, 0.10);
}
body.night-mode .side-nav li.active {
  background: linear-gradient(135deg, rgba(17, 142, 213, 0.18) 0%, rgba(13, 110, 253, 0.14) 100%);
  border-left-color: #118ed5;
}

body.night-mode .related-game-card:hover {
  box-shadow: 0 8px 22px rgba(17, 142, 213, 0.28) !important;
}

/* carousel dots in dark */
body.night-mode .carousel-indicators li {
  background-color: rgba(255,255,255,0.25);
}
body.night-mode .carousel-indicators .active {
  background-color: rgba(255,255,255,0.9);
}

/* tag badge hover background in dark */
body.night-mode .game-tag-badge:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.05) 100%) !important;
}

/* optional: keep btn-dark hover shadow nicer on dark bg */
body.night-mode #featuredGamesCarousel .btn-dark:hover {
  box-shadow: 0 10px 26px rgba(0,0,0,0.65);
}