/**
 * 멜번 스탬프 투어 맵 - 스타일시트
 * 호주장터 브랜딩 (#FF700F 오렌지)
 * 반응형 디자인: 모바일, 태블릿, 데스크톱
 */

:root {
    --color-primary: #FF700F;
    --color-primary-dark: #E56000;
    --color-primary-light: #FF8C3D;
    --color-secondary: #333333;
    --color-bg: #FFFFFF;
    --color-surface: #FFFFFF;
    --color-surface-alt: #F9FAFB;
    --color-text: #1F2937;
    --color-text-light: #6B7280;
    --color-text-muted: #9CA3AF;
    --color-border: #E5E7EB;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-kakao: #FEE500;
    --color-google: #FFFFFF;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --header-height: 60px;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== 헤더 - 컴팩트 모바일 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    padding-top: var(--safe-area-top);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-image {
    height: 32px;
    width: auto;
}

/* ===== 헤더 메인 타이틀 & 스탯 ===== */
.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.header-stats-text {
    font-size: 10px;
    color: var(--color-text-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.header-stats-text b {
    color: var(--color-primary);
    font-weight: 700;
}

.header-stats-text .divider {
    color: var(--color-border);
    font-size: 8px;
    margin: 0 1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(255, 112, 15, 0.25);
}

.btn-login:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.user-info {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-full);
    transition: background 0.2s;
}

.user-info:active {
    background: var(--color-surface-alt);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primary);
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    overflow: hidden;
}

.user-info:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: var(--color-surface-alt);
}

.user-dropdown a:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.user-dropdown a:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    color: var(--color-error);
    background: rgba(239, 68, 68, 0.05);
}

/* ===== 메인 컨텐츠 ===== */
.main-content {
    padding-top: calc(var(--header-height) + var(--safe-area-top));
    padding-bottom: var(--safe-area-bottom);
}

/* ===== 지도 섹션 - 모바일 최적화 ===== */
.map-section {
    position: relative;
    height: 60vh;
    min-height: 320px;
    max-height: 500px;
    background: var(--color-surface-alt);
}

.map-container {
    width: 100%;
    height: 100%;
}

