/* ========== Pull-to-Refresh 비활성화 (웹뷰용) ========== */
html, body {
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

/* ========== 메인 메뉴 화면 ========== */
.main-menu {
    display: none;
    min-height: 100vh;
    background: #000;
}

.main-menu.active {
    display: block;
}

/* ========== 헤더 - 로고 중앙, 흰색 ========== */
.header {
    background: #000;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid #333;
}

.back-btn {
    position: absolute;
    left: 60px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #3a3a3c;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #4a4a4c;
    transform: scale(1.05);
}

/* 로고 - 중앙 정렬, 흰색 */
.logo {
    color: #fff !important;  /* 강제 흰색 */
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 3px;
    text-align: center;
}

.header-actions {
    position: absolute;
    right: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.theme-btn {
    background: none;
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
}

.menu-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 5px;
}

.menu-btn span {
    width: 24px;
    height: 2px;
    background: #fff;
    transition: all 0.3s;
    border-radius: 2px;
}

/* ========== 대분류 탭 - 글래스모피즘 ========== */
.main-tabs,
.category-tabs {
    background: rgba(20, 20, 20, 0.85) !important;  /* blur 대신 불투명도 높임 */
    backdrop-filter: blur(10px) saturate(120%) !important;  /* blur 감소 */
    -webkit-backdrop-filter: blur(10px) saturate(120%) !important;
    padding: 15px 10px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;

    /* 안드로이드 터치 스크롤 - 최대 민감도 */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    will-change: scroll-position, transform;
    transform: translateZ(0);
    -webkit-tap-highlight-color: transparent;

    /* 성능 최적화 */
    contain: layout style;  /* 리페인트 범위 제한 */
    isolation: isolate;  /* 새 스태킹 컨텍스트 */
}

.main-tabs::-webkit-scrollbar,
.category-tabs::-webkit-scrollbar {
    display: none;
}

.main-tab,
.category-tab {
    background: rgba(255, 255, 255, 0.12) !important;  /* blur 제거, 불투명도로 대체 */
    /* backdrop-filter 제거 - 안드로이드 성능 개선 */
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;  /* all → 특정 속성만 */
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    /* 터치 최적화 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    contain: layout style paint;  /* 리페인트 격리 */
}

/* 모바일/데스크탑 탭 이름 전환 */
.tab-name-short {
    display: none;
}
.tab-name-full {
    display: inline;
}

/* 모바일 (480px 이하): 짧은 이름 표시 */
@media (max-width: 480px) {
    .tab-name-short {
        display: inline;
    }
    .tab-name-full {
        display: none;
    }
    .main-tab,
    .category-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
    .sub-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
}

.main-tab:hover,
.category-tab:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
}

