@charset "utf-8";

/*// 공통 레이아웃 설정 */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --zzan-neon: #E6FF00;
    --zzan-black: #0a0a0a;
    --header-height: 80px;
    --content-width: 1200px;

    /*// 다크 테마 변수 */
    --zzan-bg: #131314;
    --zzan-text: #ffffff;
    --zzan-header-bg: #0a0a0a;
    --zzan-footer-bg: #0a0a0a;
    --zzan-border: rgba(255, 255, 255, 0.05);
    --zzan-menu-color: #ffffff;
    --zzan-menu-hover-bg: rgba(255, 255, 255, 0.05);
    --zzan-submenu-bg: rgba(10, 10, 10, 0.98);
    --zzan-gray-text: #888888;
    --zzan-btn-border: #333333;
    --zzan-select-bg: #1a1a1b;
}

/*// 라이트 테마 변수 */
html[data-theme="light"] {
    --zzan-bg: #ffffff;
    --zzan-text: #1a1a1b;
    --zzan-header-bg: #ffffff;
    --zzan-footer-bg: #f9f9f9;
    --zzan-border: rgba(0, 0, 0, 0.1);
    --zzan-menu-color: #1a1a1b;
    --zzan-menu-hover-bg: rgba(0, 0, 0, 0.05);
    --zzan-submenu-bg: rgba(255, 255, 255, 0.98);
    --zzan-gray-text: #666666;
    --zzan-btn-border: #cccccc;
    --zzan-select-bg: #ffffff;
}

