/**
 * 테마8(CC) — 슬롯 게임사별 게임 목록 모달 (#slotModal)
 * 메인(cc8-cc-skin) · 서브(cc8-subpage) 공통. 다른 테마에는 비적용.
 */
body.cc8-cc-skin #slotModal.modal .modal-dialog.modal-xl,
body.cc8-subpage #slotModal.modal .modal-dialog.modal-xl {
  max-width: min(1180px, 96vw);
}

body.cc8-cc-skin #slotModal .modal-content,
body.cc8-subpage #slotModal .modal-content {
  background: linear-gradient(165deg, #1c1e24 0%, #12141a 48%, #0e1014 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(0, 0, 0, 0.35) inset;
  color: #e8eaef;
  overflow: hidden;
}

body.cc8-cc-skin #slotModal .modal-header,
body.cc8-subpage #slotModal .modal-header {
  padding: 0.9rem 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
}

body.cc8-cc-skin #slotModal .modal-title,
body.cc8-subpage #slotModal .modal-title {
  font-family: "Oswald", "Noto Sans KR", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.25;
}

body.cc8-cc-skin #slotModal .modal-body,
body.cc8-subpage #slotModal .modal-body {
  background: #101218;
  padding: 1.2rem 1.35rem 1.45rem;
  max-height: min(72vh, 760px);
  overflow-y: auto;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  scrollbar-width: thin;
}

body.cc8-cc-skin #slotModal .modal-body::-webkit-scrollbar,
body.cc8-subpage #slotModal .modal-body::-webkit-scrollbar {
  width: 8px;
}

body.cc8-cc-skin #slotModal .modal-body::-webkit-scrollbar-thumb,
body.cc8-subpage #slotModal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

body.cc8-cc-skin #slotModal .modal-body::-webkit-scrollbar-thumb:hover,
body.cc8-subpage #slotModal .modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* 그리드 간격 */
body.cc8-cc-skin #slotModal .modal-body .row,
body.cc8-subpage #slotModal .modal-body .row {
  --bs-gutter-x: 0.9rem;
  --bs-gutter-y: 0.9rem;
}

body.cc8-cc-skin #slotModal .modal-body .col-4,
body.cc8-cc-skin #slotModal .modal-body .col-md-3,
body.cc8-cc-skin #slotModal .modal-body .col-lg-2,
body.cc8-subpage #slotModal .modal-body .col-4,
body.cc8-subpage #slotModal .modal-body .col-md-3,
body.cc8-subpage #slotModal .modal-body .col-lg-2 {
  margin-bottom: 0;
}

/* 카드: 다크 타일 + 타이포 계층 */
body.cc8-cc-skin #slotModal .slot-modal-game-card,
body.cc8-subpage #slotModal .slot-modal-game-card {
  display: block;
  background: #1a1d24;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  overflow: hidden;
  color: #c5cad3;
  text-decoration: none !important;
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.2s ease;
}

body.cc8-cc-skin #slotModal .slot-modal-game-card:hover,
body.cc8-cc-skin #slotModal .slot-modal-game-card:focus-visible,
body.cc8-subpage #slotModal .slot-modal-game-card:hover,
body.cc8-subpage #slotModal .slot-modal-game-card:focus-visible {
  border-color: rgba(57, 255, 20, 0.38);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
  color: #eef0f4;
}

body.cc8-cc-skin #slotModal .slot-modal-game-card:focus-visible,
body.cc8-subpage #slotModal .slot-modal-game-card:focus-visible {
  outline: 2px solid rgba(9, 250, 219, 0.65);
  outline-offset: 2px;
}

body.cc8-cc-skin #slotModal .slot-icon,
body.cc8-subpage #slotModal .slot-icon {
  width: 100% !important;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

body.cc8-cc-skin #slotModal .slot-modal-game-card:hover .slot-icon,
body.cc8-subpage #slotModal .slot-modal-game-card:hover .slot-icon {
  transform: scale(1.04);
  opacity: 0.88;
}

/* 기본 레이아웃: 썸네일 아래 메타 정보 (호버 오버레이 전제 레이아웃 무력화) */
body.cc8-cc-skin #slotModal .slot-modal-game-card .overlay,
body.cc8-subpage #slotModal .slot-modal-game-card .overlay {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  height: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  opacity: 1 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.28rem;
  padding: 0.62rem 0.45rem 0.72rem;
  box-sizing: border-box;
  background: linear-gradient(180deg, #15171d 0%, #12141a 100%) !important;
  border: none !important;
  margin: 0 !important;
}

body.cc8-cc-skin #slotModal .overlay.img-thumbnail,
body.cc8-subpage #slotModal .overlay.img-thumbnail {
  background-color: transparent !important;
  padding: 0.62rem 0.45rem 0.72rem !important;
}

/* 게임 제목 */
body.cc8-cc-skin #slotModal .overlay .name,
body.cc8-subpage #slotModal .overlay .name {
  position: static !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100%;
  margin: 0;
  padding: 0 2px;
  font-family: "Noto Sans KR", system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: -0.01em;
  text-align: center;
  color: #f1f3f5 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.55em;
  word-break: break-word;
}

