@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard Variable", Pretendard, Roboto, "Noto Sans KR", "Segoe UI", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    overflow-y: auto;
    /* Allow vertical scroll for footer */
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Page Container: [광고] | [컨텐츠] | [광고] */
.page-container {
    display: flex;
    flex: 1;
    /* Allow it to grow but not force full height */
    min-height: calc(100vh - 60px);
    /* Minimum viewport height minus navbar */
    margin-top: 60px;
    overflow: hidden;
}

/* Ad Sidebars (고정) */
.ad-sidebar {
    width: 200px;
    min-width: 200px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ad-sidebar.left {
    border-right: 1px solid #e0e0e0;
}

.ad-sidebar.right {
    border-left: 1px solid #e0e0e0;
}

.ad-placeholder {
    width: 100%;
    min-height: 600px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Content Wrapper (탭 전환) */
.content-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Tab Content */
.tab-content {
    display: none;
    height: 100%;
    overflow-y: auto;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Routes Tab Container */
#routes-tab .container {
    display: flex;
    height: 100%;
    flex: 1;
}

/* FAQ Tab */
#faq-tab {
    background: var(--bg-primary);
    padding: 60px 20px;
    justify-content: center;
    align-items: center;
}

.faq-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.faq-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
    text-align: center;
}

.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px var(--shadow-md);
}

.faq-item[open] {
    border-color: #FF385C;
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    user-select: none;
    transition: background 0.2s;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.faq-arrow {
    margin-left: auto;
    font-size: 24px;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.faq-item[open] .faq-arrow {
    transform: rotate(90deg);
}

.faq-answer {
    padding: 0 24px 20px 56px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

.faq-answer p {
    margin: 0 0 8px 0;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer strong {
    color: var(--text-primary);
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Top Navigation Bar */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Responsive visibility helpers */
.desktop-only {
    display: inline-flex;
}

.mobile-only {
    display: none;
}

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

.navbar-logo {
    font-size: 24px;
    font-weight: 700;
    color: #FF385C;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
}

.navbar-logo:hover {
    opacity: 0.8;
}

.navbar-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-tag {
    font-size: 13px;
    font-weight: 600;
    color: #717171;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 20px;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
}

.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: #717171;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover {
    color: #222;
    background: #f5f5f5;
}

/* Nav Tab Buttons (Routes/FAQ) */
.nav-tab {
    font-size: 13px;
    font-weight: 600;
    color: #717171;
    background: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.nav-tab:hover {
    color: #222;
    background: #f5f5f5;
}

.nav-tab.active {
    background: #FF385C;
    color: white;
}

/* Hamburger Button */
.hamburger-button {
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 20px;
    color: var(--text-primary);
}

.hamburger-button:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-secondary);
}

.hamburger-button:active {
    transform: scale(0.95);
}

.hamburger-icon {
    display: block;
    line-height: 1;
}

/* Mobile Menu Dropdown */
.mobile-menu {
    position: fixed;
    top: 60px;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-top: none;
    border-radius: 0 0 0 12px;
    box-shadow: 0 4px 12px var(--shadow-md);
    display: none;
    flex-direction: column;
    min-width: 200px;
    z-index: 999;
    overflow: hidden;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu-item {
    padding: 14px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-primary);
    transition: background 0.2s;
}

.mobile-menu-item:last-child {
    border-bottom: none;
}

.mobile-menu-item:hover {
    background: var(--bg-secondary);
}

/* Left Sidebar - 40% of width */
.sidebar {
    flex: 0 0 40%;
    min-width: 0;
    background: white;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    overflow: hidden; /* prevent sidebar from scrolling; routes-grid will scroll internally */
    overflow-x: hidden; /* Prevent horizontal scroll */
    border-right: 1px solid #e0e0e0;
    z-index: 10;
    position: relative;
}

.sidebar-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.route-count {
    font-size: 14px;
    color: #717171;
    font-weight: normal;
    margin: 0;
}

.route-count strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Filter Section - Compact */
.filters {
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 12px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group.full-width {
    grid-column: 1 / -1;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #717171;
    margin-bottom: 6px;
}

.search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #FF385C;
}

/* Dual Range Slider */
.dual-range-slider-container {
    position: relative;
    padding: 0 4px;
    width: 100%;
    overflow: hidden;
}

.dual-range-track {
    position: relative;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 8px;
}

.dual-range-highlight {
    position: absolute;
    height: 100%;
    background: #FF385C;
    border-radius: 3px;
    left: 0%;
    right: 0%;
}

.dual-range-input {
    position: absolute;
    width: calc(100% - 8px);
    left: 4px;
    height: 6px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.dual-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FF385C;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 3;
}

.dual-range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FF385C;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 3;
}

.range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    font-size: 12px;
    color: #717171;
}

.range-values span {
    font-weight: 500;
}

.filter-button {
    width: 100%;
    padding: 10px;
    background: #FF385C;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-button:hover {
    background: #E03450;
}

.filter-button:active {
    transform: scale(0.98);
}

/* Running Type Pills (Airbnb style) */
.running-type-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #222;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.pill:hover {
    border-color: #222;
}