/* 남성 선택시 파란색, 여성 선택시 핑크색 */
body.gender-male .main-tab.active,
body.gender-male .category-tab.active {
    background: linear-gradient(135deg, #4A90E2, #357ABD) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.4) !important;
}

body.gender-female .main-tab.active,
body.gender-female .category-tab.active {
    background: linear-gradient(135deg, #FF1493, #C2185B) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 5px 20px rgba(255, 20, 147, 0.4) !important;
}

/* ========== 중분류 탭 - 글래스모피즘 ========== */
.sub-tabs {
    background: rgba(15, 15, 15, 0.4) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    padding: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08) !important;
}

.sub-tab {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* 남성일 때 파란색 */
body.gender-male .sub-tab {
    background: #4A90E2;
}

body.gender-male .sub-tab:hover {
    background: #6BA3E5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

body.gender-male .sub-tab.active {
    background: #fff;
    color: #4A90E2;
}

/* 여성일 때 핑크색 */
body.gender-female .sub-tab {
    background: #FF1493;
}

body.gender-female .sub-tab:hover {
    background: #FF69B4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 20, 147, 0.4);
}

body.gender-female .sub-tab.active {
    background: #fff;
    color: #FF1493;
}

/* ========== 스타일 그리드 ========== */
.styles-container {
    padding: 20px;
    min-height: calc(100vh - 200px);
}

.styles-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

/* 태블릿 (768px ~ 1024px) - 5열 유지 */
@media (min-width: 768px) and (max-width: 1024px) {
    .styles-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 12px;
    }
}

/* 모바일 (767px 이하) - 2열 */
@media (max-width: 767px) {
    .styles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.style-card {
    background: #1a1a1a;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.1);
    aspect-ratio: 3/4 !important;
    position: relative;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.style-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

body.gender-male .style-card:hover {
    box-shadow: 0 20px 50px rgba(74, 144, 226, 0.25);
}

body.gender-female .style-card:hover {
    box-shadow: 0 20px 50px rgba(233, 30, 99, 0.25);
}

.style-image-wrapper {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

/* AI Generated 라벨 - 어두운 배경으로 가시성 확보 */
.style-image-wrapper::before {
    content: "AI";
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 4px 10px;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    z-index: 15;
    pointer-events: none;
}

/* 글래스 반짝임 효과 - 제거됨 */

/* 다크모드 이미지 경계 Inner Shadow */
.style-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    pointer-events: none;
    border-radius: 20px;
    z-index: 3;
}

.style-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    background: #2a2a2a;
    display: block !important;
    border-radius: 20px;
}

/* 라이트모드에서는 Inner Shadow 제거 */
body.light-theme .style-image-wrapper::after {
    box-shadow: none;
}

/* 스타일 정보 완전 숨김 */
.style-info,
.style-code,
.style-name {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ========== 사이드 메뉴 ========== */
.side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-menu.active {
    right: 0;
}

.side-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.side-menu-content {
    position: absolute;
    right: 0;
    top: 0;
    width: 320px;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.side-menu-header {
    padding: 25px;
    background: #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #FF1493;
}

body.gender-male .side-menu-header {
    border-bottom-color: #4A90E2;
}

.side-menu-header h2 {
    color: #FF1493;
    font-size: 22px;
    letter-spacing: 2px;
    font-weight: bold;
}

body.gender-male .side-menu-header h2 {
    color: #4A90E2;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
}

.side-menu-nav {
    flex: 1;
    padding: 30px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.menu-item:hover {
    background: rgba(255, 20, 147, 0.1);
    padding-left: 35px;
}

body.gender-male .menu-item:hover {
    background: rgba(74, 144, 226, 0.1);
}

.menu-icon {
    font-size: 24px;
    margin-right: 18px;
}

.menu-text {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

.menu-arrow {
    color: #666;
    font-size: 18px;
}

.menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #333, transparent);
    margin: 20px 25px;
}

.side-menu-footer {
    padding: 25px;
    background: #000;
    border-top: 1px solid #333;
}

.designer-info {
    text-align: center;
    color: #999;
    font-size: 14px;
}

#designerNameDisplay {
    color: #FF1493;
    font-weight: bold;
    font-size: 16px;
}

body.gender-male #designerNameDisplay {
    color: #4A90E2;
}

/* ========== 라이트 테마 ========== */
body.light-theme {
    background: #fff;
}

body.light-theme .main-menu {
    background: #fff;
}

body.light-theme .header {
    background: #fff;
    border-bottom-color: #ddd;
}

body.light-theme .logo {
    color: #000 !important;  /* 라이트 테마에서는 검은색 */
}

body.light-theme .back-btn {
    background: #e5e5ea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #3a3a3c;
}

body.light-theme .back-btn:hover {
    background: #d1d1d6;
}

body.light-theme .theme-btn {
    color: #000;
}

body.light-theme .menu-btn span {
    background: #000;
}

body.light-theme .main-tabs,
body.light-theme .category-tabs {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .main-tab,
body.light-theme .category-tab {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .sub-tabs {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .styles-container {
    background: #f9f9f9;
}

body.light-theme .style-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

body.light-theme .style-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}


/* ========== 빈 상태 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
    color: #666;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.empty-title {
    font-size: 20px;
    color: #999;
    margin-bottom: 10px;
}

.empty-message {
    font-size: 14px;
    color: #666;
}

/* ========== UI Enhancement 2024-12 ========== */

/* 1. 카테고리 설명 영역 가독성 개선 */
.category-description {
    padding: 16px 24px !important;
    min-height: 50px !important;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.7) 0%, rgba(10, 10, 10, 0.5) 100%) !important;
}

body.light-theme .category-description {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.7) 100%) !important;
}

.category-description-text {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.category-description-text::-webkit-scrollbar {
    display: none;
}

.category-description-text .category-name {
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    position: relative !important;
    padding-right: 16px !important;
}

/* 카테고리명 뒤 구분선 */
.category-description-text .category-name::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

body.light-theme .category-description-text .category-name::after {
    background: rgba(0, 0, 0, 0.15);
}

/* 설명 텍스트 밝기 향상 */
.category-description-text {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

body.light-theme .category-description-text {
    color: rgba(0, 0, 0, 0.6) !important;
}

/* 2. 서브 탭 시각적 계층 차별화 */
.sub-tabs {
    padding: 10px 15px !important;
    gap: 8px !important;
}

.sub-tab {
    padding: 8px 16px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: all 0.25s ease !important;
}

body.light-theme .sub-tab {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.sub-tab:hover:not(.active):not(.disabled) {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-1px) !important;
}

body.light-theme .sub-tab:hover:not(.active):not(.disabled) {
    background: rgba(0, 0, 0, 0.06) !important;
}

/* 3. 스타일 그리드 좌우 여백 균등화 */
.styles-container {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.styles-grid {
    max-width: 1400px !important;
    margin: 0 auto !important;
}

/* 4. NEW 인디케이터 개선 - 더 눈에 띄게 */
.category-tab .new-indicator {
    width: 10px !important;
    height: 10px !important;
    top: -4px !important;
    right: -4px !important;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a) !important;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.8), 0 0 16px rgba(255, 107, 107, 0.4) !important;
    animation: pulse-glow 1.5s ease-in-out infinite !important;
}

.sub-tab .new-indicator {
    width: 8px !important;
    height: 8px !important;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a) !important;
    box-shadow: 0 0 6px rgba(255, 107, 107, 0.7) !important;
    animation: pulse-glow 1.5s ease-in-out infinite !important;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(255, 107, 107, 0.8), 0 0 16px rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 12px rgba(255, 107, 107, 1), 0 0 24px rgba(255, 107, 107, 0.6);
    }
}

/* 5. 인터랙티브 히어로 효과 - 스타일 카드 */
.style-card {
    position: relative !important;
}

/* 카드 테두리 그라데이션 효과 */
.style-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, transparent 0%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

body.gender-female .style-card:hover::before {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.6) 0%, rgba(194, 24, 91, 0.3) 50%, transparent 100%);
    opacity: 1;
}

