/* Games Carousel Navigation Styles */
.games-carousel-section {
  position: relative;
  min-height: 85vh;
  padding-top: calc(var(--header-height) + 20px);
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.carousel-slide-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-xl);
  padding: 44px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.8);
  position: relative;
  transition: all var(--transition-normal);
}

@media (max-width: 960px) {
  .carousel-slide-card {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 32px;
  }
}

.carousel-info {
  display: flex;
  flex-direction: column;
}

.carousel-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  color: var(--text-gold);
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

.carousel-tagline {
  font-size: 1.2rem;
  font-weight: 500;
  color: #E2E8F0;
  margin-bottom: 18px;
}

.carousel-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}

.carousel-media-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--bg-glass-border-hover);
  box-shadow: var(--shadow-lg), 0 0 30px var(--accent-purple-glow);
}

.carousel-media-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.carousel-nav-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.carousel-arrows {
  display: flex;
  gap: 12px;
}

.carousel-arrow-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--bg-glass-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-arrow-btn:hover:not(:disabled) {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: scale(1.08);
  box-shadow: 0 0 16px var(--accent-gold-glow);
}

.carousel-arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.carousel-thumbnails {
  display: flex;
  gap: 14px;
}

.carousel-thumb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-thumb-item.active {
  border-color: var(--accent-gold);
  background: rgba(229, 184, 105, 0.12);
  box-shadow: 0 0 16px var(--accent-gold-glow);
}

.carousel-thumb-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

/* ============================================================
   Candlelit Title — "Moonlit Cabinet"
   The "i" letters become burning candles; the remaining
   letters glow as if lit by the candlelight. Inspired by the
   in-game main menu (moonlit night, candlelit, gold gothic).
   ============================================================ */
.candle-title {
  letter-spacing: 0.05em;
  line-height: 1.2;
}
.candle-title .title-letter {
  display: inline-block;
  vertical-align: baseline;
  position: relative;
}
.candle-title .word-space {
  display: inline-block;
  width: 0.3em;
}
.candle-title .title-letter-break {
  display: block;
  width: 0;
  height: 0;
}

/* --- Letters glowing in candlelight --- */
.candle-title .letter {
  color: #F7ECC6;
  text-shadow:
    0 0 3px  rgba(255, 240, 200, 0.55),
    0 0 11px rgba(248, 184, 70, 0.45),
    0 0 26px rgba(245, 158, 11, 0.26),
    0 2px 7px rgba(0, 0, 0, 0.55);
  animation: candle-letter-flicker 3.8s ease-in-out infinite;
  animation-delay: var(--fd, 0s);
}
@keyframes candle-letter-flicker {
  0%, 100% { filter: brightness(0.9); }
  50%      { filter: brightness(1.14); }
}

/* --- Candle (replaces the "i") --- */
.candle-title .candle {
  position: relative;
  display: inline-block;
  width: 0.16em;
  height: 1.06em;
}
/* wax body */
.candle-title .candle-body {
  position: absolute;
  bottom: 0;
  left: 50%;
  margin-left: -0.08em;
  width: 0.16em;
  height: 0.74em;
  background: linear-gradient(90deg,
    #7d6a41 0%, #cabd92 16%, #f6efd8 44%, #fffdf5 54%, #e9dcae 82%, #6f5d38 100%);
  border-radius: 0.04em 0.04em 0.05em 0.05em / 0.05em 0.05em 0.02em 0.02em;
  box-shadow:
    inset 0 0.02em 0.03em rgba(0, 0, 0, 0.28),
    inset 0 -0.03em 0.05em rgba(0, 0, 0, 0.25),
    0 0 0.22em rgba(245, 158, 11, 0.35);
}
/* melted wax rim */
.candle-title .candle-body::before {
  content: "";
  position: absolute;
  top: -0.01em;
  left: 25%;
  width: 30%;
  height: 0.05em;
  background: radial-gradient(closest-side, rgba(255, 250, 228, 0.95), transparent);
}
/* wick */
.candle-title .candle-wick {
  position: absolute;
  bottom: 0.71em;
  left: 50%;
  margin-left: -0.012em;
  width: 0.024em;
  height: 0.06em;
  background: #241a10;
  border-radius: 0.01em;
}
/* flame halo (soft warm glow) */
.candle-title .candle-halo {
  position: absolute;
  bottom: 0.42em;
  left: 50%;
  margin-left: -0.475em;
  width: 0.95em;
  height: 0.95em;
  background: radial-gradient(closest-side,
    rgba(255, 190, 90, 0.5), rgba(255, 150, 40, 0.16) 52%, transparent 72%);
  filter: blur(1.5px);
  pointer-events: none;
  animation: candle-halo-pulse 1.9s ease-in-out infinite;
  animation-delay: var(--fd, 0s);
}
@keyframes candle-halo-pulse {
  0%, 100% { opacity: 0.75; }
  50%      { opacity: 1; }
}
/* flame */
.candle-title .candle-flame {
  position: absolute;
  bottom: 0.72em;
  left: 50%;
  margin-left: -0.09em;
  width: 0.18em;
  height: 0.34em;
  transform-origin: 50% 100%;
  border-radius: 50% 50% 50% 50% / 30% 30% 72% 72%;
  background: radial-gradient(58% 72% at 50% 74%,
    #fffbe6 0%, #ffe18c 30%, #ffbf52 54%, #ff8f2e 74%, rgba(255, 120, 20, 0) 100%);
  box-shadow: 0 0 0.16em rgba(255, 170, 60, 0.75);
  animation: candle-flame-flicker 0.6s ease-in-out infinite;
  animation-delay: var(--fd, 0s);
}
/* cool blue core at the flame base (subtle realism) */
.candle-title .candle-flame::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  margin-left: -0.03em;
  width: 0.06em;
  height: 0.12em;
  background: radial-gradient(closest-side, rgba(120, 180, 255, 0.55), transparent);
}
@keyframes candle-flame-flicker {
  0%   { transform: scaleY(1)    skewX(0deg);    }
  25%  { transform: scaleY(1.09) skewX(-2.5deg); }
  50%  { transform: scaleY(0.93) skewX(2deg);    }
  75%  { transform: scaleY(1.06) skewX(-1.5deg); }
  100% { transform: scaleY(1)    skewX(0deg);    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .candle-title .letter,
  .candle-title .candle-flame,
  .candle-title .candle-halo {
    animation: none;
  }
}