.map-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.map-btn {
    width: 44px;
    height: 44px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.map-btn:hover,
.map-btn.active {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.map-btn svg {
    width: 20px;
    height: 20px;
}

/* 위치 상태 - 지도 위 작은 배지로 변경 */
/* 위치 상태 - 지도 위 작은 배지로 변경 */
.location-status {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 10px;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    max-width: 80%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10;
    transition: all 0.3s;
    font-weight: 600;
    border: 1px solid transparent;
}

.status-icon {
    font-size: 16px;
}

.status-text {
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-status.success {
    background: white;
    border: 1px solid var(--color-success);
}

.location-status.success .status-text {
    color: var(--color-success);
}

.location-status.error {
    background: white;
    border: 1px solid var(--color-error);
}

.location-status.error .status-text {
    color: var(--color-error);
}

/* 나침반 버튼 */
.map-btn.compass-btn {
    position: relative;
}

.map-btn.compass-btn svg {
    transition: transform 0.3s ease;
}

.map-btn.compass-btn.tracking svg {
    color: var(--color-primary);
}

/* ===== 통계 섹션 - 컴팩트 모바일 ===== */
.stats-section {
    padding: 16px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.stats-grid {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 4 -> 2 columns for better readability */
    gap: 10px;
}

.stat-card {
    text-align: center;
    padding: 14px 10px;
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: transform 0.2s;
}

.stat-card:active {
    transform: scale(0.98);
}

.stat-card.highlight {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 112, 15, 0.2);
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 12px;
    color: var(--color-text-light);
    font-weight: 600;
}

.stat-card.highlight .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* ===== 필터 섹션 - 컴팩트 ===== */
.filter-section {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
    transition: box-shadow 0.2s ease;
}

/* 모바일에서 스크롤 시 필터 고정 */
@media (max-width: 768px) {
    .filter-section {
        position: sticky;
        top: calc(var(--header-height) + var(--safe-area-top));
        z-index: 90;
    }

    .filter-section.floating {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.filter-scroll {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    /* for shadow clipping */
}

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

.filter-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-btn:active {
    transform: scale(0.96);
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(255, 112, 15, 0.05);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 112, 15, 0.3);
}

.filter-emoji {
    font-size: 14px;
}

/* ===== 코스 섹션 - 컴팩트 모바일 그리드 ===== */
.courses-section {
    padding: 16px;
    background: var(--color-surface-alt);
    min-height: 500px;
}

.courses-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Single column for mobile */
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Larger mobile adjustments */
@media (min-width: 480px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.course-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.course-card:active {
    transform: scale(0.99);
}

.course-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: transparent;
}

.course-card.stamped {
    border: 2px solid var(--color-success);
    background: linear-gradient(to bottom right, rgba(16, 185, 129, 0.05), #fff);
}

.course-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(to right, rgba(255, 112, 15, 0.08), rgba(255, 112, 15, 0.02));
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.course-category {
    display: inline-block;
    padding: 4px 10px;
    background: white;
    color: var(--color-primary);
    border: 1px solid rgba(255, 112, 15, 0.2);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.stamp-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--color-success);
    color: white;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.course-body {
    padding: 16px;
    flex: 1;
}

/* Old course category style removed */
font-size: 10px;
font-weight: 700;
margin-bottom: 8px;
}

.course-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-desc {
    font-size: 13px;
    color: var(--color-text-light);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 10px;
    color: var(--color-text-muted);
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.course-meta i {
    font-style: normal;
}

.course-footer {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-alt);
}

.course-footer button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-detail {
    background: white;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-detail:active {
    background: var(--color-surface-alt);
    transform: scale(0.98);
}

.btn-detail:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-navigate {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 4px rgba(255, 112, 15, 0.3);
}

.btn-navigate:active {
    transform: scale(0.98);
    box-shadow: none;
}

.btn-navigate:hover {
    background: var(--color-primary-dark);
}

/* ===== 모달 ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

/* 로그인 모달은 다른 모달보다 위에 표시 */
#loginModal {
    z-index: 1100;
}

#loginModal .modal-overlay {
    z-index: 1100;
}

#loginModal .modal-content {
    z-index: 1101;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    background: var(--color-surface-alt);
    border: none;
    border-radius: 50%;
    font-size: 22px;
    color: var(--color-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--color-error);
    color: white;
}

/* 로그인 모달 */
.login-modal {
    padding: 48px 28px;
    text-align: center;
}

.login-header {
    margin-bottom: 36px;
}

.login-logo {
    height: 50px;
    margin-bottom: 20px;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: var(--color-text-light);
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-social.kakao {
    background: var(--color-kakao);
    color: #000;
}

.btn-social.kakao:hover {
    background: #E6CF00;
}

.btn-social.google {
    background: var(--color-google);
    color: #333;
    border: 1px solid var(--color-border);
}

.btn-social.google:hover {
    background: var(--color-surface-alt);
}

.login-notice {
    margin-top: 24px;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* 코스 상세 모달 - 컴팩트 */
.course-modal {
    padding: 0;
    max-height: 80vh;
}

.course-detail-header {
    padding: 24px 20px 16px;
    background: white;
    text-align: center;
    position: relative;
}

/* 카테고리 배지 */
.course-category-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.course-detail-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.course-detail-title-en {
    font-size: 13px;
    color: var(--color-text-light);
    font-weight: 500;
}

.course-detail-body {
    padding: 16px 20px;
}

.course-detail-desc {
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 20px;
}

.course-detail-info {
    background: var(--color-surface-alt);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--color-border);
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-row:first-child {
    padding-top: 0;
}

.info-label {
    min-width: 70px;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 12px;
}

.info-value {
    color: var(--color-text);
    font-weight: 500;
    flex: 1;
}

.course-detail-tips {
    background: #FFF8E1;
    /* Light yellow background for tips */
    border-radius: var(--radius-lg);
    padding: 16px;
    border-left: 4px solid #FFC107;
}

.course-detail-tips h4 {
    font-size: 12px;
    font-weight: 800;
    color: #F57F17;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.course-detail-tips h4::before {
    content: '💡';
}

.course-detail-tips p {
    font-size: 13px;
    color: var(--color-text);
    line-height: 1.5;
}

.course-detail-actions {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    background: white;
}

.btn-action {
    flex: 1;
    padding: 0 16px;
    height: 48px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-stamp {
    background: var(--color-success);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-stamp:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-stamp:disabled {
    background: var(--color-text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-map {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 112, 15, 0.3);
}

.btn-map:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ===== 스탬프 알림 - 토스트 스타일 ===== */
.stamp-notification {
    position: fixed;
    bottom: calc(var(--safe-area-bottom) + 80px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-success);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: calc(100% - 32px);
}

.stamp-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.stamp-icon {
    font-size: 24px;
}

.stamp-message strong {
    display: block;
    font-size: 14px;
    margin-bottom: 1px;
}

.stamp-message span {
    font-size: 12px;
    opacity: 0.9;
}

/* 스탬프 결과 인라인 피드백 */
.stamp-result-inline {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: white;
    border-radius: var(--radius-xl);
    padding: 24px 32px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    z-index: 1002;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.stamp-result-inline.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.stamp-result-inline.success {
    border: 3px solid var(--color-success);
}

.stamp-result-inline.error {
    border: 3px solid var(--color-error);
}

.stamp-result-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.stamp-result-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.stamp-result-sub {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 4px;
}

/* 스탬프 결과 오버레이 */
.stamp-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.stamp-result-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ===== 푸터 ===== */
.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 24px 16px;
    text-align: center;
}

.footer-logo {
    height: 28px;
    margin-bottom: 12px;
}

.footer p {
    font-size: 13px;
    color: var(--color-text-light);
}

.footer a {
    color: var(--color-primary);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.coffee-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #FFDD00 0%, #FBB034 100%);
    color: #333;
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.coffee-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    background: linear-gradient(135deg, #FBB034 0%, #FFDD00 100%);
}

/* ===== 반응형: 태블릿 ===== */
@media (min-width: 768px) {
    .header-content {
        padding: 0 24px;
    }

    .logo-image {
        height: 40px;
    }

    .logo-text h1 {
        font-size: 18px;
    }

    .logo-text p {
        font-size: 12px;
    }

    .map-section {
        height: 50vh;
        max-height: 550px;
    }

    .location-status {
        max-width: 280px;
        font-size: 12px;
    }

    .stats-grid {
        max-width: 700px;
    }

    .stat-value {
        font-size: 26px;
    }

    .stat-label {
        font-size: 11px;
    }

    .filter-section {
        padding: 12px 0;
    }

    .filter-scroll {
        padding: 0 24px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .filter-btn {
        padding: 9px 16px;
        font-size: 13px;
    }

    .courses-section {
        padding: 20px 24px;
    }

    .courses-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .course-title {
        font-size: 14px;
    }

    .course-emoji {
        font-size: 32px;
    }

    .modal-content {
        max-width: 480px;
    }
}

/* ===== 반응형: 데스크톱 ===== */
@media (min-width: 1024px) {
    .header-content {
        padding: 0 40px;
    }

    .logo-image {
        height: 44px;
    }

    .logo-text h1 {
        font-size: 20px;
    }

    .map-section {
        height: 55vh;
        max-height: 600px;
    }

    .map-controls {
        bottom: 20px;
        right: 20px;
    }

    .location-status {
        top: 20px;
        left: 20px;
        max-width: 320px;
        font-size: 13px;
    }

    .stats-section {
        padding: 20px 40px;
    }

    .stats-grid {
        max-width: 800px;
    }

    .stat-card {
        padding: 14px 10px;
    }

    .stat-value {
        font-size: 30px;
    }

    .filter-scroll {
        padding: 0 40px;
    }

    .courses-section {
        padding: 28px 40px;
    }

    .courses-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .course-card:hover {
        transform: translateY(-2px);
    }

    .course-emoji {
        font-size: 36px;
    }

    .course-title {
        font-size: 15px;
    }

    .footer {
        padding: 32px 40px;
    }
}

/* ===== 반응형: 대형 데스크톱 ===== */
@media (min-width: 1400px) {
    .courses-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ===== 유틸리티 ===== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Mapbox 커스텀 ===== */
.mapboxgl-popup-content {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.mapboxgl-popup-close-button {
    font-size: 18px;
    padding: 4px 8px;
}

.mapboxgl-ctrl-group {
    border-radius: var(--radius-md) !important;
    overflow: hidden;
}

.mapboxgl-ctrl-group button {
    width: 36px !important;
    height: 36px !important;
}

/* Mapbox 저작권 및 로고 완전 숨김 */
.mapboxgl-ctrl-attrib,
.mapboxgl-ctrl-attrib-inner,
.mapboxgl-ctrl-logo,
.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right,
.mapboxgl-ctrl-attrib.mapboxgl-compact,
.mapboxgl-ctrl-attrib-button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ===== 데이트 코스 루트 패널 ===== */
.date-route-panel {
    padding: 0;
}

.route-panel-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}

.route-panel-desc {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.route-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.route-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 18px;
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.3s;
}

.route-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.route-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.route-number {
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.route-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.route-info p {
    font-size: 13px;
    color: var(--color-text-light);
}

.route-spots-preview {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    padding: 12px;
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
}

.spot-emoji {
    font-size: 20px;
}

.spot-arrow {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
}

.route-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* ===== 루트 상세 모달 ===== */
.route-detail-header {
    padding: 28px;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.08) 0%, rgba(233, 30, 99, 0.03) 100%);
    text-align: center;
}

.route-detail-emoji {
    font-size: 50px;
    margin-bottom: 12px;
}

.route-detail-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 6px;
}

.route-detail-desc {
    font-size: 14px;
    color: var(--color-text-light);
}

.route-detail-body {
    padding: 24px;
}

.route-summary {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--color-text);
}

.route-spots-list {
    display: flex;
    flex-direction: column;
}

.route-spot-item {
    display: flex;
    gap: 14px;
    position: relative;
}

.spot-number {
    width: 28px;
    height: 28px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.spot-content {
    flex: 1;
    padding-bottom: 16px;
}

.spot-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.spot-emoji-large {
    font-size: 24px;
}

.spot-title-wrap h5 {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.spot-time {
    font-size: 12px;
    color: var(--color-text-muted);
}

.spot-note {
    font-size: 13px;
    color: var(--color-text-light);
    margin: 0;
}

.spot-connector {
    position: absolute;
    left: 13px;
    bottom: 0;
    color: var(--color-primary);
    font-size: 16px;
    font-weight: bold;
}

.route-detail-actions {
    padding: 18px 24px;
    border-top: 1px solid var(--color-border);
}

.btn-start-route {
    width: 100%;
    padding: 15px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-start-route:hover {
    background: var(--color-primary-dark);
}

/* ===== 반응형: 태블릿 - 루트 카드 ===== */
@media (min-width: 768px) {
    .route-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== 반응형: 데스크톱 - 루트 카드 ===== */
@media (min-width: 1024px) {
    .route-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ===== 스탬프 도감 모달 ===== */
.stamp-collection-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.collection-header {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #FF700F 0%, #FF8C3D 100%);
    color: white;
}

.collection-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.collection-header p {
    font-size: 14px;
    opacity: 0.9;
}

.collection-progress {
    padding: 24px;
    text-align: center;
    background: var(--color-surface-alt);
}

.progress-circle {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
}

.progress-circle svg {
    width: 100%;
    height: 100%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-percent {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
}

.progress-count {
    display: block;
    font-size: 14px;
    color: var(--color-text-light);
}

.progress-message {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.collection-categories {
    padding: 20px;
}

.collection-categories h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--color-text);
}

.categories-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.collection-category {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    position: relative;
}

.collection-category.complete {
    border-color: var(--color-success);
    background: rgba(16, 185, 129, 0.05);
}

.category-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.category-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.category-progress {
    font-size: 13px;
    color: var(--color-text-light);
}

.category-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-border);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
}

.category-bar-fill {
    height: 100%;
    background: var(--color-primary);
    transition: width 0.5s ease;
}

.complete-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 20px;
}

.collection-stamps {
    padding: 20px;
    background: var(--color-surface-alt);
}

.collection-stamps h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--color-text);
}

.stamps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stamp-item {
    text-align: center;
    cursor: pointer;
}

.stamp-item.locked {
    cursor: default;
    opacity: 0.5;
}

.stamp-circle {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.stamp-item.collected .stamp-circle {
    background: linear-gradient(135deg, #FF700F 0%, #FF8C3D 100%);
    box-shadow: 0 4px 12px rgba(255, 112, 15, 0.3);
}

.stamp-item.locked .stamp-circle {
    background: var(--color-border);
}

.stamp-inner {
    position: relative;
}

.stamp-emoji {
    font-size: 28px;
}

.stamp-check {
    position: absolute;
    bottom: -4px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: var(--color-success);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.stamp-locked span {
    font-size: 24px;
    color: var(--color-text-muted);
}

.stamp-name {
    font-size: 11px;
    color: var(--color-text-light);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 루트 카드 이미지 스타일 ===== */
.route-card-image {
    position: relative;
    height: 120px;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(135deg, #FF700F 0%, #FFB347 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.route-card-image::before {
    content: '💕';
    font-size: 40px;
    position: absolute;
    opacity: 0.3;
    z-index: 1;
}

.route-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.route-card:hover .route-card-image img {
    transform: scale(1.05);
}

.route-card-image .route-number {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 3;
}

.route-card-content {
    padding: 14px;
}

.route-card-content h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.route-card-content p {
    font-size: 12px;
    color: var(--color-text-light);
    margin-bottom: 10px;
}

.spot-letter {
    display: inline-flex;
    width: 22px;
    height: 22px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* ===== 루트 상세 헤더 이미지 ===== */
.route-detail-header {
    padding: 40px 24px;
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
}

.route-detail-header h2 {
    font-size: 22px;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.route-detail-header p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.route-detail-header .route-summary {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
}

.route-detail-body h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding: 0 24px;
}

.route-spots-list {
    padding: 0 24px 24px;
}

.route-spot-item {
    display: flex;
    gap: 14px;
    position: relative;
    padding-bottom: 20px;
}

.route-spot-item .spot-number {
    width: 28px;
    height: 28px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.route-spot-item .spot-content {
    flex: 1;
}

.route-spot-item .spot-content h5 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.route-spot-item .spot-address {
    font-size: 12px;
    color: var(--color-text-light);
    margin-bottom: 4px;
}

.route-spot-item .spot-note {
    font-size: 13px;
    color: var(--color-text-muted);
}

.route-spot-item .spot-connector {
    position: absolute;
    left: 13px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: var(--color-primary);
    opacity: 0.3;
}

/* ===== 코스 상세 이미지 ===== */
.course-detail-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 12px;
}

/* ===== 반응형 - 스탬프 도감 ===== */
@media (min-width: 480px) {
    .stamps-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 768px) {
    .stamps-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .stamp-circle {
        width: 70px;
        height: 70px;
    }

    .stamp-emoji {
        font-size: 32px;
    }
}


/* ===== Mapbox 마커 수정 - 지도 이동 시 동기화 문제 해결 ===== */
.mapboxgl-marker {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.course-marker {
    /* Mapbox가 transform을 관리하므로 여기서는 건드리지 않음 */
    pointer-events: auto;
}

.course-marker .marker-inner {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-origin: center center;
}

.course-marker:hover .marker-inner {
    transform: scale(1.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.course-marker img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* 루트 스팟 마커 */
.route-spot-marker {
    pointer-events: auto;
}

.route-spot-marker .route-marker-inner {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* 지도 컨테이너 최적화 */
#map {
    will-change: transform;
}

.mapboxgl-canvas-container {
    will-change: transform;
}

/* ===== 현재 위치 관련 스타일 ===== */

/* 위치 상태 클릭 가능 스타일 */
.location-status.success {
    cursor: pointer;
    transition: all 0.2s;
}

.location-status.success:hover {
    background: var(--color-primary);
    color: white;
}

.location-status.success:hover .status-text {
    color: white;
}

/* 코스 카드 거리 표시 - 컴팩트 */
.course-distance {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
}

/* 가까운 장소 알림 */
/* 가까운 장소 알림 */
.nearby-notification {
    position: fixed;
    top: calc(var(--header-height) + var(--safe-area-top) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: white;
    color: var(--color-text);
    padding: 16px 20px;
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 1001;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 90%;
    width: 340px;
}

.nearby-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.nearby-icon {
    font-size: 24px;
    flex-shrink: 0;
    animation: bounce 2s infinite;
}

.nearby-message {
    flex: 1;
}

.nearby-message strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
    color: var(--color-primary);
    font-weight: 800;
}

.nearby-message span {
    font-size: 13px;
    color: var(--color-text-light);
}

.nearby-close {
    background: var(--color-surface-alt);
    border: none;
    color: var(--color-text-light);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.nearby-close:hover {
    background: var(--color-border);
    color: var(--color-text);
}

/* 가까운 장소 정렬 버튼 */
.sort-nearby-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.sort-nearby-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* 현재 위치 마커 강조 */
.user-location-highlight {
    animation: userLocationPulse 2s ease-in-out infinite;
}

@keyframes userLocationPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    50% {
        box-shadow: 0 0 0 20px rgba(59, 130, 246, 0);
    }
}

/* 반응형 - 모바일 */
@media (max-width: 767px) {
    .nearby-notification {
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(-100px);
        max-width: none;
    }

    .nearby-notification.show {
        transform: translateX(0) translateY(0);
    }

    .nearby-message strong {
        font-size: 14px;
    }

    .nearby-message span {
        font-size: 12px;
    }
}


/* 가까운 순 필터 버튼 특별 스타일 */
.filter-btn.nearby-sort {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(255, 112, 15, 0.05);
}

.filter-btn.nearby-sort:hover,
.filter-btn.nearby-sort.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}


/* ===== 참고 이미지 라벨 ===== */
.reference-image-label {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 500;
    z-index: 4;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.reference-image-label.detail {
    position: absolute;
    top: 12px;
    right: 12px;
    bottom: auto;
    padding: 4px 10px;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.5);
}


/* ===== 미니맵 스타일 ===== */
.route-minimap-section {
    padding: 16px 24px;
    background: var(--color-surface-alt);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.route-minimap-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.route-mini-map {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.route-distance-info {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-map-marker {
    cursor: pointer;
    transition: transform 0.2s;
}

.mini-map-marker:hover {
    transform: scale(1.2);
}

/* ===== 카테고리 필터 스타일 ===== */
.route-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.route-cat-btn {
    padding: 8px 14px;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.route-cat-btn:hover {
    border-color: var(--cat-color, var(--color-primary));
    color: var(--cat-color, var(--color-primary));
}

.route-cat-btn.active {
    background: var(--cat-color, var(--color-primary));
    border-color: var(--cat-color, var(--color-primary));
    color: white;
}

/* ===== 카테고리 배지 스타일 ===== */
.route-category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.route-category-badge.detail {
    position: absolute;
    top: 12px;
    left: 12px;
    right: auto;
    font-size: 11px;
    padding: 5px 12px;
}

/* ===== 가격 정보 스타일 ===== */
.spot-price {
    font-size: 12px;
    color: var(--color-success);
    font-weight: 600;
    margin-top: 4px;
}

/* ===== 루트 카드 개선 ===== */
.route-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.route-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.route-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 8px;
}

.route-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== 반응형 - 미니맵 ===== */
@media (min-width: 768px) {
    .route-mini-map {
        height: 250px;
    }
}

@media (min-width: 1024px) {
    .route-mini-map {
        height: 300px;
    }
}

/* ===== 데이트 코스 패널 개선 ===== */
.date-route-panel {
    padding: 0;
}

.route-panel-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}

.route-panel-desc {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.route-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .route-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .route-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1400px) {
    .route-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== 스팟 프리뷰 개선 ===== */
.route-spots-preview {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 10px 0;
    padding: 10px;
    background: var(--color-surface-alt);
    border-radius: var(--radius-sm);
}

.spot-arrow {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 12px;
}

/* ===== 루트 상세 개선 ===== */
.route-detail-body {
    padding-top: 20px;
}

.route-detail-actions {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-alt);
}

.btn-start-route {
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-start-route:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}