/* 공통 모바일 헤더 스타일 */

/* 1단: 애니메이션 타이틀 - 더 구체적인 선택자로 우선순위 보장 */
.mobile-animation-title {
    color: white !important;
    padding: 8px 15px 4px 15px !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    position: relative !important;
    z-index: 1000 !important;
}

/* 기본 스타일 */
.mobile-animation-title {
    color: #475569 !important;
    position: relative;
    overflow: hidden;
}

/* 애니메이션 메시지 전환 효과 */
.mobile-animation-title .animation-message {
    transition: all 0.3s ease-in-out;
    position: relative;
    z-index: 2;
}

/* 글리터 효과 */
.glitter-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    background-size: 200% 200%;
    animation: glitter 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes glitter {
    0% {
        background-position: -200% -200%;
    }
    100% {
        background-position: 200% 200%;
    }
}

/* 애니메이션 키프레임 제거됨 */

/* 기존 복잡한 애니메이션 키프레임 제거 - 슬라이드 스타일로 통일 */

/* 2단: 모바일 헤더 */
.mobile-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
    flex: 1;
}

.mobile-header h1 a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.mobile-header h1 a:hover {
    color: #667eea;
}

/* 3단: 모바일 카테고리 스와이퍼 */
.mobile-category-swiper {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 0;
    position: sticky;
    top: 60px;
    z-index: 998;
}

.mobile-category-swiper .swiper-slide a {
    display: block;
    padding: 8px 16px;
    text-align: center;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.mobile-category-swiper .swiper-slide a:hover,
.mobile-category-swiper .swiper-slide a.active {
    background: #667eea;
    color: white;
}

/* 햄버거 버튼 공통 스타일 - 크기 살짝 증가 및 중앙 정렬 */
.mobile-hamburger {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-hamburger:hover {
    background: #f1f5f9;
}

.mobile-hamburger .hamburger-line {
    width: 16px;
    height: 2px;
    background: #999999;
    border-radius: 1px;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.mobile-hamburger::before,
.mobile-hamburger::after {
    content: '';
    width: 16px;
    height: 2px;
    background: #999999;
    border-radius: 1px;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.mobile-hamburger::before {
    transform: translateY(-3px);
}

.mobile-hamburger::after {
    transform: translateY(3px);
}

/* X 변환 애니메이션 */
body.sidebar-open .mobile-hamburger::before {
    transform: translateY(0) rotate(45deg) !important;
}

body.sidebar-open .mobile-hamburger::after {
    transform: translateY(0) rotate(-45deg) !important;
}

body.sidebar-open .mobile-hamburger .hamburger-line {
    opacity: 0 !important;
    transform: scale(0) !important;
}

/* 반응형 처리 */
@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
}

/* PC에서 모바일 요소 숨기기 */
@media (min-width: 769px) {
    .mobile-animation-title,
    .mobile-header,
    .mobile-category-swiper,
    .mobile-only,
    .mobile-main-content,
    .mobile-sections-container,
    .mobile-section {
        display: none !important;
    }
}

/* 모바일에서 PC 요소 숨기기 */
@media (max-width: 768px) {
    .pc-only {
        display: none !important;
    }
}
