/* ========================================
   BeautyCat 모바일 최적화 스타일시트
   버전: v2.1.0
   최종 업데이트: 2025-11-03
   ======================================== */

/* ============================================
   1. 기본 모바일 최적화
   ============================================ */

.mobile-optimized {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

/* 터치 타겟 최소 크기 (iOS HIG 44x44px) */
/* ⚠️ 모바일 네비게이션 제외 */
button:not(.mobile-nav button):not(.mobile-nav a),
a:not(.mobile-nav button):not(.mobile-nav a),
input[type="button"]:not(.mobile-nav button),
input[type="submit"]:not(.mobile-nav button),
.btn:not(.mobile-nav button):not(.mobile-nav a) {
    min-height: 44px;
    min-width: 44px;
}

/* iOS Safe Area 지원 */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* ============================================
   2. 로고 스타일 (이모지 🐱)
   ============================================ */

.logo-emoji {
    font-size: 2rem; /* 32px */
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; /* 배경 제거 */
    border: none; /* 테두리 제거 */
    box-shadow: none; /* 그림자 제거 */
    transition: all 0.3s ease;
}

.logo-emoji:hover {
    transform: scale(1.1);
    box-shadow: none;
}

/* 모바일 로고 크기 조정 */
@media (max-width: 640px) {
    .logo-emoji {
        font-size: 1.875rem; /* 30px */
    }
}

/* ============================================
   3. 네비게이션 최적화
   ============================================ */

/* 데스크톱 네비게이션 */
.desktop-nav {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
}

/* 모바일 네비게이션 - 중앙 정렬 */
.mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #E5E7EB;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 0.75rem 0;
    }

    .mobile-nav .flex {
        display: flex;
        justify-content: space-evenly !important; /* 중앙 정렬 */
        gap: 1rem;
        padding: 0 1rem;
    }

    .mobile-nav button,
    .mobile-nav a {
        min-width: 0 !important; /* 최소 너비 제거 */
        min-height: 0 !important; /* 최소 높이 제거 */
        max-width: 80px;
        width: 80px;
        height: auto !important;
        padding: 0.375rem 0.5rem !important; /* 패딩 축소 */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        font-size: 13px !important; /* 텍스트 크기 */
        font-weight: 600 !important;
    }

    .mobile-nav i {
        display: none !important; /* 아이콘 숨김 */
        font-size: 0 !important;
        margin: 0 !important;
    }
    
    .mobile-nav {
        padding: 0.875rem 0; /* 상하 패딩 증가 */
    }
}

/* ============================================
   4. 고양이 아이콘 최적화
   ============================================ */

.cat-container {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: transparent; /* 배경 제거 */
    border: none; /* 테두리 제거 */
    box-shadow: none; /* 그림자 제거 */
}

.cat-bounce {
    font-size: 4.5rem; /* 72px */
    animation: cat-bounce 2s ease-in-out infinite;
}