body.gender-male .style-card:hover::before {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.6) 0%, rgba(53, 122, 189, 0.3) 50%, transparent 100%);
    opacity: 1;
}

/* 카드 내부 빛 반사 효과 - 제거됨 */

/* 카드 호버 시 이미지 부드러운 밝기 변화 */
.style-card:hover .style-image {
    filter: brightness(1.05) !important;
}

body.light-theme .style-card:hover .style-image {
    filter: brightness(1.02) !important;
}

/* 6. 헤더 로고 미묘한 빛 효과 */
.logo {
    position: relative !important;
    transition: all 0.3s ease !important;
}

.logo:hover {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3) !important;
}

body.light-theme .logo:hover {
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important;
}

/* 7. 카테고리 탭 호버 시 미묘한 빛 효과 */
.category-tab:hover:not(.active) {
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.08) !important;
}

body.light-theme .category-tab:hover:not(.active) {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

/* Active 탭 글로우 효과 강화 */
body.gender-female .category-tab.active {
    box-shadow: 0 6px 25px rgba(233, 30, 99, 0.5), 0 0 40px rgba(233, 30, 99, 0.2) !important;
}

body.gender-male .category-tab.active {
    box-shadow: 0 6px 25px rgba(74, 144, 226, 0.5), 0 0 40px rgba(74, 144, 226, 0.2) !important;
}

/* 8. 스크롤바 커스텀 (웹킷) */
.styles-container::-webkit-scrollbar {
    width: 6px;
}

.styles-container::-webkit-scrollbar-track {
    background: transparent;
}

.styles-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.styles-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

body.light-theme .styles-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

body.light-theme .styles-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* ========== Premium UI Enhancement 2024-12 ========== */

/* === 1. 헤더 영역 럭셔리 강화 === */

/* 로고 - Playfair Display 세리프 폰트로 럭셔리 느낌 */
.logo {
    font-family: 'Playfair Display', 'Times New Roman', serif !important;
    font-size: 26px !important;
    font-weight: 600 !important;
    letter-spacing: 4px !important;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 50%, #ffffff 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-shadow: none !important;
}

body.light-theme .logo {
    background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 50%, #1a1a1a 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* 헤더 하단 악센트 라인 - 성별 컬러 */
.header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: relative !important;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

body.gender-female .header::after {
    background: linear-gradient(90deg, transparent, rgba(233, 30, 99, 0.5), transparent);
}

body.gender-male .header::after {
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.5), transparent);
}