.pill.active {
    background: #222;
    color: white;
    border-color: #222;
}

.routes-section {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0; /* important for flex children to allow overflow */
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    -ms-overflow-style: auto;
    scrollbar-color: rgba(23, 23, 25, 0.20) transparent;
}

.routes-section::-webkit-scrollbar {
    display: block;
    height: 8px;
}

.routes-section::-webkit-scrollbar-track {
    border-radius: 0;
    background-color: #f0f1f4;
    border: none;
    box-shadow: none;
}

.routes-section::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: #d6d6d6;
}
/* Responsive Grid Layout - auto-fit based on card width */
.routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    padding: 24px;
}

/* Route Card - Compact without thumbnail */
.route-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    padding: 10px;
}

.route-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.route-card.active {
    border: 2px solid #FF385C;
    box-shadow: 0 4px 12px rgba(255, 56, 92, 0.2);
}

.route-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
    max-width: calc(100% - 80px); /* 리뷰 버튼 공간 확보 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
}

.route-card-meta>* {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.route-type-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    background: #e3f2fd;
    color: #1976d2;
    flex-shrink: 0;
    text-transform: uppercase;
}

.route-type-badge.road {
    background: #e3f2fd;
    color: #1976d2;
}

.route-type-badge.trail {
    background: #f3e5f5;
    color: #7b1fa2;
}

.route-divider {
    color: #ddd;
    font-weight: 300;
    flex-shrink: 0;
}

.route-courses {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.course-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.course-badge.k5 {
    background: #e8f5e9;
    color: #2e7d32;
}

.course-badge.k10 {
    background: #e0f7fa;
    color: #00838f;
}

.course-badge.half {
    background: #fff3e0;
    color: #e65100;
}

.course-badge.full {
    background: #fce4ec;
    color: #c2185b;
}

.course-badge.ultra {
    background: #ede7f6;
    color: #5e35b1;
}

.course-badge.custom {
    background: #f5f5f5;
    color: #616161;
}

.route-card-year {
    font-size: 11px;
    color: #999;
    font-weight: 500;
    flex-shrink: 0;
}

.stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #555;
    flex-shrink: 0;
}

.stat-icon {
    font-size: 13px;
}

/* Map Container - 60% of width */
.map-container {
    flex: 0 0 60%;
    min-width: 0;
    position: relative;
    padding: 24px;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

/* Hide Google Maps camera control button */
button[aria-label*="카메라"],
button[aria-label*="Camera"],
button[aria-label*="camera"],
button.gm-control-active[aria-label*="컨트롤"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Loading Spinner in Sidebar */
.sidebar-loading {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #717171;
}

.sidebar-loading.active {
    display: flex;
}

.sidebar-spinner {
    border: 3px solid #f0f0f0;
    border-top: 3px solid #FF385C;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

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

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

/* Route Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-size: 16px;
    color: #222;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    border: 3px solid #f0f0f0;
    border-top: 3px solid #FF385C;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-right: 16px;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #717171;
    text-align: center;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #222;
}

.empty-state-subtext {
    font-size: 14px;
}

/* Google Maps InfoWindow - Simplified */
.gm-style .gm-style-iw-c {
    background: var(--bg-primary) !important;
    box-shadow: 0 4px 20px var(--shadow-lg) !important;
    padding: 16px !important;
    border-radius: 12px !important;
}

.gm-style .gm-style-iw-d {
    overflow: visible !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Hide the arrow/pointer */
.gm-style .gm-style-iw-t::after {
    display: none !important;
}

/* Close button styling */
.gm-ui-hover-effect {
    background: transparent !important;
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
}

.gm-ui-hover-effect span {
    background-color: var(--text-secondary) !important;
}

.gm-ui-hover-effect:hover span {
    background-color: var(--text-primary) !important;
}

/* Mobile Banner Ad (Google 공식 가이드 준수) */
.mobile-banner-ad {
    display: none;
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 8px;
    justify-content: center;
    align-items: center;
    z-index: 999;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

/* Mobile Bottom Tabs */
.mobile-bottom-tabs {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 8px 16px;
    gap: 12px;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-tab {
    flex: 1;
    padding: 10px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #717171;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-tab.active {
    background: #FF385C;
    color: white;
    border-color: #FF385C;
}

.router-information-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

 .gm-style-iw-ch {
        padding-top: 0 !important;
}

.gm-style .gm-style-iw-d h3 {
        font-size: 16px !important;
    }
/* Responsive */
@media (max-width: 768px) {
    .ad-sidebar {
        display: none;
        /* Hide ads on mobile only */
    }
}

@media (max-width: 1400px) {
    .sidebar {
        width: 700px;
    }

    /* Grid will auto-adjust based on minmax */
}

@media (max-width: 768px) {

    /* Show mobile banner ad */
    /* .mobile-banner-ad {
        display: flex;
    } */

    /* Show mobile bottom tabs */
    .mobile-bottom-tabs {
        display: flex;
    }

    /* Responsive visibility */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: inline-flex !important;
    }

    /* Reduce navbar logo size on mobile */
    .navbar-logo {
        font-size: 16px;
    }

    .navbar-logo-img {
        width: 24px;
        height: 24px;
    }

    .navbar-right {
        gap: 6px;
        /* Reduce gap on mobile */
    }

    .nav-tab {
        font-size: 12px;
        padding: 6px 12px;
    }

    .theme-toggle {
        padding: 6px 10px;
        font-size: 14px;
        border-radius: 16px;
    }

    .hamburger-button {
        padding: 6px 10px;
        font-size: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .main-wrapper {
        margin-top: 60px;
        padding-bottom: 60px;
        /* Space for bottom tabs */
    }

    .container {
        flex-direction: column;
        height: calc(100vh - 60px - 60px);
        /* viewport - navbar - bottom tabs */
    }

    /* Mobile: Show/Hide based on active tab */
    .sidebar {
        width: 100%;
        height: calc(100% - 60px);
        /* Reserve space for bottom tabs */
        flex: none;
        display: block;
        padding-bottom: 80px;
        /* 하단 탭 버튼(60px) + 여유 공간(20px) */
    }

    .map-container {
        position: fixed; /* 화면에 고정 */
        top: 60px; /* navbar 아래 */
        left: 0;
        right: 0;
        bottom: 176px; /* banner ad (100px + 16px padding) + bottom tabs (60px) */
        flex: none;
        display: none;
        padding: 16px; /* 패딩 유지 (데스크탑 24px보다 작게) */
        overflow: hidden; /* 스크롤 방지 */
        box-sizing: border-box; /* padding 포함한 크기 계산 */
        
    }

    /* When map tab is active */
    body.map-active .sidebar {
        display: none;
    }

    body.map-active .map-container {
        display: block;
        height: auto;
        padding: 16px;
    }

    body.map-active .container {
        height: calc(100vh - 60px - 150px) !important;
        flex: none;
    }

    body.map-active .mobile-banner-ad {
        display: flex;
    }

    /* Ensure map fills container properly on mobile */
    #map {
        height: 100%;
        width: 100%;
        border-radius: 12px; /* border-radius 유지 (데스크탑 16px보다 작게) */
    }

    /* Mobile: List-style cards (납작하게) */
    .routes-grid {
        grid-template-columns: 1fr;
        /* Force single column on mobile */
        gap: 8px;
        padding: 12px;
    }

    .route-card {
        padding: 10px 12px;
    }

    /* On mobile, allow cards to size based on content (undo fixed height) */
    .routes-grid .route-card {
        height: auto;
        max-height: none;
        display: block;
    }

    .route-card-title {
        font-size: 14px;
        margin-bottom: 6px;
    }

    /* Mobile: All info in one line - type, year, distance, elevation */
    .route-card-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        /* No line breaks */
        margin-bottom: 0;
    }

    .route-type-badge {
        flex-shrink: 0;
        /* Don't shrink badge */
        font-size: 10px;
        padding: 2px 8px;
    }

    .route-divider {
        flex-shrink: 0;
    }

    .route-courses {
        gap: 3px;
    }

    .course-badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    .route-card-year {
        flex-shrink: 0;
        /* Don't shrink year */
    }

    .stat {
        font-size: 11px;
        white-space: nowrap;
        flex-shrink: 0;
        /* Don't shrink stats */
    }

    .stat-icon {
        display: none;
        /* Hide emoji icons on mobile */
    }

    /* Compact filters on mobile */
    .filters {
        padding: 12px 16px;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

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

    .search-input {
        padding: 8px 10px;
        font-size: 13px;
    }

    .pill {
        padding: 6px 12px;
        font-size: 12px;
    }

    .sidebar-header {
        padding: 12px 16px;
    }

    .route-count {
        font-size: 13px;
    }

    /* Google Maps InfoWindow - Simplified */
    .gm-style .gm-style-iw-c {
        padding: 12px !important;
    }
   
    .gm-ui-hover-effect {
        top: 10px !important;
        right: 10px !important;
        width: 22px !important;
        height: 22px !important;
    }
    .gm-ui-hover-effect span {
        margin: 0 !important;
    }
    
    .router-information-row {
        font-size: 12px;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
}

.theme-toggle:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.theme-icon {
    display: inline;
}

/* Dark Mode Variables and Styles */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --text-primary: #222222;
    --text-secondary: #717171;
    --text-tertiary: #999999;
    --border-primary: #e0e0e0;
    --border-secondary: #dddddd;
    --accent-primary: #FF385C;
    --accent-hover: #E03450;
    --shadow-sm: rgba(0, 0, 0, 0.05);
    --shadow-md: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --overlay-bg: rgba(255, 255, 255, 0.9);
    --infowindow-bg: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2a2a2a;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #707070;
    --border-primary: #3a3a3a;
    --border-secondary: #444444;
    --accent-primary: #FF5A78;
    --accent-hover: #FF7890;
    --shadow-sm: rgba(0, 0, 0, 0.3);
    --shadow-md: rgba(0, 0, 0, 0.5);
    --shadow-lg: rgba(0, 0, 0, 0.7);
    --overlay-bg: rgba(26, 26, 26, 0.9);
    --infowindow-bg: rgba(36, 36, 36, 0.95);
}

/* Apply theme variables to all elements */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.main-wrapper,
.sidebar,
.top-navbar,
.ad-sidebar {
    background: var(--bg-primary);
    border-color: var(--border-primary);
}

.sidebar-header {
    background: var(--bg-primary);
    border-color: var(--border-primary);
}

.filters {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
    position: sticky;
    top: 50px;
}

.route-card {
    background: var(--bg-primary);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

.route-card-title {
    color: var(--text-primary);
}

.route-card-year,
.route-count,
.filter-label {
    color: var(--text-secondary);
}

.stat {
    color: var(--text-secondary);
}

.route-divider {
    color: var(--border-primary);
}

/* Dark mode: Course badges */
[data-theme="dark"] .course-badge.k5 {
    background: #1b5e20;
    color: #a5d6a7;
}

[data-theme="dark"] .course-badge.k10 {
    background: #006064;
    color: #80deea;
}

[data-theme="dark"] .course-badge.half {
    background: #e65100;
    color: #ffccbc;
}

[data-theme="dark"] .course-badge.full {
    background: #880e4f;
    color: #f8bbd0;
}

[data-theme="dark"] .course-badge.ultra {
    background: #4527a0;
    color: #d1c4e9;
}

[data-theme="dark"] .course-badge.custom {
    background: #424242;
    color: #e0e0e0;
}

.search-input {
    background: var(--bg-primary);
    border-color: var(--border-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .search-input::placeholder {
    color: var(--text-tertiary);
}

.pill {
    background: var(--bg-primary);
    border-color: var(--border-secondary);
    color: var(--text-primary);
}

.pill:hover {
    border-color: var(--text-primary);
}

.pill.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.dual-range-track {
    background: var(--border-primary);
}

.nav-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.nav-link {
    color: var(--text-secondary);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.theme-toggle {
    border-color: var(--border-primary);
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-secondary);
}

.nav-tab {
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-tab.active {
    background: var(--accent-primary);
    color: white;
}

.mobile-banner-ad {
    background: var(--bg-primary);
    border-color: var(--border-primary);
}

.mobile-bottom-tabs {
    background: var(--bg-primary);
    border-color: var(--border-primary);
}

.mobile-tab {
    background: var(--bg-primary);
    border-color: var(--border-primary);
    color: var(--text-secondary);
}

.loading-overlay {
    background: var(--overlay-bg);
    color: var(--text-primary);
}

.sidebar-loading {
    color: var(--text-secondary);
}

.ad-placeholder {
    background: var(--bg-secondary);
    border-color: var(--border-secondary);
    color: var(--text-tertiary);
}

.empty-state {
    color: var(--text-secondary);
}

.empty-state-text {
    color: var(--text-primary);
}

.top-navbar {
    box-shadow: 0 2px 4px var(--shadow-sm);
}

.route-card:hover {
    box-shadow: 0 4px 12px var(--shadow-md);
}

.mobile-bottom-tabs {
    box-shadow: 0 -2px 8px var(--shadow-md);
}

/* Dark mode: InfoWindow styling - handled by inline styles in map.js */

/* Dark mode: Adjust spinners */
[data-theme="dark"] .sidebar-spinner,
[data-theme="dark"] .spinner {
    border-color: var(--border-primary);
    border-top-color: var(--accent-primary);
}

/* Elevation Chart Modal */
.elevation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.elevation-modal.active {
    display: flex;
}

.elevation-modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-lg);
    max-width: calc(100vw - 360px);
    /* 전체 너비 - 좌우 배너(160px*2) - 여백(40px) */
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: slideUp 0.3s ease;
}

/* 좌우 배너가 없는 화면에서는 약간 더 넓게 */
@media (max-width: 1600px) {
    .elevation-modal-content {
        max-width: calc(100vw - 80px);
        /* 좌우 여백만 */
    }
}

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

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

@keyframes toastFadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    10% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    90% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(34, 34, 34, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10001;
    animation: toastFadeInOut 2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.elevation-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.elevation-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.elevation-modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.elevation-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.elevation-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.elevation-chart-container {
    width: 100%;
    min-width: 1200px;
    /* 기본 최소 너비 - 차트 종횡비 유지 */
    height: 500px;
    position: relative;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
}

/* 데스크탑 뷰: 뷰포트가 좁아질 때 가로 스크롤 적용 */
@media (max-width: 1600px) {
    .elevation-modal-body {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .elevation-chart-container {
        min-width: 1400px;
    }
}

@media (max-width: 1400px) {
    .elevation-chart-container {
        min-width: 1200px;
    }
}

@media (max-width: 1200px) {
    .elevation-chart-container {
        min-width: 1000px;
    }
}

#elevationChart {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.elevation-tooltip {
    position: absolute;
    background: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px var(--shadow-lg);
    white-space: nowrap;
    transform: translate(-50%, -120%);
}

.elevation-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--accent-primary);
}

.elevation-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px;
    color: var(--text-secondary);
}

.elevation-modal-loading .spinner {
    margin-right: 12px;
}

/* Mobile responsive for modal */
@media (max-width: 768px) {
    .elevation-modal {
        padding: 10px;
    }

    .elevation-modal-content {
        max-height: 95vh;
    }

    .elevation-modal-header {
        padding: 16px 20px;
    }

    .elevation-modal-title {
        font-size: 18px;
    }

    .elevation-modal-body {
        padding: 20px;
        overflow-x: auto;
        /* 모바일에서도 가로 스크롤 */
    }

    .elevation-chart-container {
        min-width: 800px;
        /* 모바일에서도 최소 너비 유지 (스크롤) */
        height: 300px;
        padding: 12px;
    }
}

/* Year Selection Modal */
.year-selection-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.year-selection-modal.active {
    display: flex;
}

.year-selection-content {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: slideUp 0.3s ease;
}

.year-selection-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.year-selection-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.year-selection-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.year-selection-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.year-selection-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.year-selection-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.year-selection-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.year-selection-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.year-selection-item:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px var(--shadow-md);
    transform: translateY(-2px);
}

.year-selection-item:active {
    transform: translateY(0);
}

.year-selection-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.year-selection-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.year-selection-item-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mobile responsive for year selection modal */
@media (max-width: 768px) {
    .year-selection-modal {
        padding: 10px;
    }

    .year-selection-content {
        max-height: 90vh;
    }

    .year-selection-header {
        padding: 16px 20px;
    }

    .year-selection-title {
        font-size: 18px;
    }

    .year-selection-body {
        padding: 20px;
    }

    .year-selection-item {
        padding: 14px 16px;
    }

    .year-selection-item-title {
        font-size: 15px;
    }

    .year-selection-item-meta {
        font-size: 12px;
        gap: 10px;
    }
}

/* ==================== Footer ==================== */
.site-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-primary);
    padding: 48px 24px 24px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.footer-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.footer-brand-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-tagline {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: -8px;
}

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

.footer-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all 0.2s;
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-email {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 32px;
    margin-top: 40px;
    border-top: 1px solid var(--border-primary);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

/* Footer Mobile */
@media (max-width: 768px) {
    .site-footer {
        display: none;
        /* 모바일에서 푸터 숨김 - 컨텐츠 방해 방지 */
    }
}

/* ==================== Contact Page ==================== */
.static-page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 20px 60px;
    background: var(--bg-primary);
    min-height: calc(100vh - 60px);
}

.static-page-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 40px;
}

.contact-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.contact-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
    transition: all 0.3s;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-primary);
}