@keyframes cat-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 모바일에서 고양이 아이콘 크기 증가 */
@media (max-width: 640px) {
    .cat-container {
        margin-bottom: 1.25rem;
    }

    .cat-bounce {
        font-size: 6.25rem; /* 100px - 증가 */
    }
    
    /* 모바일 텍스트 크기 최적화 */
    body {
        font-size: 15px;
    }
    
    /* 모바일 버튼 크기 최적화 */
    button, .btn {
        min-height: 48px !important;
        font-size: 15px !important;
        padding: 12px 20px !important;
    }
    
    /* 모바일 입력 필드 최적화 */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    textarea,
    select {
        min-height: 48px !important;
        font-size: 16px !important;
        padding: 12px 16px !important;
    }
    
    /* 모바일 제목 크기 조정 */
    h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.75rem !important;
    }
    
    h3 {
        font-size: 1.125rem !important;
        line-height: 1.5 !important;
    }
    
    /* 모바일 카드 패딩 조정 */
    .unni-card {
        padding: 1.5rem !important;
    }
    
    /* 모바일 간격 조정 */
    .space-y-6 > * + * {
        margin-top: 1.25rem !important;
    }
    
    .space-y-4 > * + * {
        margin-top: 1rem !important;
    }
    
    /* 모바일 그리드 간격 */
    .grid {
        gap: 0.75rem !important;
    }
    
    /* 모바일 하단 네비게이션 공간 확보 */
    body {
        padding-bottom: max(44px, calc(44px + env(safe-area-inset-bottom))) !important;
    }
    
    /* 모바일 최대 너비 조정 */
    .max-w-md {
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .max-w-6xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* ============================================
   5. 버튼 호버 효과 통일
   ============================================ */

/* Primary 버튼 (분홍색) */
.btn-primary {
    background: linear-gradient(135deg, #ff2d92, #e6297f);
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(255, 45, 146, 0.2);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e6297f, #cc256c);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 45, 146, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 45, 146, 0.2);
}

/* Secondary 버튼 (회색/흰색) */
.btn-secondary {
    background: white;
    border: 2px solid #E5E7EB;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Outline 버튼 (검은색 테두리) */
.btn-outline {
    background: transparent;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: linear-gradient(135deg, #FFF5F7 0%, #FFF0F5 100%) !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ============================================
   6. 로그인/회원가입 페이지 - 사용자 타입 선택
   ============================================ */

.user-type-btn {
    background: white;
    border: 2px solid #000000 !important; /* 검은색 테두리 */
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.user-type-btn:hover {
    border-color: #000000 !important; /* 호버 시에도 검은색 유지 */
    background: linear-gradient(135deg, #FFF5F7 0%, #FFF0F5 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.user-type-btn i {
    transition: all 0.3s ease;
}

.user-type-btn:hover i {
    transform: scale(1.1);
}

/* 선택된 상태 */
.user-type-btn.bg-primary-50 {
    background: linear-gradient(135deg, #FDF2F8 0%, #FCE7F3 100%) !important;
    border-color: #000000 !important; /* 선택 시에도 검은색 유지 */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 체크 아이콘 원 */
.user-type-btn .absolute {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 2px solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.user-type-btn.bg-primary-50 .absolute {
    background-color: #000000 !important;
    border-color: #000000 !important;
}

.user-type-btn .fa-check {
    color: white;
    font-size: 0.75rem;
}

/* ============================================
   7. 섹션 스타일
   ============================================ */

/* 히어로 섹션 */
.hero-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #FFF5F7 0%, #FFF0F5 100%);
}

@media (max-width: 640px) {
    .hero-section {
        padding: 2rem 1.25rem;
        padding-bottom: 7rem; /* 모바일 네비게이션 공간 확보 */
    }
    
    .hero-section h1 {
        font-size: 1.75rem !important;
        line-height: 1.25 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-section p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
}

/* 일반 섹션 */
section {
    padding: 2rem 1rem;
}

@media (max-width: 640px) {
    section {
        padding: 1.75rem 1.25rem;
    }
    
    section h2 {
        font-size: 1.375rem !important;
        margin-bottom: 1rem !important;
    }
    
    section p {
        font-size: 0.9375rem !important;
        line-height: 1.6 !important;
    }
}

/* ============================================
   8. 폼 요소 최적화
   ============================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
textarea,
select {
    font-size: 16px !important; /* iOS 줌 방지 */
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 2px solid #E5E7EB;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #ff2d92;
    box-shadow: 0 0 0 3px rgba(255, 45, 146, 0.1);
}

/* ============================================
   9. 모달 최적화
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
}

@media (max-width: 640px) {
    .modal-content {
        max-height: 85vh;
        padding: 1rem;
    }
}

/* ============================================
   10. 텍스트 가독성
   ============================================ */

/* 최소 폰트 크기 */
body {
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1 {
    font-size: 2rem;
    line-height: 1.2;
}

h2 {
    font-size: 1.75rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.4;
}

@media (max-width: 640px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

/* ============================================
   11. 스크롤 최적화
   ============================================ */

* {
    -webkit-overflow-scrolling: touch;
}

/* 부드러운 스크롤 */
html {
    scroll-behavior: smooth;
}

/* ============================================
   12. 이미지 최적화
   ============================================ */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   13. 애니메이션 최적화
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   14. 유틸리티 클래스
   ============================================ */

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-5 {
    margin-bottom: 1.25rem;
}

.mt-4 {
    margin-top: 1rem;
}

.p-4 {
    padding: 1rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ============================================
   15. 반응형 브레이크포인트 참고
   ============================================ */

/*
   - Mobile: 0 - 640px (sm)
   - Tablet: 641px - 1024px (md, lg)
   - Desktop: 1025px+ (xl, 2xl)
*/

/* ============================================
   16. 프린트 최적화
   ============================================ */

@media print {
    .mobile-nav,
    .desktop-nav,
    button,
    .no-print {
        display: none !important;
    }
}

/* ============================================
   17. 다크모드 지원 (선택사항)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* 필요시 다크모드 스타일 추가 */
}

/* ========================================
   끝
   ======================================== */