body { font-family: 'Pretendard', sans-serif; background-color: var(--zzan-bg); color: var(--zzan-text); line-height: 1.6; overflow-x: hidden; transition: background-color 0.3s, color 0.3s; }
ul, li { list-style: none !important; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/*// 전역 폰트 및 렌더링 최적화 */
body, html {
    font-family: 'Montserrat', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif !important;
    
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 외부 링크 메뉴 화살표 아이콘 (up) */
.icon-up {
    width: 14px;
    height: 14px;
    margin-left: 5px;
    vertical-align: text-top;
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s;
}
a:hover .icon-up {
    transform: translate(2px, -2px); /* 호버 시 우측 상단으로 살짝 이동하는 애니메이션 */
    opacity: 1;
}

/*// 타이틀 공통 폰트 설정 */
.main-tit, .premium-tit, .top-sub {
    font-family: 'Montserrat', 'Pretendard', sans-serif !important;
    font-weight: 800 !important;
}

/*// -----------------------------------------------------------
// 1. 헤더 및 GNB (PC)
// ----------------------------------------------------------- */
.zzan-header { 
    position: fixed; top: 0; left: 0; width: 100%; 
    height: var(--header-height); 
    background-color: var(--zzan-header-bg); 
    z-index: 1000; 
    border-bottom: 1px solid var(--zzan-border); 
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); 
}

/*// 회원 레이어 */
.member-layer {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: var(--zzan-submenu-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--zzan-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 20px;
    z-index: 1001;
    margin-top: 10px;
    animation: fadeInUp 0.3s ease;
}
.member-layer.active { display: block; }
.member-layer .info-top { text-align: center; margin-bottom: 15px; }
.member-layer .nickname { font-weight: 700; color: var(--zzan-text); font-size: 15px; margin-bottom: 5px; }
.member-layer .welcome { font-size: 12px; color: var(--zzan-gray-text); }
.member-layer .layer-btns { display: flex; flex-direction: column; gap: 8px; }
.member-layer .btn-item {
    display: block;
    padding: 8px 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--zzan-text);
    border-radius: 6px;
    background: var(--zzan-menu-hover-bg);
    transition: all 0.2s;
}
.member-layer .btn-item:hover { background: var(--zzan-neon); color: #000; }
.member-layer .close-layer {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--zzan-gray-text);
    cursor: pointer;
    padding: 5px;
}

/*// 헤더 스크롤 상태 */
.zzan-header.scrolled {
    height: 60px;
    background-color: color-mix(in srgb, var(--zzan-header-bg) 80%, transparent); /* 테마 상관없이 반투명 처리 */
    backdrop-filter: blur(15px); /* 아이폰 스타일 블러 */
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-inner { max-width: var(--content-width); height: 100%; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.logo a { font-size: 24px; font-weight: 700; color: white; display: flex; align-items: center; }
.logo a img {
    height: 45px !important; 
    width: auto !important;
    display: block;
    object-fit: contain;
    transition: height 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.zzan-header.scrolled .logo a img {
    height: 35px !important;
}

.logo .highlight { color: var(--zzan-neon); font-style: italic; }
.gnb { height: 100%; display: block; }
.gnb > ul { display: flex; gap: 40px; height: 100%; align-items: center; margin: 0; padding: 0; list-style: none; }
.gnb > ul > li { position: relative; height: 100%; display: flex; align-items: center; }
.gnb > ul > li > a { 
    font-family: 'Montserrat', 'Pretendard', sans-serif !important; 
    font-weight: 700; 
    font-size: 15px; 
    letter-spacing: -0.02em;
    text-transform: uppercase; 
    color: var(--zzan-menu-color); 
    padding: 10px 0 !important; 
    position: relative; 
    top: 0; 
    display: flex;
    align-items: center;
    height: 100%;
    cursor: pointer; 
    transition: color 0.3s ease;
    word-break: keep-all;
}

/*// 메뉴 언더바 애니메이션 */
.gnb > ul > li > a::after { 
    content: ''; 
    position: absolute; 
    bottom: 20px; /* 헤더 높이에 맞춰 위치 고정 */
    left: 0; 
    width: 0%; 
    height: 2px; 
    background-color: var(--zzan-neon); 
    transition: width 0.3s ease; 
}
.gnb > ul > li:hover > a, 
.gnb > ul > li.active > a { 
    color: var(--zzan-neon) !important; 
}

.gnb > ul > li:hover > a::after, 
.gnb > ul > li.active > a::after { 
    width: 100%; 
}

/* 마우스 올렸을 때 2차 메뉴 등장 */
.gnb > ul > li:hover .sub-menu { 
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important; 
}

/*// PC 2차 메뉴 */
.gnb .sub-menu { 
    display: block !important; 
    visibility: hidden;
    opacity: 0;
    position: absolute; 
    top: var(--header-height); 
    left: 50%; 
    transform: translateX(-50%) translateY(15px); 
    background: var(--zzan-submenu-bg); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    min-width: 180px; 
    padding: 8px; 
    border: 1px solid var(--zzan-border); 
    border-top: 2px solid var(--zzan-neon); 
    border-radius: 0 0 12px 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    z-index: 1001; 
    /* 깜빡임 및 흐릿함 해결을 위한 핵심 설정 */
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease, visibility 0.3s !important;
    will-change: transform, opacity;
    pointer-events: auto;
}

/*// 메뉴 사이 공백 메우기 (깜빡임 방지용 투명 레이어) */
.gnb .sub-menu::before {
    content: '';
    position: absolute;
    top: -20px; /* 1차 메뉴와 2차 메뉴 사이의 공간을 덮음 */
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.zzan-header.scrolled .gnb .sub-menu {
    top: 60px;
}

.gnb .sub-menu li a { 
    display: block; 
    padding: 10px 20px; 
    font-family: 'Montserrat', 'Pretendard', sans-serif !important; 
    font-weight: 600; 
    font-size: 13px; 
    letter-spacing: -0.02em;
    color: var(--zzan-gray-text); 
    text-transform: uppercase; 
    text-align: center; 
    border-radius: 6px; 
    transition: all 0.2s;
    word-break: keep-all;
}

.gnb .sub-menu li a:hover, 
.gnb .sub-menu li.active a { 
    color: var(--zzan-neon); 
    background: var(--zzan-menu-hover-bg); 
    transform: scale(0.98); /* 살짝 눌리는 텐션 효과 */
}

.header-util { height: 100%; display: flex; align-items: center; gap: 15px; }

/*// 인증 섹션 (로그인/로그아웃) */
.zzan-auth { display: flex; gap: 12px; align-items: center; position: relative; }

@media screen and (max-width: 768px) {
    .zzan-auth .btn-profile,
    .zzan-auth .btn-logout-pill { display: none !important; }
    
    /* 헤더 유틸 간격 조정 */
    .header-util { gap: 10px; }
}

/* 비로그인 로그인 아이콘 버튼 */
.btn-login-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--zzan-text);
    transition: all 0.3s;
}
.btn-login-svg svg { width: 24px; height: 24px; }
.btn-login-svg:hover { color: var(--zzan-neon); transform: translateX(3px); }

/* 로그인 후 프로필 */
.btn-profile {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--zzan-menu-hover-bg);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-profile:hover { border-color: var(--zzan-neon); }
.btn-profile img { width: 100%; height: 100%; object-fit: cover; }
.btn-profile svg { width: 20px; height: 20px; color: var(--zzan-gray-text); }

/* 알약형 로그아웃 버튼 */
.btn-logout-pill {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--zzan-menu-hover-bg);
    color: var(--zzan-gray-text);
    border: 1px solid var(--zzan-border);
    transition: all 0.3s;
    text-transform: uppercase;
}
.btn-logout-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--zzan-text);
}

