/* 모바일 앱 스타일 CSS - 미디어 쿼리로 모바일에서만 적용 */
@media (max-width: 768px) {
  /* 기본 설정 */
  body {
    padding-bottom: 80px;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --primary-color: #343a40;
    --secondary-color: #ff4081;
    --dark-color: #21283b;
    --light-color: #f7f7f7;
  }
  
  /* 컨테이너 조정 */
  .container {
    padding-left: 12px;
    padding-right: 12px;
    max-width: 100%;
    padding-bottom: 20px;
  }
  
  .container-fluid {
    padding-left: 0;
    padding-right: 0;
  }
  
  /* 모바일 앱 헤더 스타일 */
  .navbar {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #343a40, #212529) !important;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    position: sticky;
    top: 0;
    z-index: 1020;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 16px 16px;
  }
  
  .navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
  }
  
  /* 헤더 숨김 효과 */
  .navbar-hidden {
    transform: translateY(-100%);
  }
  
  /* 앱 전환 애니메이션 */
  .page-transitioning {
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .page-loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
  }
  
  /* 새로운 하단 네비게이션 스타일 */
  .modern-nav {
    display: flex;
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    height: 75px;
    background-color: var(--dark-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-radius: 20px;
    padding: 0 20px;
  }
  
  .modern-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
  }
  
  .modern-nav-item.active {
    color: #fff;
  }
  
  .modern-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 10px;
    width: 5px;
    height: 5px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    transition: all 0.3s ease;
  }
  
  .modern-nav-icon {
    font-size: 1.4rem;
    transition: all 0.3s ease;
    position: relative;
  }
  
  .modern-nav-label {
    font-size: 0;
    font-weight: 500;
    position: absolute;
    bottom: 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
  }
  
  .modern-nav-item.active .modern-nav-icon {
    transform: translateY(-8px);
  }
  
  .modern-nav-item.active .modern-nav-label {
    opacity: 1;
    transform: translateY(0);
    font-size: 0.7rem;
  }
  
  /* 플로팅 액션 버튼 */
  .floating-action-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1010;
    transition: all 0.3s ease;
  }
  
  .floating-action-btn:active {
    transform: scale(0.9);
  }
  
  /* 부드러운 스크롤 배지 */
  .scroll-badge {
    position: fixed;
    bottom: 92px;
    right: 90px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    font-size: 20px;
    cursor: pointer;
    z-index: 1009;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
  }
  
  .scroll-badge.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* 컨텍스트 메뉴 */
  .context-menu {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
    width: 250px;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    z-index: 1100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }
  
  .context-menu.visible {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
  }
  
  .context-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.2s ease;
  }
  
  .context-menu-item:active {
    background-color: rgba(0, 0, 0, 0.05);
  }
  
  .context-menu-icon {
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 18px;
  }
  
  .context-menu-label {
    font-size: 14px;
    font-weight: 500;
  }
  
  .context-menu-badge {
    margin-left: auto;
    background-color: var(--secondary-color);
    color: white;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 12px;
  }
  .context-menu-divider {
  height: 1px;
  background-color: rgba(0, 0, 0, 0.1);
  margin: 8px 0;
}
  
  /* 메뉴 배경 블러 효과 */
  .menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1090;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  
  .menu-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .map-tutorial-overlay {
  z-index: 1200;
}

.map-tutorial-container {
  z-index: 1210;
}

.map-tutorial-pointer {
  z-index: 1205; 
}
  
  /* 토스트 알림 */
  .app-toast {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--dark-color);
  color: white;
  padding: 12px 20px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
}
  
  .app-toast.show {
  top: 20px;
}

