/* 공유넷 모바일 앱 스타일 - 토스 + 넷플릭스 레드 */

/* ===== 기본 리셋 및 앱 구조 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html {
    font-size: 16px;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    height: 100%;
    background: linear-gradient(to bottom, #FAFBFC 0%, #F5F6F8 100%);
    color: #191F28;
    overflow: hidden;
    position: relative;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== 앱 컨테이너 구조 ===== */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* ===== 앱바 (상단 헤더) ===== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header-center {
    flex: 1;
    text-align: center;
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #191F28;
    margin: 0;
}

.header-action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #F8F9FA;
    color: #8B95A1;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-action-btn:active {
    background: #E50914;
    color: #FFFFFF;
    transform: scale(0.95);
}

.points-display {
    background: linear-gradient(135deg, #E50914 0%, #cc0812 100%);
    color: #FFFFFF;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== 메인 컨텐츠 영역 ===== */
.app-content {
    flex: 1;
    padding-top: 60px; /* 앱바 높이 */
    padding-bottom: 80px; /* 하단 네비게이션 높이 */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #F8F9FA;
}

.content-container {
    padding: 16px;
    max-width: 100%;
}

/* ===== 카드 기반 UI ===== */
.app-card {
    background: linear-gradient(145deg, #FFFFFF 0%, #FCFCFD 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.app-card:active {
    transform: translateY(1px);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    gap: 8px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #191F28;
    margin: 0;
    text-align: center;
    width: 100%;
}

.card-subtitle {
    font-size: 0.9rem;
    color: #666666;
    margin: 0;
    text-align: center;
    line-height: 1.4;
}

.card-action {
    color: #8B95A1;
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 500;
}

.card-action:active {
    color: #E50914;
}

/* ===== 서비스 카드 ===== */
.service-card {
    background: linear-gradient(145deg, #FFFFFF 0%, #FAFBFC 100%);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::after {
    opacity: 1;
}

.service-card.featured {
    border-color: rgba(229, 9, 20, 0.2);
    background: linear-gradient(145deg, #FFF8F8 0%, #FFFFFF 100%);
    box-shadow: 0 4px 24px rgba(229, 9, 20, 0.08), 0 0 0 1px rgba(229, 9, 20, 0.1);
}

.service-card:active {
    transform: scale(0.99);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.service-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.9) 0%, rgba(204, 8, 18, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.service-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #191F28;
    margin: 0 0 4px 0;
}

.service-info p {
    font-size: 0.9rem;
    color: #8B95A1;
    margin: 0;
}

.price-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.current-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #E50914;
}

.original-price {
    font-size: 1rem;
    color: #8B95A1;
    text-decoration: line-through;
}

.discount-badge {
    background: #E50914;
    color: #FFFFFF;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ===== 버튼 시스템 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
    gap: 8px;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.95) 0%, rgba(204, 8, 18, 0.95) 100%);
    color: #FFFFFF;
    box-shadow: 0 6px 24px rgba(229, 9, 20, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 3px 12px rgba(229, 9, 20, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-secondary {
    background: linear-gradient(145deg, #FAFBFC 0%, #F5F6F8 100%);
    color: #191F28;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.btn-secondary:active {
    background: linear-gradient(145deg, #F5F6F8 0%, #F0F1F3 100%);
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.5);
    color: rgba(229, 9, 20, 0.9);
    border: 1.5px solid rgba(229, 9, 20, 0.3);
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.08), 0 0 0 1px rgba(229, 9, 20, 0.05) inset;
}

.btn-outline:active {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.95) 0%, rgba(204, 8, 18, 0.95) 100%);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 3px 12px rgba(229, 9, 20, 0.3);
}

.btn-full {
    width: 100%;
}

/* ===== 하단 탭 네비게이션 ===== */
.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.04);
    z-index: 1000;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #8B95A1;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 60px;
    min-height: 60px;
    flex: 1;
    max-width: 80px;
}

.nav-tab:active {
    background: rgba(229, 9, 20, 0.05);
    color: #E50914;
    transform: scale(0.95);
}

.nav-tab.active {
    color: #E50914;
    font-weight: 600;
    background: rgba(229, 9, 20, 0.05);
}

.nav-tab-icon {
    font-size: 1.3rem;
    margin-bottom: 4px;
    line-height: 1;
}

.nav-tab-label {
    font-size: 0.65rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

/* 네비게이션 아이콘/라벨 별칭 */
.nav-icon {
    font-size: 1.3rem;
    margin-bottom: 4px;
    line-height: 1;
}

.nav-label {
    font-size: 0.65rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

/* ===== 액션 그리드 ===== */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.action-item {
    background: #FFFFFF;
    border: 1px solid #F2F4F6;
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: #191F28;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100px;
    justify-content: center;
}

.action-item:active {
    transform: scale(0.97);
    background: #F8F9FA;
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.action-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.action-subtitle {
    font-size: 0.7rem;
    color: #8B95A1;
    margin: 0;
}

/* ===== 리스트 아이템 ===== */
.list-item {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 8px;
    border: 1px solid #F2F4F6;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: #191F28;
    transition: all 0.2s ease;
}

.list-item:active {
    background: #F8F9FA;
    transform: translateX(4px);
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.list-item-subtitle {
    font-size: 0.8rem;
    color: #8B95A1;
    margin: 0;
}

.list-item-action {
    color: #8B95A1;
    font-size: 1.2rem;
}

/* ===== 상태 배지 ===== */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
}

.status-active {
    background: rgba(0, 200, 81, 0.1);
    color: #00C851;
}

.status-inactive {
    background: rgba(139, 149, 161, 0.1);
    color: #8B95A1;
}

.status-expired {
    background: rgba(229, 9, 20, 0.1);
    color: #E50914;
}

/* ===== 터치 피드백 ===== */
.touchable {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.touchable:active {
    opacity: 0.8;
}

/* ===== 로딩 상태 ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #F2F4F6;
    border-top: 3px solid #E50914;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== 유틸리티 클래스 ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.accent-text {
    color: #E50914;
    font-weight: 700;
}

.subtle-text {
    color: #8B95A1;
    font-size: 0.9rem;
}

/* ===== 반응형 조정 ===== */
@media (max-width: 390px) {
    .content-container {
        padding: 12px;
    }

    .app-card,
    .service-card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .action-grid {
        gap: 8px;
    }

    .action-item {
        padding: 16px;
        min-height: 80px;
    }
}
.hidden{
    display: none !important;
}
.h-empty{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 180px);
}
.h-empty img{
    margin-bottom: 20px;
}
.h-empty p{
    color: #7F8994;
    font-size: 14px;
}
@media (min-width: 769px) {
    /* 데스크톱에서도 모바일 앱 경험 유지 */
    body {
        background: #E5E7EB !important;
        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;
        min-height: 100vh !important;
        padding: 20px 0 !important;
        position: relative !important;
        overflow: visible !important;
    }

    /* 로딩 화면 PC 최적화 */
    .loading-initial {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 10000 !important;
        background: #F8F9FA !important;
        padding: 20px !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }

    /* 앱 컨테이너 PC 최적화 */
    .app-container {
        width: 100% !important;
        max-width: 420px !important;
        height: calc(100vh - 40px) !important;
        min-height: 800px !important;
        background: #F8F9FA !important;
        border-radius: 24px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
        overflow: hidden !important;
        position: relative !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .app-header {
        border-radius: 24px 24px 0 0;
        position: absolute;
        width: 100%;
    }

    .app-content {
        height: calc(100% - 140px); /* 헤더(60px) + 네비게이션(80px) */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .app-bottom-nav {
        border-radius: 0 0 24px 24px;
        width: 100%;
        left: 0;
        right: 0;
        position: absolute;
        bottom: 0;
    }

    /* PC에서 호버 효과 추가 */
    .touchable:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
    }

    .nav-tab:hover {
        background: rgba(229, 9, 20, 0.05);
        color: #E50914;
    }

}
.empty-state {
    text-align: center;
    padding: 1rem 1rem;
    display: none;
}

.empty-state.state-visible {
    display: block;
}

.empty-icon {
    width: 5rem;
    height: 5rem;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 2rem;
}

.empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.empty-description {
    color: #4b5563;
    margin-bottom: 2rem;
}

.btn-empty {
    padding: 0.75rem 2rem;
    background: #E50914;
    color: white;
    border: none;
    border-radius:12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.overlay-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.6);
    display: none;
}
.loader {
  width: 48px;
  height: 48px;
  border: 5px solid #FFF;
  border-bottom-color: #E50914;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  }

  @keyframes rotation {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
  }