/* PC에서 모바일 요소 숨김 */
.mobile-sidebar, .mobile-menu-btn { display: none; }

/*// -----------------------------------------------------------
// 2. 모바일 대응
// ----------------------------------------------------------- */
@media screen and (max-width: 768px) {
    /* 1. PC GNB 완벽 제거 */
    .pc-nav, .gnb { display: none; }

    /* 2. 햄버거 버튼 활성화 */
    .mobile-menu-btn { 
        display: flex !important; 
        flex-direction: column; 
        gap: 5px; 
        width: 25px; 
        background: none; 
        border: none; 
        cursor: pointer;
        z-index: 9999 !important;
        pointer-events: auto !important;
    }
    .mobile-menu-btn span { display: block; width: 100%; height: 2px; background: var(--zzan-menu-color) !important; }
    
    /*// 모바일 사이드바 */
    .mobile-sidebar {
        display: flex !important;
        flex-direction: column;
        position: fixed !important;
        top: 0 !important;
        left: auto !important;
        right: -100% !important; 
        width: 100% !important;
        height: 100% !important;
        background: color-mix(in srgb, var(--zzan-bg) 85%, transparent) !important; /* 약간의 반투명 딥 배경 */
        backdrop-filter: blur(20px); /* 아이폰처럼 배경 콘텐츠를 흐리게 투영 */
        -webkit-backdrop-filter: blur(20px);
        z-index: 2000 !important;
        padding: 40px 30px !important;
        transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important; 
        visibility: visible !important;
        overflow-y: auto !important; 
    }

    /* 사이드바 활성화 (오른쪽에서 0 지점으로 들어옴) */
    .mobile-sidebar.active {
        right: 0 !important;
    }

    /* 닫기 버튼 (X) */
    .sidebar-header { width: 100%; display: flex; justify-content: flex-end; margin-bottom: 20px; }
    .close-btn { 
        width: 40px; height: 40px; background: none; border: none; cursor: pointer; 
        position: relative; display: flex; align-items: center; justify-content: center;
    }
    .close-btn span { position: absolute; width: 30px; height: 2px; background: var(--zzan-neon); }
    .close-btn span:nth-child(1) { transform: rotate(45deg); }
    .close-btn span:nth-child(2) { transform: rotate(-45deg); }

    /* 로그인/로그아웃 리뉴얼 (모바일) */
    .m-auth { margin-bottom: 40px; text-align: left; flex-shrink: 0; }
    
    /* 로그인 전 */
    .m-auth .m-login-btn {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 12px 25px;
        border-radius: 50px;
        background: var(--zzan-neon);
        color: #000;
        font-family: 'Montserrat' !important;
        font-weight: 700;
        font-size: 14px;
        text-transform: uppercase;
    }
    
    /* 로그인 후 */
    .m-user-info { display: flex; flex-direction: column; gap: 15px; }
    .m-user-profile { display: flex; align-items: center; gap: 12px; }
    .m-user-profile .m-img {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        overflow: hidden;
        background: rgba(255,255,255,0.1);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .m-user-profile .m-img img { width: 100%; height: 100%; object-fit: cover; }
    .m-user-profile .m-img svg { width: 24px; height: 24px; color: var(--zzan-gray-text); }
    .m-user-profile .m-nickname { font-weight: 800; font-size: 20px; color: var(--zzan-text); }
    
    .m-user-btns { display: flex; gap: 10px; }
    .m-user-btns a {
        padding: 8px 20px;
        border-radius: 30px;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        border: 1px solid var(--zzan-border);
        background: rgba(255,255,255,0.05);
        color: var(--zzan-gray-text);
    }
    .m-user-btns a.m-logout { background: var(--zzan-neon); color: #000; border: none; }

    /*// 모바일 메뉴 리스트 */
    .m-gnb { width: 100%; flex-grow: 1; padding-bottom: 40px; }
    .m-gnb > ul > li { border-bottom: 1px solid var(--zzan-border); padding: 18px 0; }
    
    .m-link-wrap { display: flex; justify-content: space-between; align-items: center; width: 100%; }
    .m-link-wrap a { 
        font-family: 'Montserrat' !important; font-weight: 800; font-size: 24px; /* 32px -> 24px로 축소 */
        color: var(--zzan-text); text-transform: uppercase; line-height: 1.2;
    }
    
    /* 화살표 */
    .m-arrow { 
        width: 15px; height: 15px; border-right: 3px solid #444; border-bottom: 3px solid #444; 
        transform: rotate(45deg); transition: 0.3s; margin-top: -10px;
    }

    /* 활성화 메뉴 강조 */
    .m-gnb li.active > .m-link-wrap a { color: var(--zzan-neon); }
    .m-gnb li.open .m-arrow {
        transform: rotate(-135deg) !important;
        border-color: var(--zzan-neon) !important;
    }

    .m-sub-menu {
        list-style: none !important;
        margin: 15px 0 0 0 !important; 
        padding: 15px 0 15px 20px !important; 
        border-left: 1px solid var(--zzan-neon);
        opacity: 0.9;
    }

    /* 2차 메뉴 아이템 간격 미세 조정 */
    .m-sub-menu li { 
        margin-bottom: 16px !important; 
    }
    .m-sub-menu li:last-child { 
        margin-bottom: 0 !important; 
    }
    .m-sub-menu a { 
        font-family: 'Montserrat' !important; font-weight: 600; font-size: 16px; 
        color: var(--zzan-gray-text); text-transform: uppercase; 
    }
    .m-sub-menu li.active a { color: var(--zzan-neon); }
}

/*// 푸터 설정 */
.zzan-footer { padding: 60px 20px; text-align: center; background: var(--zzan-footer-bg); border-top: 1px solid var(--zzan-border); color: var(--zzan-gray-text); transition: background-color 0.3s, border-color 0.3s; }
.footer-logo { font-weight: 800; font-size: 20px; color: var(--zzan-neon); margin-bottom: 20px; }
.footer-logo img {
    height: 30px !important; 
    width: auto !important;
    display: inline-block;
    vertical-align: middle;
}
.footer-menu { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.footer-menu li a { font-size: 13px; color: var(--zzan-gray-text); }
.copyright { font-size: 12px; color: var(--zzan-gray-text); opacity: 0.7; }

/*// 푸터 정렬 설정 */
.footer-info-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* 모든 자식 요소를 왼쪽 끝으로 밀착 */
    text-align: left !important;
}

/* 관리자 로그인 버튼 (푸터) */
.admin-login-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 11px;
    color: var(--zzan-gray-text);
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}
.admin-login-link:hover { opacity: 1; color: var(--zzan-neon); }

/* 로고 박스 여백 초기화 */
.footer-logo {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* 로고 이미지 하단의 보이지 않는 여백 제거 */
.footer-logo a {
    display: inline-block;
    line-height: 0; 
}

/* 카피라이트 텍스트 들여쓰기 현상 제거 */
.footer-info-left p {
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important; /* 들여쓰기 강제 초기화 */
}

.zzan-main {
    padding-top: var(--header-height);
    min-height: 70vh;
    max-width: var(--content-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 모바일 대응 여백 조절 */
@media screen and (max-width: 768px) {
    .zzan-main {
        padding-top: calc(var(--header-height) + 30px);
    }
}

/*// 메인 슬라이더 공통 제어 요소 */
.main-slider .swiper-pagination {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    letter-spacing: 1px;
}
.main-slider .swiper-pagination-current { color: var(--zzan-neon); font-size: 18px; }
.main-slider .swiper-pagination-total { opacity: 0.6; }

.main-side-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 0 !important;
    width: 24px !important;
    height: 24px !important;
    background: transparent !important;
    border-radius: 0 !important;
    border: none !important;
    color: #fff !important; 
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}
.main-side-btn svg { width: 100%; height: 100%; transition: all 0.3s ease; }
.main-side-btn:hover { color: var(--zzan-neon) !important; opacity: 1; }
.main-side-btn::after { display: none !important; }

.zzan-slider-progress {
    position: absolute !important;
    bottom: 0 !important;
    left: 0;
    width: 100% !important;
    height: 3px !important;
    background: rgba(255, 255, 255, 0.1);
    z-index: 100 !important;
    pointer-events: none;
    overflow: hidden;
}
.zzan-slider-progress .progress-bar {
    width: 0;
    height: 100%;
    background: var(--zzan-neon) !important;
    box-shadow: 0 0 8px var(--zzan-neon);
    transition-property: width;
    transition-timing-function: linear;
}

/*// 서브 비주얼 섹션 */
.zzan-sub-visual { 
    width: 100%; 
    height: 300px !important;
    position: relative; 
    overflow: hidden; /* 넘치는 영상 부분을 잘라냄 */
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: #000;
}
.youtube-wrap iframe { 
    /* 브라우저 가로폭을 기준으로 16:9 비율을 유지하며 확대 */
    width: 100vw !important; 
    height: 56.25vw !important; /* 100 / 16 * 9 = 56.25 (16:9 비율) */
    
    /* 최소 높이와 너비를 컨테이너보다 크게 설정하여 빈틈 방지 */
    min-height: 100%; 
    min-width: 177.77%; /* 16:9 비율의 가로폭 확보 (9 / 16 * 100의 역산) */
    
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); /* 정확히 정중앙 배치 */
    
    pointer-events: none; /* 영상 클릭 방지 */
    border: none;
}
.visual-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.5); z-index: 2; }
.visual-content { position: relative; z-index: 3; text-align: center; }
.visual-content h2 a { font-size: 56px; font-weight: 900; color: #fff; text-transform: uppercase; letter-spacing: -2px; }
/* 서브 비주얼 배경 공통 (이미지/유튜브 공통으로 바닥에 깔리도록 설정) */
.visual-bg { 
    position: absolute !important; /* 다른 요소를 밀어내지 않도록 절대 위치 설정 */
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-size: cover; 
    background-position: center; 
    z-index: 1; /* 타이틀(z-index:10)보다 아래에 위치 */
}

@media screen and (max-width: 768px) {
    .zzan-sub-visual {
        height: 200px !important; /* 모바일 버전 높이 2/3 축소 */
    }
    .youtube-wrap iframe {
        /* 모바일에서도 영상이 꽉 차도록 최소 너비 유지 */
        min-width: 250%; 
    }
}

/*// 패밀리 사이트 셀렉트 */
.family-site { position: relative; display: inline-block; }
.btn-family { background: var(--zzan-select-bg); color: var(--zzan-text); border: 1px solid var(--zzan-btn-border); padding: 10px 25px; border-radius: 4px; cursor: pointer; font-weight: 700; }
.family-list { 
    display: none; position: absolute; bottom: 50px; left: 0; width: 100%; 
    background: var(--zzan-select-bg); border: 1px solid var(--zzan-btn-border); border-radius: 8px; overflow: hidden; 
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5); z-index: 100;
}
.family-list li a { display: block; padding: 12px 20px; color: var(--zzan-text); font-size: 13px; opacity: 0.8; }
.family-list li a:hover { background: var(--zzan-neon); color: #000; }
.family-site.open .family-list { display: block; animation: fadeInUp 0.3s; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
