/* 모바일 반응형 스타일 - 파라다이스 테마 */

/* Global */
::-webkit-scrollbar {
  display: none;
}

/* 기본적으로 데스크톱에서는 적용되지 않도록 */
@media (min-width: 769px) {
    .mobile-bottom-nav,
    .mobile-sidebar-menu,
    .mobile-menu-btn,
    .mobile-user-icon,
    .mobile-game-categories,
    .mobile-logo,
    .mobile-game-providers,
    .mobile-games-list,
    .mobile-home-games {
        display: none !important;
    }

    .desktop-logo,
    .desktop-header-buttons {
        display: block !important;
    }

    /* 데스크톱 배너 여백 복구 */
    #banners {
        margin-top: 5rem !important;
    }
}

/* 태블릿 및 모바일 (768px 이하) */
@media (max-width: 768px) {
    /* Body */
    body {
        background: #0B0027 !important;
        overflow-x: hidden !important;
    }

    /* 전체 레이아웃 */
    #app {
        min-height: 100vh;
    }

    /* 헤더 조정 */
    header {
        height: 60px !important;
        padding: 1rem 1.25rem !important;
    }

    /* 데스크톱 요소 숨기기 */
    header .nav-btn-close,
    header .nav-btn-menu,
    header .desktop-logo,
    header .desktop-header-buttons {
        display: none !important;
    }

    /* 모바일 요소 표시 */
    header .mobile-menu-btn,
    header .mobile-user-icon,
    header .mobile-logo {
        display: block !important;
    }

    /* 모바일 로고 크기 */
    header .mobile-logo {
        max-width: 160px !important;
        height: auto !important;
    }

    /* 사이드바를 모바일에서 숨기기 */
    aside {
        display: none !important;
    }

    /* 메인 콘텐츠 조정 */
    main {
        margin-bottom: 87px !important;
        padding-top: 60px !important;
        margin-top: 0 !important;
        width: 100% !important;
    }

    main > .flex {
        flex-direction: column !important;
    }

    main > .flex > main {
        padding: 0 !important;
        width: 100% !important;
    }

    main > .flex > main > div > div {
        padding-top: 0 !important;
    }

    /* 페이지 전체 여백 조정 */
    body {
        padding-bottom: 87px !important;
    }

    /* 콘텐츠 영역 전체 너비 */
    .content,
    .content-wrapper {
        width: 100% !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* 배너 영역 (모바일만) */
    #banners {
        padding: 0 20px !important;
        margin-top: 0 !important;
    }

    #banners a > div {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 5 !important;
        margin-bottom: 10px !important;
        border-radius: 15px !important;
        overflow: hidden !important;
    }

    #banners img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* 데스크톱 게임 카테고리 숨기기 */
    .gameCategory {
        display: none !important;
    }

    /* 데스크톱 게임 컨테이너 숨기기 */
    .gameContainer {
        display: none !important;
    }

    /* 최고 우승 섹션 숨기기 */
    .gameContainer + div {
        display: none !important;
    }

    /* 모바일 게임 목록 */
    .mobile-games-list {
        display: block !important;
    }

    .mobile-games-list img {
        width: 100%;
        height: auto;
        border-radius: 10px;
        aspect-ratio: 1;
        object-fit: cover;
    }

    .mobile-games-list .game-item {
        cursor: pointer;
        transition: transform 0.2s ease;
    }

    .mobile-games-list .game-item:active {
        transform: scale(0.95);
    }

    /* 슬롯/카지노 페이지 상단 헤더 */
    div[v-if*="currentPage"] > div:first-child {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 40 !important;
        background: #130141 !important;
    }

    /* 슬롯/카지노 페이지 컨텐츠 여백 */
    div[v-if*="slot"] > a:first-of-type,
    div[v-if*="casino"] > a:first-of-type {
        margin-top: 120px !important;
    }

    /* 기본적으로 모든 게임은 2열 */
    .mb-3.relative.group {
        width: calc(100vw/2 - 25px) !important;
        max-width: calc(100vw/2 - 25px) !important;
    }

    .mb-3.relative.group > div {
        width: 100% !important;
        height: calc(100vw/2 - 20px) !important;
    }

    /* 슬롯 페이지만 1열로 - body에 클래스 추가 방식으로 제어 */
    body.slot-page .mb-3.relative.group {
        width: calc(100vw - 40px) !important;
        max-width: calc(100vw - 40px) !important;
    }

    body.slot-page .mb-3.relative.group > div {
        width: 100% !important;
        height: calc((100vw - 40px) / 2) !important;
        max-width: 100% !important;
    }

    /* 게임 카드 그리드 */
    .game-list,
    .games-container,
    .games-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
        padding: 10px 20px !important;
    }

    /* 게임 카드 아이템 */
    .game-item,
    .game-card {
        width: 100% !important;
        margin: 0 !important;
    }

    .game-item img,
    .game-card img {
        width: 100% !important;
        height: auto !important;
        border-radius: 10px;
    }

    /* 텍스트 크기 조정 */
    h1 {
        font-size: 20px !important;
    }

    h2 {
        font-size: 18px !important;
    }

    h3 {
        font-size: 16px !important;
    }

    p {
        font-size: 14px !important;
    }

    /* 팝업 및 모달 조정 */
    .popup,
    .modal {
        width: 90% !important;
        max-width: 400px !important;
    }
}

