/* ============================================================
   천궁(프리마) 게임리스트 팝업(#gamePopup) 스타일
   버그: 천궁 _Layout이 st10-venus popup.css를 로드하지 않아 슬롯
         게임리스트가 스타일 없이 페이지 하단에 raw로 노출됨.
   수정: st10-venus popup.css의 .game-popup 블록 이식 + 프리마 금색 톤
         (청록 rgba(0,212,170)→금 rgba(255,189,63), --earth-primary 금색).
   ============================================================ */
.game-popup {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: var(--z-game-popup);
    background: rgba(5, 13, 26, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
}
.game-popup.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}
.game-popup-inner {
    position: relative;
    width: 100%;
    max-width: 1200px;
    max-height: calc(100vh - 80px);
    background: rgba(10, 22, 40, 0.96);
    border: 1px solid rgba(255, 189, 63, 0.2);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 189, 63, 0.12);
}
.game-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-layer2);
    border-bottom: 1px solid rgba(255, 189, 63, 0.15);
}
.game-popup-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--earth-text);
    font-family: 'Orbitron', 'Noto Sans KR', sans-serif;
    letter-spacing: 0.02em;
}
.game-popup-close {
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(26, 58, 92, 0.8);
    border: 1px solid rgba(255, 189, 63, 0.3);
    border-radius: 50%;
    color: var(--earth-text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}
.game-popup-close:hover {
    background: rgba(255, 189, 63, 0.2);
    color: var(--earth-text);
    border-color: var(--earth-primary);
}
.game-popup-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: rgba(5, 13, 26, 0.4);
}
.game-popup-loading {
    display: none;
    text-align: center;
    padding: 40px;
    color: var(--earth-text-muted);
}
.game-popup-loading.active { display: block; }

.game-popup-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.game-popup-list > li {
    position: relative;
    width: calc(100% / 6 - 12.5px);
    aspect-ratio: 3/4;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(26, 58, 92, 0.4);
    border: 1px solid rgba(255, 189, 63, 0.1);
    transition: 0.2s;
}
.game-popup-list > li:hover {
    border-color: var(--earth-primary);
    box-shadow: 0 6px 20px rgba(255, 189, 63, 0.25);
}
.game-popup-list > li > img {
    width: 100%;
    height: 100%;
    /* object-fit: cover; 제거 — 썸네일 잘림 방지 (디자인팀 요청) */
}
.game-popup-list > li > .game-name {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 10px 8px;
    background: linear-gradient(transparent, rgba(5, 13, 26, 0.9));
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.game-popup-list > li.no-games {
    width: 100%;
    text-align: center;
    padding: 40px;
    color: var(--earth-text-muted);
    background: transparent;
    border: none;
    cursor: default;
}
.game-popup-list > li .game-hover {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(5, 13, 26, 0.7);
    opacity: 0;
    transition: 0.2s;
}
.game-popup-list > li .game-hover .play-icon {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--earth-gradient);
    border-radius: 50%;
    font-size: 20px;
    color: #fff;
    transform: scale(0.8);
    box-shadow: 0 4px 15px rgba(255, 189, 63, 0.4);
    transition: 0.2s;
}
@media (hover: hover) and (pointer: fine) {
    .game-popup-list > li:hover .game-hover { opacity: 1; }
    .game-popup-list > li:hover .game-hover .play-icon { transform: scale(1); }
}
@media (max-width: 992px) {
    .game-popup-list > li { width: calc(100% / 4 - 11.25px); }
    .game-popup-list { gap: 12px; }
}
@media (max-width: 767px) {
    .game-popup-list > li { width: calc(100% / 3 - 6.67px); }
    .game-popup-list { gap: 10px; }
    .game-popup.active { padding: 20px 10px; }
}
@media (max-width: 480px) {
    .game-popup-list > li { width: calc(100% / 2 - 5px); }
}

/* 프리마 금색 토큰 오버라이드 (팝업 스코프) */
.game-popup {
    --earth-primary: #ffbd3f;
    --earth-gradient: linear-gradient(135deg, #ffd989, #ffbd3f);
}

/* 프리마 다크브라운/금색 패널 톤 (st10 청록-남색 → 프리마) */
.game-popup-inner  { background: rgba(24, 18, 9, 0.97); border-color: rgba(255, 189, 63, 0.28); box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 40px rgba(255,189,63,.12); }
.game-popup-header { background: #1a140a; border-bottom-color: rgba(255, 189, 63, 0.22); }
.game-popup-title  { color: #ffd989; }
.game-popup-body   { background: rgba(12, 9, 4, 0.5); }
.game-popup-list > li { background: rgba(40, 30, 12, 0.45); border-color: rgba(255, 189, 63, 0.14); }
.game-popup-close  { background: rgba(40, 30, 12, 0.8); border-color: rgba(255, 189, 63, 0.3); }

/* 게임 썸네일 비율 보정: 슬롯 썸네일은 대개 정사각 → 카드 1:1 + cover 로 세로 스트레치 제거 */
.game-popup-list > li { aspect-ratio: 1 / 1; }
.game-popup-list > li > img { width: 100%; height: 100%; object-fit: cover; display: block; }

/****************************************************************************************************************************************
게임명 검색 — 스킨 톤 오버라이드 (공용 기본: css/business/game-popup-search.css)
*****************************************************************************************************************************************/
.game-popup .game-popup-search-input { background: rgba(5, 13, 26, 0.6); border-color: rgba(255, 189, 63, 0.3); color: var(--earth-text); }
.game-popup .game-popup-search-input:focus { border-color: rgba(255, 189, 63, 0.7); }
.game-popup .game-popup-search-clear { background: rgba(26, 58, 92, 0.9); color: var(--earth-text-muted); }
.game-popup .game-popup-search-count { color: var(--earth-text-muted); }

/****************************************************************************************************************************************
SweetAlert z 오버라이드 — 기본 1060이라 게임팝업(40000) 뒤에 로딩/오류창이 깔리는 문제. W16(999999)·W17(--z-alert) 선례 패턴.
!important = swal 자체 스타일시트 로드 순서와 무관하게 보장
*****************************************************************************************************************************************/
.swal2-container { z-index: var(--z-alert, 100000) !important; }