body.light-theme .header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* === 2. 카드 디자인 프리미엄 업그레이드 === */

/* 카드 테두리 효과 (호버 시) - 성별 컬러 */
.style-card {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

body.gender-female .style-card:hover {
    border-color: rgba(233, 30, 99, 0.4) !important;
}

body.gender-male .style-card:hover {
    border-color: rgba(74, 144, 226, 0.4) !important;
}

body.light-theme .style-card {
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* 카드 하단 그라데이션 - ::after 사용 (::before는 반짝임 효과용) */

/* 카드 그림자 더 세련되게 - 성별 컬러 글로우 */
.style-card {
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

body.gender-female .style-card:hover {
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(233, 30, 99, 0.3),
        0 0 30px rgba(233, 30, 99, 0.1) !important;
}

body.gender-male .style-card:hover {
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(74, 144, 226, 0.3),
        0 0 30px rgba(74, 144, 226, 0.1) !important;
}

body.light-theme .style-card {
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme.gender-female .style-card:hover {
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(233, 30, 99, 0.3) !important;
}

body.light-theme.gender-male .style-card:hover {
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(74, 144, 226, 0.3) !important;
}

/* === 3. 카드 호버 효과 강화 (스태거 애니메이션 제거 - 동적 로딩과 충돌) === */
.style-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease,
                border-color 0.3s ease !important;
}

/* === 4. 탭 전환 트랜지션 === */
.category-tabs, .sub-tabs {
    transition: all 0.4s ease !important;
}

.category-tab, .sub-tab {
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* 탭 호버 시 성별 컬러 틴트 */
body.gender-female .category-tab:hover:not(.active) {
    border-color: rgba(233, 30, 99, 0.2) !important;
}

body.gender-male .category-tab:hover:not(.active) {
    border-color: rgba(74, 144, 226, 0.2) !important;
}

/* === 5. 카테고리명 럭셔리 폰트 === */
.category-description-text .category-name {
    font-family: 'Playfair Display', 'Times New Roman', serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    letter-spacing: 2px !important;
    background: linear-gradient(135deg, currentColor 0%, currentColor 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

/* 여성 카테고리명 핑크-화이트 그라데이션 */
body.gender-female .category-description-text .category-name {
    background: linear-gradient(135deg, #E91E63 0%, #ff6b9d 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* 남성 카테고리명 블루 그라데이션 */
body.gender-male .category-description-text .category-name {
    background: linear-gradient(135deg, #4A90E2 0%, #6bb3f5 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* === 6. 배경 노이즈 텍스처 === */
.menu-container::before,
.styles-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.015;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

body.light-theme .menu-container::before,
body.light-theme .styles-container::before {
    opacity: 0.02;
}

/* === 7. 미묘한 배경 그라데이션 === */
.styles-container {
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(10, 10, 10, 0.3) 50%,
        rgba(0, 0, 0, 0) 100%) !important;
}

body.light-theme .styles-container {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(245, 245, 245, 0.5) 50%,
        rgba(255, 255, 255, 0) 100%) !important;
}

/* === 8. 마우스 따라다니는 빛 효과 (CSS만으로 근사) - 성별 컬러 === */
.style-card {
    --mouse-x: 50%;
    --mouse-y: 50%;
}

body.gender-female .style-card::before {
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(233, 30, 99, 0.06),
        transparent 40%
    ) !important;
}

body.gender-male .style-card::before {
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(74, 144, 226, 0.06),
        transparent 40%
    ) !important;
}

/* === 9. Active 탭 악센트 - 성별 컬러 === */
body.gender-female .category-tab.active,
body.gender-male .category-tab.active {
    position: relative !important;
}

body.gender-female .category-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(233, 30, 99, 0.8), transparent);
    border-radius: 1px;
}

body.gender-male .category-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.8), transparent);
    border-radius: 1px;
}

/* === 10. 서브탭 Active 상태 강화 - 성별 컬러 === */
.sub-tab.active {
    position: relative !important;
    overflow: visible !important;
}

body.gender-female .sub-tab.active::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.5), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

body.gender-male .sub-tab.active::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.5), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* === 11. 스크롤 시 헤더 그림자 강화 === */
.header {
    transition: box-shadow 0.3s ease !important;
}

.menu-container.scrolled .header {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

body.light-theme .menu-container.scrolled .header {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* === 12. 카드 코너 장식 제거 (불필요한 골드 요소) === */

/* ========== 크리스마스 눈 내리는 효과 (다크모드 전용) ========== */
@keyframes snowfall {
    0% {
        transform: translateY(-10px) translateX(0);
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) translateX(20px);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) translateX(-20px);
        opacity: 0;
    }
}