.contact-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.contact-card h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.contact-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.contact-link {
    display: inline-block;
    font-size: 15px;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.contact-link:hover {
    background: var(--accent-primary);
    color: white;
}

.contact-note {
    font-size: 13px !important;
    color: var(--text-tertiary) !important;
    margin-top: 12px !important;
}

.social-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.social-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.contact-info-box {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 32px;
}

.contact-info-box h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.contact-info-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-info-box li {
    font-size: 14px;
    color: var(--text-secondary);
    padding-left: 24px;
    position: relative;
}

.contact-info-box li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--accent-primary);
    font-weight: bold;
}

.contact-faq {
    margin-top: 40px;
}

.contact-faq h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

/* Contact Page Mobile */
@media (max-width: 768px) {
    .static-page-container {
        padding: 80px 16px 40px;
    }

    .static-page-content {
        padding: 32px 20px;
    }

    .page-title {
        font-size: 28px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .contact-section {
        grid-template-columns: 1fr;
    }

    .social-links {
        flex-direction: column;
    }

    .social-link {
        justify-content: center;
    }
}

/* ==================== Review Styles ==================== */

/* Route Card with Review Button */
.route-card {
    position: relative;
}

.route-card-content {
    flex: 1;
}

.route-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
}

.review-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.review-button:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.review-icon {
    font-size: 12px;
}