/* 제공사 — 보조 텍스트 */
body.cc8-cc-skin #slotModal .overlay .provider,
body.cc8-subpage #slotModal .overlay .provider {
  position: static !important;
  transform: none !important;
  width: 100% !important;
  margin: 0;
  padding: 0 2px;
  font-family: "Noto Sans KR", system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: #7c8494 !important;
}

/* 플레이 아이콘 — style_5 #slotModal 의 absolute/숨김 호버 배지 무력화 */
body.cc8-cc-skin #slotModal .modal-body .overlay .slot-modal-play-badge,
body.cc8-subpage #slotModal .modal-body .overlay .slot-modal-play-badge {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0.1rem 0 0 !important;
  opacity: 1 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: auto !important;
}

body.cc8-cc-skin #slotModal .modal-body .col-4:hover .overlay .slot-modal-play-badge,
body.cc8-cc-skin #slotModal .modal-body .col-md-3:hover .overlay .slot-modal-play-badge,
body.cc8-cc-skin #slotModal .modal-body .col-lg-2:hover .overlay .slot-modal-play-badge,
body.cc8-subpage #slotModal .modal-body .col-4:hover .overlay .slot-modal-play-badge,
body.cc8-subpage #slotModal .modal-body .col-md-3:hover .overlay .slot-modal-play-badge,
body.cc8-subpage #slotModal .modal-body .col-lg-2:hover .overlay .slot-modal-play-badge {
  transform: none !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

body.cc8-cc-skin #slotModal .overlay .slot-modal-play-badge .play,
body.cc8-subpage #slotModal .overlay .slot-modal-play-badge .play,
body.cc8-cc-skin #slotModal .modal-body .overlay .slot-modal-play-badge i,
body.cc8-subpage #slotModal .modal-body .overlay .slot-modal-play-badge i {
  font-size: 1.28rem !important;
  line-height: 1;
  color: #39ff14 !important;
  margin-left: 0 !important;
  text-shadow: none !important;
  filter: drop-shadow(0 0 8px rgba(57, 255, 20, 0.35));
  transition: transform 0.2s ease, filter 0.2s ease;
}

body.cc8-cc-skin #slotModal .slot-modal-game-card:hover .play,
body.cc8-subpage #slotModal .slot-modal-game-card:hover .play {
  transform: scale(1.08);
  filter: drop-shadow(0 0 12px rgba(57, 255, 20, 0.55));
}

/* 서브페이지: style_5 의 col:hover 썸네일 변형을 CC 톤으로 통일 */
body.cc8-subpage #slotModal .modal-body .col-4:hover .slot-icon,
body.cc8-subpage #slotModal .modal-body .col-md-3:hover .slot-icon,
body.cc8-subpage #slotModal .modal-body .col-lg-2:hover .slot-icon {
  transform: scale(1.04) !important;
  border-color: rgba(57, 255, 20, 0.4) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45) !important;
}

body.cc8-subpage #slotModal .modal-body .col-4:hover .overlay,
body.cc8-subpage #slotModal .modal-body .col-md-3:hover .overlay,
body.cc8-subpage #slotModal .modal-body .col-lg-2:hover .overlay {
  border-color: rgba(57, 255, 20, 0.22) !important;
  background: linear-gradient(180deg, #1c1f28 0%, #15171e 100%) !important;
}

body.cc8-subpage #slotModal .modal-body .col-4:hover .overlay .name,
body.cc8-subpage #slotModal .modal-body .col-md-3:hover .overlay .name,
body.cc8-subpage #slotModal .modal-body .col-lg-2:hover .overlay .name {
  color: #f8fafc !important;
}

/* 상단으로 버튼 */
body.cc8-cc-skin #slotModal #btn-back-to-top,
body.cc8-subpage #slotModal #btn-back-to-top {
  background: rgba(57, 255, 20, 0.12) !important;
  border: 1px solid rgba(57, 255, 20, 0.4) !important;
  color: #7fff5a !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

body.cc8-cc-skin #slotModal #btn-back-to-top:hover,
body.cc8-subpage #slotModal #btn-back-to-top:hover {
  background: rgba(57, 255, 20, 0.22) !important;
  color: #b8ff9e !important;
}

/* 레거시 전역 #slotModal div { overflow:hidden } 등과 충돌 완화 */
body.cc8-cc-skin #slotModal .modal-body .col-4,
body.cc8-cc-skin #slotModal .modal-body .col-md-3,
body.cc8-cc-skin #slotModal .modal-body .col-lg-2,
body.cc8-subpage #slotModal .modal-body .col-4,
body.cc8-subpage #slotModal .modal-body .col-md-3,
body.cc8-subpage #slotModal .modal-body .col-lg-2 {
  overflow: visible;
}

@media (max-width: 576px) {
  body.cc8-cc-skin #slotModal .overlay .name,
  body.cc8-subpage #slotModal .overlay .name {
    font-size: 0.76rem;
    min-height: 2.4em;
  }

  body.cc8-cc-skin #slotModal .overlay .provider,
  body.cc8-subpage #slotModal .overlay .provider {
    font-size: 0.625rem;
  }
}