@keyframes snowfall2 {
    0% {
        transform: translateY(-10px) translateX(0);
        opacity: 0.8;
    }
    50% {
        transform: translateY(50vh) translateX(-15px);
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh) translateX(15px);
        opacity: 0;
    }
}

@keyframes snowfall3 {
    0% {
        transform: translateY(-10px) translateX(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(50vh) translateX(10px);
        opacity: 0.4;
    }
    100% {
        transform: translateY(100vh) translateX(-10px);
        opacity: 0;
    }
}

/* 끊김 없이 계속 내리는 눈 애니메이션 */
@keyframes snowfallContinuous {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(0%);
    }
}

/* 좌우로 흔들리며 내리는 눈 애니메이션 */
@keyframes snowfallSway {
    0% {
        transform: translateY(-50%) translateX(0);
    }
    25% {
        transform: translateY(-25%) translateX(15px);
    }
    50% {
        transform: translateY(0%) translateX(-10px);
    }
    75% {
        transform: translateY(25%) translateX(20px);
    }
    100% {
        transform: translateY(50%) translateX(0);
    }
}

/* 눈 컨테이너 - JS로 생성되는 눈송이용 (requestAnimationFrame 사용) */
.snowflake {
    position: fixed;
    color: #fff;
    font-size: 1em;
    pointer-events: none;
    z-index: 9999;
    text-shadow: 0 0 5px rgba(255,255,255,0.6);
    will-change: transform, top, left;
}

/* 성별 버튼 위에 눈 쌓인 효과 - JS로 생성 */
body:not(.light-theme) .gender-btn {
    position: relative;
    overflow: visible;
}

/* Merry Christmas 텍스트 제거됨 (2025-12-15) */

@keyframes textGlow {
    0% {
        text-shadow:
            0 0 10px rgba(255, 50, 50, 0.8),
            0 0 20px rgba(200, 30, 30, 0.5),
            0 0 40px rgba(150, 20, 20, 0.3),
            2px 2px 4px rgba(0, 0, 0, 0.4);
    }
    100% {
        text-shadow:
            0 0 15px rgba(255, 80, 80, 1),
            0 0 30px rgba(220, 50, 50, 0.7),
            0 0 50px rgba(180, 30, 30, 0.5),
            2px 2px 4px rgba(0, 0, 0, 0.4);
    }
}

/* ========== 화이트 모드 - 눈싸움 애니메이션 ========== */
@keyframes boyThrow {
    0%, 60%, 100% {
        transform: rotate(0deg);
    }
    70% {
        transform: rotate(-15deg) translateY(-5px);
    }
    80% {
        transform: rotate(10deg);
    }
}

@keyframes girlThrow {
    0%, 60%, 100% {
        transform: scaleX(-1) rotate(0deg);
    }
    70% {
        transform: scaleX(-1) rotate(-15deg) translateY(-5px);
    }
    80% {
        transform: scaleX(-1) rotate(10deg);
    }
}

/* 강아지 뛰어다니는 애니메이션 (왼쪽 눈사람 주변) */
@keyframes puppyRunLeft {
    0% {
        left: -80px;
        transform: scaleX(1) translateY(0);
    }
    10% {
        transform: scaleX(1) translateY(-8px);
    }
    20% {
        left: -40px;
        transform: scaleX(1) translateY(0);
    }
    30% {
        transform: scaleX(1) translateY(-8px);
    }
    40% {
        left: 10px;
        transform: scaleX(1) translateY(0);
    }
    50% {
        left: 30px;
        transform: scaleX(-1) translateY(-5px);
    }
    60% {
        transform: scaleX(-1) translateY(0);
    }
    70% {
        left: -20px;
        transform: scaleX(-1) translateY(-8px);
    }
    80% {
        transform: scaleX(-1) translateY(0);
    }
    90% {
        left: -60px;
        transform: scaleX(-1) translateY(-8px);
    }
    100% {
        left: -80px;
        transform: scaleX(1) translateY(0);
    }
}

@keyframes treeShimmer {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(255, 200, 100, 0.4))
                drop-shadow(0 0 30px rgba(255, 150, 50, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(255, 220, 120, 0.6))
                drop-shadow(0 0 50px rgba(255, 180, 80, 0.35));
    }
}