.app-toast i {
  margin-right: 8px;
  font-size: 16px;
}
  
  /* 카드 디자인 */
  .card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}
  
  .card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
  
  .card-header {
    border-bottom: none;
    padding: 16px;
    background-color: transparent;
  }
  
  .card-header.bg-primary {
    background: linear-gradient(135deg, #2196f3, #1976d2) !important;
    color: white;
    border-radius: 16px 16px 0 0 !important;
  }
  
  .card-header.bg-info {
    background: linear-gradient(135deg, #00bcd4, #0097a7) !important;
    color: white;
    border-radius: 16px 16px 0 0 !important;
  }
  
  .card-body {
    padding: 10px 12px;
  }
  
  .card-footer {
    background-color: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 12px;
  }
  
  /* 애니메이션 효과 */
  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
  }
  
  .pulse {
    animation: pulse 1s infinite;
  }
  
  /* 탭 전환 효과 */
  .tab-container {
    position: relative;
    overflow: hidden;
    min-height: 400px;
  }
  
  .tab-page {
    position: absolute;
    width: 100%;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateX(100px);
  }
  
  .tab-page.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    z-index: 1;
  }
  
  /* 캐러셀 개선 */
  .carousel {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    margin-bottom: 20px;
  }
  
  .carousel-inner {
    border-radius: 16px;
  }
  
  .carousel-item img {
    border-radius: 16px;
  }
  
  /* 버튼 스타일 향상 */
  .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.375rem 1rem;
    transition: all 0.2s ease;
  }
  
  .btn-sm {
    border-radius: 6px;
    font-size: 0.8rem;
  }
  
  .btn-outline-primary {
    border-color: #2196f3;
    color: #2196f3;
  }
  
  .btn-outline-primary:hover, .btn-outline-primary:active {
    background-color: #2196f3;
    border-color: #2196f3;
    color: white;
  }
  
  /* 위치 카드 스타일 */
  .location-card {
    margin-bottom: 14px;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
  
  .location-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
  }
  
  .location-info {
    padding: 16px;
  }
  
  .location-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dark-color);
  }
  
  .location-address {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
  }
  
  .location-address i {
    color: var(--secondary-color);
    margin-right: 6px;
  }
  
  .location-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
  }
  
  .tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(63, 81, 181, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .location-stats {
    display: flex;
    justify-content: space-between;
  }
  
  .stat {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 13px;
  }
  
  .stat i {
    margin-right: 4px;
    font-size: 14px;
  }
  
  /* 리스트 그룹 스타일 */
  .list-group {
    border-radius: 12px;
    overflow: hidden;
  }
  
  .list-group-item {
    border-left: none;
    border-right: none;
    padding: 16px;
    transition: background-color 0.2s ease;
  }
  /* 모바일 헤더 사용자 정보 스타일 */
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background: linear-gradient(135deg, #343a40, #212529);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1020;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-user-info {
  display: flex;
  flex-direction: column;
  margin-left: 8px;
}

.mobile-nickname {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.1;
}

.mobile-credits-membership {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  gap: 8px;
}

.mobile-credits {
  color: #ffc107;
}

.mobile-membership {
  color: #17a2b8;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
  
  .list-group-item:first-child {
    border-top: none;
  }
  
  .list-group-item:last-child {
    border-bottom: none;
  }
  
  .list-group-item:active {
    background-color: rgba(0, 0, 0, 0.02);
  }
  
  /* 배지 스타일 */
  .badge {
    font-weight: 500;
    padding: 0.4em 0.6em;
    border-radius: 6px;
  }
  
  .badge.bg-info {
    background-color: #03a9f4 !important;
    color: white;
    font-weight: normal;
    padding: 5px 8px;
  }
  
  .badge.bg-success {
    background-color: #4caf50 !important;
    color: white;
    font-weight: normal;
    padding: 5px 8px;
  }
  
  /* 알림 스타일 */
  .alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
  
  /* 헤딩 스타일 */
  h2, .h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
  }
  
  h5, .h5 {
    font-size: 1.1rem;
    font-weight: 600;
  }
  
  .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
  }
  
  .section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--dark-color);
  }
  
  /* 컨텐츠 섹션 */
  .content-section {
    margin-bottom: 24px;
  }
  
  /* 푸터 스타일 */
  .container-fluid.mt-5.py-4.bg-light {
    background-color: #f8f9fa !important;
    padding-bottom: 70px !important; /* 모바일 푸터에 네비바 공간 확보 */
  }
  
  /* 카드 이미지 조정 */
  .card-img-top {
    width: 100%;
    object-fit: cover;
  }

  .card-img-top.landscape {
    aspect-ratio: 4/3;
  }

  .card-img-top.portrait {
    aspect-ratio: 3/4;
  }
      
  .card-header h5 {
    font-size: 1.05rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
  }
  
  .card-header h5::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 20px;
    margin-right: 8px;
    border-radius: 3px;
    background-color: #fff;
  }
  
  /* 사용자 프로필 스타일 */
  .rounded-circle {
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  /* 물결 효과 */
  .ripple {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    transform: scale(0);
    opacity: 1;
    pointer-events: none;
    left: 50%;
    top: 50%;
    transform-origin: center;
  }
  
  .ripple.active {
    animation: ripple-effect 0.6s ease-out;
  }
  
  @keyframes ripple-effect {
    0% {
      transform: scale(0);
      opacity: 1;
    }
    100% {
      transform: scale(20);
      opacity: 0;
    }
  }
  
  /* 터치 효과 */
  .touch-active {
    transform: scale(0.97);
    transition: transform 0.2s ease;
  }
  
  /* 설치 버튼 개선 */
  #install-button {
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
  }
  
  /* 앱 스타일 폼 요소 */
  input, select, textarea, .form-control {
    font-size: 16px !important; /* iOS에서 확대 방지 */
    border-radius: 12px;
    padding: 12px;
    background-color: #f5f5f5;
    border: 1px solid transparent;
    transition: all 0.2s ease;
  }
  
  input:focus, select:focus, textarea:focus, .form-control:focus {
    background-color: #fff;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
  }
  
  /* 공지사항 및 게시글 리스트 아이템 */
  .mobile-post-item {
    padding: 14px 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  .mobile-post-item:last-child {
    border-bottom: none;
  }
  
  .mobile-post-item a {
    display: block;
    padding: 0;
    color: inherit;
  }
  
  .mobile-post-item .post-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.4;
  }
  
  .mobile-post-item .post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 6px;
  }
  
  .mobile-post-item .post-preview {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  /* 더보기 버튼 */
  .view-more-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background-color: #f8f9fa;
    color: #2196f3;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 0 0 16px 16px;
    margin-top: 5px;
  }
  
  /* 모달 바텀 시트 스타일 */
  .modal.mobile-sheet .modal-dialog {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
  }
  
  .modal.mobile-sheet .modal-content {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }
  
  /* 텍스트 스타일 */
  .text-muted {
    color: #6c757d !important;
  }
  
  .small {
    font-size: 0.875rem;
  }
  
  /* 문단 간격 조정 */
  p {
    margin-bottom: 0.5rem;
  }
  
  /* 홈페이지 그리드 조정 */
  .row-cols-1.row-cols-md-2.g-4 {
    margin-left: -8px;
    margin-right: -8px;
  }
  
  .row-cols-1.row-cols-md-2.g-4 > .col {
    padding-left: 8px;
    padding-right: 8px;
  }
  
  /* 앱 홈 화면 스타일 - 추가적인 뷰포트 높이 계산 지원 */
  /* iOS Safari에서 100vh 문제 해결 */
  @supports (-webkit-touch-callout: none) {
    body {
      min-height: -webkit-fill-available;
    }
    
    .min-vh-100 {
      min-height: -webkit-fill-available;
    }
  }
}

@keyframes tutorial-highlight-pulse {
  0% {
    box-shadow: 0 0 0 5px rgba(33, 150, 243, 0.3);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(33, 150, 243, 0.5);
  }
  100% {
    box-shadow: 0 0 0 5px rgba(33, 150, 243, 0.3);
  }
}

.tutorial-highlighted {
  position: relative;
  z-index: 2000;
  box-shadow: 0 0 0 10px rgba(33, 150, 243, 0.3);
  transition: box-shadow 0.3s ease;
}