/* 모바일 최적화 스타일 */

* {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 70px;
  overflow-x: hidden;
}

/* 네비게이션 */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 999;
  border-top: 1px solid #f0f0f0;
}

.nav-item {
  transition: all 0.2s ease;
  min-width: 60px;
}

.nav-item:active {
  transform: scale(0.95);
}

/* 검색바 */
.search-bar {
  position: sticky;
  top: 56px;
  z-index: 40;
  background: white;
  border-bottom: 1px solid #f5f5f5;
}

/* 카테고리 스크롤 */
.category-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.category-btn {
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.category-btn.active {
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.category-btn:active {
  transform: scale(0.95);
}

/* 카드 스타일 */
.venue-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.venue-card:active {
  transform: scale(0.98);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.venue-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.venue-image::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

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

/* 섹션 헤더 */
.section-header {
  background: white;
  padding: 16px;
  position: sticky;
  top: 112px;
  z-index: 30;
  border-bottom: 1px solid #f0f0f0;
}

/* 플로팅 버튼 */
.floating-btn {
  position: fixed;
  bottom: 85px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 998;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.floating-btn:active {
  transform: scale(0.9);
}

.floating-btn::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* 버튼 애니메이션 */
button {
  transition: all 0.2s ease;
  touch-action: manipulation;
}

button:active {
  transform: scale(0.95);
}

/* 입력 필드 */
input:focus {
  outline: none;
}

/* 링크 */
a {
  -webkit-tap-highlight-color: transparent;
}

/* 스크롤바 숨김 */
::-webkit-scrollbar {
  width: 0px;
  height: 0px;
}

/* 페이드인 애니메이션 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.venue-card {
  animation: fadeIn 0.4s ease-out;
}

/* 로딩 스피너 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { 
    transform: rotate(360deg); 
  }
}

/* 반응형 이미지 */
img {
  max-width: 100%;
  height: auto;
}

/* 터치 피드백 */
.touch-feedback:active {
  opacity: 0.7;
}

/* 배지 스타일 */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* 그라디언트 텍스트 */
.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Safe Area 대응 (iOS) */
@supports (padding: max(0px)) {
  body {
    padding-bottom: max(70px, env(safe-area-inset-bottom));
  }
  
  .mobile-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* 다크모드 준비 */
@media (prefers-color-scheme: dark) {
  /* 추후 다크모드 구현 시 사용 */
}

/* 태블릿 대응 */
@media (min-width: 768px) {
  .venue-card {
    max-width: 400px;
    margin: 0 auto;
  }
  
  #venues-container,
  #studios-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* 데스크톱 대응 */
@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
  }
  
  .mobile-nav {
    display: none;
  }
  
  .floating-btn {
    bottom: 24px;
  }
  
  #venues-container,
  #studios-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 애니메이션 지연 */
.venue-card:nth-child(1) { animation-delay: 0s; }
.venue-card:nth-child(2) { animation-delay: 0.1s; }
.venue-card:nth-child(3) { animation-delay: 0.2s; }
.venue-card:nth-child(4) { animation-delay: 0.3s; }