.review-text {
    line-height: 1;
}

/* Review Modal */
.review-modal-overlay {
    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: 10000;
    padding: 20px;
}

.review-modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.review-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--border-primary);
}

.review-modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.review-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.review-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Review Stats */
.review-stats {
    padding: 24px;
    border-bottom: 1px solid var(--border-primary);
}

.review-stats-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.review-stats-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
}

.review-stats-stars {
    font-size: 24px;
}

.review-stats-count {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Review List */
.review-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.review-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-primary);
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.review-rating {
    font-size: 14px;
}

.review-date {
    font-size: 12px;
    color: var(--text-tertiary);
}

.review-comment {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.empty-reviews {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
    font-size: 14px;
}

/* Review Modal Footer */
.review-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-primary);
}

.review-write-button {
    width: 100%;
    padding: 12px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.review-write-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .review-modal-overlay {
        padding: 0;
    }

    .review-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .review-stats-number {
        font-size: 36px;
    }

    .review-stats-stars {
        font-size: 20px;
    }
}

/* Review Write Modal */
.review-write-modal {
    max-width: 500px;
}

.review-write-body {
    padding: 24px;
}

.review-write-section {
    margin-bottom: 24px;
}

.review-write-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

.star-button {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.3;
    filter: grayscale(100%);
}

