﻿/* --- [라이브 카지노] 전용 스타일 --- */

.casino_item_card {
    flex: 0 0 25%;
    /*padding-left: 12px;*/
    margin-bottom: 20px;
    box-sizing: border-box;
    cursor: pointer;
}

/* 이미지 박스 및 효과 */
/* BP · 자연 비율 전환 — 구 aspect-ratio 272/145 강제 + absolute/cover 덮기 구조 해체(그리드 경로 한정).
   관리자가 제각각 크기로 업로드하므로 비율 강제 금지: 너비만 4분할(1fr) 고정, 높이 = 이미지 원본 비율
   (s2 홈 스트립과 같은 표시 목표). 한 행 안 높이 차이는 의도된 동작(masonry 신설 금지 — PM).
   ⚠️ 홈 스트립(HomeSection=true · app-home.css .gcard_*)은 무접촉 — 이미 목표 상태. */
.casino_item_card .img_wrap {
    position: relative;
    width: 100%;
    border-radius: 8px 8px 0 0; /* 상단만 둥글게 (정보바와 합쳐짐) */
    overflow: hidden;
    background: #1a2436;
}

.casino_item_card .img_wrap img {
    /* BP · in-flow 자연 높이 — wrap 높이가 이미지를 따라간다(cover 크롭 0). hover scale 은 현행 유지. */
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

/* BP(F-2 재구성) · 폴백 = in-flow 블록(min-height 140px — 기존 카드 톤 유지).
   이미지 정상 로드 = 폴백 미렌더/숨김이라 wrap 높이 = 이미지 자연 높이,
   이미지 없음·onerror = 폴백만 남아 wrap 높이 = 140px(빈 검은 박스 0 유지).
   표시 전환은 마크업 소관(CasinoGameBrowser — onerror 가 형제 폴백을 켠다). */
.casino_item_card .img_ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 140px;
    font-size: 28px;
    font-weight: 800;
    color: #6b7a90;
    user-select: none;
}

/* BP ③ · 카드 높이가 제각각이므로 행 상단 정렬 — 그리드 경로(grid_container_box 하위)만.
   홈 스트립·타 col_4 소비처는 무접촉. */
.grid_container_box .game_grid.col_4 {
    align-items: start;
}

/* 원본의 border_line 효과 재현 */
.border_line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
    z-index: 1;
}

/* 하단 정보 바 (MuiImageListItemBar-root 스타일) */
.item_info_bar {
    padding: 10px 15px;
    border: 1px solid rgb(30, 43, 61);
    border-radius: 0px 0px 8px 8px;
    background-color: rgb(11, 20, 37);
    border-top: none;
}

.item_title {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;          /* 시안 · 긴 이름 1줄 말줄임(줄바꿈으로 카드 높이가 갈리던 것 차단) */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   BP-G(2026-08-19) · 그리드 카드 높이 통일 — 좌우 카드가 정확히 1/2 씩·같은 높이.
   구 BP "자연 비율"은 관리자 이미지 규격이 제각각이면 한 행 안 높이가 갈렸다(모바일 2열에서 특히 두드러짐).
   → 스트립(gcard)과 같은 방식: 폭은 그리드 1fr, 높이는 카테고리 비율(sec_casino 400/224 · sec_slot 376/502) 이 정한다.
     이미지·폴백은 absolute fill(contain — 규격 이탈분은 레터박스·잘림 0). 스코프 = 카테고리 클래스가 붙은 그리드만.
   ========================================================================== */
.sec_casino .game_grid .casino_item_card .img_wrap { aspect-ratio: 400 / 224; }
.sec_slot   .game_grid .casino_item_card .img_wrap { aspect-ratio: 376 / 502; }
.sec_casino .game_grid .casino_item_card .img_wrap img,
.sec_slot   .game_grid .casino_item_card .img_wrap img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
}
.sec_casino .game_grid .casino_item_card .img_ph,
.sec_slot   .game_grid .casino_item_card .img_ph { position: absolute; inset: 0; min-height: 0; }
.sec_casino .game_grid .casino_item_card,
.sec_slot   .game_grid .casino_item_card { margin-bottom: 0; min-width: 0; }

/* 슬롯 **게임** 목록(SlotGames) = 정사각(1/1) + cover — 공급사 게임 썸네일은 square/landscape 라 376/502 박스에 넣으면
   "이미지보다 div 가 커서" 위아래가 비었다. 벤더 카드(sec_slot 376/502)와 분리. 태그 스트립 카드와 같은 규격. */
.sec_slot_games .game_grid .casino_item_card .img_wrap { aspect-ratio: 1 / 1; }
.sec_slot_games .game_grid .casino_item_card .img_wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sec_slot_games .game_grid .casino_item_card .img_ph { position: absolute; inset: 0; min-height: 0; }
.sec_slot_games .game_grid .casino_item_card { margin-bottom: 0; min-width: 0; }

/* 호버 시 효과 */
.casino_item_card:hover .img_wrap img {
    transform: scale(1.05); /* 이미지 살짝 확대 */
}