/* 모바일 (480px 이하) */
@media (max-width: 480px) {
    header {
        height: 55px !important;
        padding: 0 15px !important;
    }

    header img[src*="img-logo"] {
        max-width: 140px !important;
    }

    .mobile-game-categories {
        padding: 10px 15px !important;
    }

    .game-list,
    .games-container,
    .games-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 10px 15px !important;
    }
}

/* 햄버거 메뉴 버튼 */
.mobile-menu-btn {
    display: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block !important;
    }

    .mobile-menu-btn img {
        width: 24px;
        height: 24px;
    }
}

/* 사용자 아이콘 */
.mobile-user-icon {
    display: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .mobile-user-icon {
        display: block !important;
        z-index: 10;
    }

    .mobile-user-icon svg {
        width: 24px;
        height: 24px;
        fill: white;
    }

    header > div:last-child .mobile-user-icon {
        display: block !important;
    }
}

/* 왼쪽 슬라이드 메뉴 */
.mobile-sidebar-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #130141 0%, #220A4A 100%);
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}

.mobile-sidebar-menu.open {
    left: 0;
}

/* 메뉴 오버레이 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* 메뉴 아이템 */
.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    color: white;
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-item:hover {
    background: rgba(169, 68, 247, 0.2);
}

.mobile-menu-item svg,
.mobile-menu-item img {
    width: 24px;
    height: 24px;
    margin-right: 15px;
}

.mobile-menu-item span {
    flex: 1;
    font-weight: 500;
}

/* 모바일 게임 카테고리 버튼 (가로 스크롤) */
.mobile-game-categories {
    display: none;
    scrollbar-width: none; /* Firefox */
}

/* 모바일 게임 제공사 카드 */
.mobile-game-providers {
    display: none;
}

@media (max-width: 768px) {
    .mobile-game-providers {
        display: block !important;
    }

    .provider-card {
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .provider-card:active {
        transform: scale(0.98);
    }

    .provider-card button {
        transition: all 0.3s ease;
    }

    .provider-card button:active {
        transform: scale(0.95);
    }
}

@media (min-width: 769px) {
    .mobile-game-providers {
        display: none !important;
    }
}

.mobile-game-categories::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

@media (max-width: 768px) {
    .mobile-game-categories {
        display: flex !important;
    }

    .mobile-game-categories button {
        transition: all 0.3s ease;
    }

    .mobile-game-categories button:active {
        transform: scale(0.95);
    }

    .mobile-game-categories button p {
        font-weight: 500;
    }

    .mobile-game-categories button.gameActive {
        background: #A944F7 !important;
    }

    .mobile-game-categories button.gameActive p {
        color: #101010 !important;
    }

    .mobile-game-categories button.gameActive svg path,
    .mobile-game-categories button.gameActive svg rect,
    .mobile-game-categories button.gameActive svg circle {
        fill: #101010 !important;
    }
}

/* 하단 네비게이션 스타일 */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
    }

    .mobile-bottom-nav button {
        cursor: pointer;
        background: none;
        border: none;
        transition: all 0.3s ease;
    }

    .mobile-bottom-nav button:active {
        transform: scale(0.95);
    }

    .mobile-bottom-nav button img {
        opacity: 0.8;
        transition: opacity 0.3s ease;
    }

    .mobile-bottom-nav button:hover img {
        opacity: 1;
    }

    /* 푸터 확장 애니메이션 */
    #footer-toggle {
        transition: opacity 0.3s ease;
    }

    #footer-toggle.show {
        display: block !important;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    .animate-element {
        animation: bounceIn 0.5s ease;
    }

    @keyframes bounceIn {
        0% {
            transform: scale(0);
            opacity: 0;
        }
        50% {
            transform: scale(1.1);
        }
        100% {
            transform: scale(1);
            opacity: 1;
        }
    }

    /* 각 메뉴 아이템의 딜레이 */
    #footer-toggle .animate-element:nth-child(1) {
        animation-delay: 0.1s;
    }

    #footer-toggle .animate-element:nth-child(2) {
        animation-delay: 0.2s;
    }

    #footer-toggle .animate-element:nth-child(3) {
        animation-delay: 0.3s;
    }

    /* 푸터 메뉴 아이템 스타일 */
    #footer-toggle a {
        text-decoration: none;
        transition: all 0.3s ease;
    }

    #footer-toggle a:active {
        transform: scale(0.9);
    }

    /* 터치 친화적 버튼 크기 */
    button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    a {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

/* 게임 카테고리 활성화 */
.gameActive {
    background: #A944F7 !important;
    color: #101010 !important;
}

/* Marquee */
.marquee-container {
    width: calc(100vw - 40px);
    margin: 10px 20px;
    height: 23px;
    overflow: hidden;
    z-index: 10;
    color: rgba(255, 255, 255, .5);
    background: #1D1940;
    border-radius: 20px;
    position: relative;
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee linear infinite;
    animation-duration: 20s;
}

@keyframes marquee {
    0% {
        transform: translateX(350px);
    }
    100% {
        transform: translateX(-100%);
    }
}

.marquee-container::before,
.marquee-container::after {
    content: '';
    position: absolute;
    height: 23px;
    width: 75px;
    z-index: 2;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, #130141 35%, transparent 100%);
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, #130141 0%, transparent 100%);
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
}