.star-button:hover {
    transform: scale(1.2);
}

.star-button.active {
    opacity: 1;
    filter: grayscale(0%);
}

.rating-label {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Review Textarea */
.review-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

.review-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 56, 92, 0.1);
}

.character-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 6px;
}

/* Review Modal Footer Buttons */
.review-modal-footer {
    display: flex;
    gap: 8px;
}

.review-cancel-button {
    flex: 1;
    padding: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.review-cancel-button:hover {
    background: var(--bg-tertiary);
}

.review-submit-button {
    flex: 2;
    padding: 12px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.review-submit-button:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.review-submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .star-button {
        font-size: 28px;
    }

    .review-write-body {
        padding: 20px;
    }
}

/* ==================== Auth Button ==================== */

/* Desktop Auth Button */
.auth-button {
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.auth-button:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.auth-button.logged-in {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Mobile Auth Button */
.auth-button-mobile {
    display: block;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
}

.auth-button-mobile.logged-in {
    color: var(--accent-primary);
}

/* Logout Button */
.logout-button {
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.logout-button:hover {
    background: var(--bg-secondary);
    border-color: #dc2626;
    color: #dc2626;
}

/* Mobile Logout Button */
.logout-button-mobile {
    display: block;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    color: var(--text-secondary);
}

.logout-button-mobile:hover {
    color: #dc2626;
}

/* Auth Button - 로그인 상태일 때는 클릭 불가능하게 */
.auth-button.logged-in {
    color: var(--accent-primary);
    cursor: default;
    border-color: var(--accent-primary);
}

.auth-button.logged-in:hover {
    background: transparent;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.auth-button-mobile.logged-in {
    color: var(--accent-primary);
    cursor: default;
}