.casino_item_card:hover .item_info_bar {
    background-color: #1976d2; /* 호버 시 파란색 포인트 (MUI 기본 포인트) */
    transition: background-color 0.3s;
}


/* 모달 배경 오버레이 */
.modal_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* 모달 본체 컨테이너 */
.slot_modal_container {
    cursor: default;
    width: 90%;
    max-width: 1100px;
    max-height: 85vh;
    background-color: #0f1621;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* 헤더 */
.slot_modal_header {
    padding: 15px 20px;
    background-color: #0b111c;
    display: flex;
    justify-content: center; /* 제목 중앙 */
    align-items: center;
    position: relative;
    border-bottom: 1px solid #1f293d;
}

.modal_title {
    font-size: 16px;
    color: #e1e5eb;
    font-weight: 600;
}

.btn_modal_close {
    position: absolute;
    right: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
}

    .btn_modal_close svg {
        fill: #8a96a3;
        width: 24px;
    }

/* 검색 영역 */
.slot_modal_search_area {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
}

.input_game_search {
    width: 250px;
    background-color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 2px;
    font-size: 13px;
}

/* 게임 그리드 (6열) */
.slot_game_grid_scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.slot_game_grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6개씩 배치 */
    gap: 15px;
}

.game_unit {
    cursor: pointer;
    transition: transform 0.2s;
}

    .game_unit:hover {
        transform: translateY(-5px);
    }

.game_thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 2px solid #ffd700; /* 금색 테두리 포인트 */
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

    .game_thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.game_name {
    font-size: 12px;
    color: #e1e5eb;
    text-align: center;
    line-height: 1.4;
    word-break: keep-all;
}

/* 스크롤바 커스텀 */
.slot_game_grid_scroll::-webkit-scrollbar {
    width: 6px;
}

.slot_game_grid_scroll::-webkit-scrollbar-thumb {
    background: #1f293d;
    border-radius: 10px;
}


모바일 환경에서도 자연스럽게 보이도록 **미디어 쿼리(@media)**를 사용하여 레이아웃을 조정해 드리겠습니다.

모바일일 때는 모달창이 상단에 딱 붙고(top: 0), 게임 리스트는 한 줄에 2개씩(repeat(2, 1fr)) 나오도록 CSS를 보완했습니다.

1. 수정된 CSS (모바일 대응 추가)
기존 CSS 하단에 아래의 미디어 쿼리 내용을 추가해 주세요.

CSS
/* 기본 PC 스타일 (기존 유지) */
.slot_modal_container {
    width: 90%;
    max-width: 1100px;
    max-height: 85vh;
    background-color: #0f1621;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.slot_game_grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* PC는 6개 */
    gap: 15px;
}

/* --- 모바일 대응 (화면 너비 768px 이하) --- */
@media screen and (max-width: 768px) {
    /* 1. 모달 배경에서 중앙 정렬 해제 및 상단 배치 */
    .modal_overlay {
        align-items: flex-start;
        padding: 20px 15px;
    }

    /* 2. 모달 컨테이너를 상단에 밀착 */
    .slot_modal_container {
        width: 100%; /* 모바일은 가로 꽉 차게 */
        max-width: none;
        height: 100%; /* 전체 높이 사용 */
        max-height: 100vh;
        border-radius: 0; /* 모바일은 둥근 모서리 제거 (선택 사항) */
    }

    /* 3. 검색 영역 조정 */
    .slot_modal_search_area {
        padding: 10px;
    }

    .input_game_search {
        width: 100%; /* 검색창도 가로 꽉 차게 */
    }

    /* 4. 게임 그리드를 2열로 변경 */
    .slot_game_grid {
        grid-template-columns: repeat(2, 1fr); /* 모바일은 2개씩 */
        gap: 10px; /* 간격은 조금 좁게 */
    }

    /* 5. 게임 썸네일 크기 보정 */
    .game_name {
        font-size: 13px; /* 모바일에서 글자가 너무 작으면 키우기 */
    }
}
/* BR §E · 벤더 점검(IS_LOCK) 오버레이 — BP 자연 비율 구조 위(wrap 기준 absolute).
   폴백(머릿글자) 카드에도 동일 적용(이미지 유무 무관 일관 — wrap 이 공통 부모).
   구 badge bg-danger 표식은 교체 제거(규약 위반 별건 자연 해소). z-index 2 = .border_line(1) 위. */
.casino_item_card .vendor_lock_overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(0, 0, 0, .55);   /* dim */
    color: #fff;
    pointer-events: none;             /* 클릭 처리(점검 안내)는 카드 onclick 현행 가드 유지 */
}

.casino_item_card .vendor_lock_overlay .vlo_ico { font-size: 22px; line-height: 1; }
.casino_item_card .vendor_lock_overlay .vlo_txt { font-size: 12px; font-weight: 700; }


/* (지시로 폐기) 구 gflex/--gcols 가변 그리드 축 — 정적 col_4/col_6 클래스(layout.css 정본)로 회귀. */
