:root {
    --primary-color: #ff8c00;
    --secondary-color: #ffd700;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --bg-white: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.2);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    height: 100vh;
    line-height: 1.6;
    overflow: hidden;
}

/* 네비게이션 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    min-height: 80px;
}

.navbar-brand {
    font-weight: 700;
    color: white !important;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
    min-width: 0;
    gap: 2px;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.brand-pick {
    color: #ff4444;
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.3px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    background: rgba(255, 255, 255, 0.9);
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
    margin-top: 2px;
}

/* 지도 컨테이너 */
.map-container {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    overflow: hidden;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

/* 히어로 오버레이 */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    text-align: center;
    color: white;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    pointer-events: none;
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    opacity: 0.95;
    margin-bottom: 0;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

/* Mapbox 저작권 표시 숨기기 */
.mapboxgl-ctrl-attrib {
    display: none !important;
}

.mapboxgl-ctrl-logo {
    display: none !important;
}

/* 컨트롤 패널 */
.control-panel {
    position: absolute;
    top: 90px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 400;
}

/* 맵박스 네비게이션 컨트롤 위치 조정 */
.mapboxgl-ctrl-top-right {
    top: 240px !important;
    right: 20px !important;
}

.mapboxgl-ctrl-group {
    background: var(--bg-white) !important;
    border-radius: 50px !important;
    box-shadow: var(--shadow-md) !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
}

.mapboxgl-ctrl-group button {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50px !important;
    border: none !important;
    background: transparent !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
}

.mapboxgl-ctrl-group button:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
}

.mapboxgl-ctrl-group button:hover .mapboxgl-ctrl-icon {
    filter: brightness(0) invert(1) !important;
}

.mapboxgl-ctrl-zoom-in,
.mapboxgl-ctrl-zoom-out,
.mapboxgl-ctrl-compass {
    font-size: 18px !important;
    font-weight: bold !important;
}

.control-btn {
    background: var(--bg-white);
    border: none;
    border-radius: 50px;
    padding: 0.75rem;
    box-shadow: var(--shadow-md);
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

/* 메뉴 토글 버튼 */
.menu-toggle {
    position: absolute;
    top: 90px;
    left: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 450;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.menu-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* 메뉴 드롭다운 */
.menu-dropdown {
    position: absolute;
    top: 150px;
    left: 20px;
    width: 300px;
    background: var(--bg-white);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 400;
    overflow: hidden;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: 70vh;
}

.menu-dropdown.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.menu-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f8f9fa;
    text-align: center;
}

.menu-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.cafe-grid {
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
    max-height: 40vh;
    overflow-y: auto;
}

.cafe-grid::-webkit-scrollbar {
    display: none;
}

.cafe-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cafe-card-mini {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.cafe-card-mini:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cafe-name-mini {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cafe-address-mini {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    word-wrap: break-word;
}

.cafe-badges-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.badge-mini {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.6rem;
    border-radius: 8px;
    padding: 0.15rem 0.4rem;
    font-weight: 500;
}

/* 필터 드롭다운 */
.filter-dropdown {
    position: absolute;
    top: 150px;
    right: 20px;
    width: 280px;
    background: var(--bg-white);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 400;
    overflow: hidden;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: 60vh;
}

.filter-dropdown.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.filter-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f8f9fa;
    text-align: center;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.filter-content {
    padding: 1rem;
    max-height: 40vh;
    overflow-y: auto;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: block;
}

.filter-options {
    display: grid;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.filter-option:hover {
    background: #f8f9fa;
}

.filter-option input[type="checkbox"] {
    margin: 0;
}

.btn-clear-filters {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 15px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-clear-filters:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 플로팅 카페 정보 패널 */
.floating-panel {
    position: absolute;
    bottom: -100%;
    left: 20px;
    right: 20px;
    background: var(--bg-white);
    backdrop-filter: blur(15px);
    border-radius: 20px 20px 0 0;
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    transition: bottom 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 500;
    max-height: 70vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
}

.floating-panel.show {
    bottom: 0;
    opacity: 1;
    visibility: visible;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.panel-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.close-panel {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-panel:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.info-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.info-item h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.info-item h6 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.info-item p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.hours-grid {
    display: grid;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.hours-day {
    font-weight: 500;
    color: var(--text-primary);
}

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

.specialty-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.specialty-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.75rem;
    border-radius: 15px;
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.description-box {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #e9ecef;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* 가까운 카페 추천 스타일 */
.nearest-cafe-item {
    cursor: default !important;
}

.btn-detail-view {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-detail-view:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* 간단한 마커 스타일 */
.simple-marker {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    font-size: 14px;
    cursor: pointer;
    color: white;
    font-weight: bold;
}

.simple-marker:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

/* 커뮤니티 토글 버튼 */
.community-toggle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    padding: 0.75rem;
    box-shadow: var(--shadow-lg);
    z-index: 450;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.community-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* 커뮤니티 드롭다운 */
.community-dropdown {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 280px;
    background: var(--bg-white);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 400;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: 60vh;
}

.community-dropdown.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.community-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f8f9fa;
    text-align: center;
}

.community-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.community-content {
    padding: 1rem;
    max-height: 40vh;
    overflow-y: auto;
}

.community-section {
    margin-bottom: 1.5rem;
}

.community-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: block;
}

.kakao-buttons {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.kakao-btn-mini {
    background: #FEE500;
    color: #000;
    border: none;
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: var(--shadow-sm);
    font-size: 0.8rem;
}

.kakao-btn-mini:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #000;
}

.kakao-btn-mini i {
    font-size: 1rem;
}

.service-buttons {
    display: grid;
    gap: 0.5rem;
}

.service-btn-mini {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: var(--shadow-sm);
    font-size: 0.8rem;
}

.service-btn-mini.tram {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.service-btn-mini.parking {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
}

.service-btn-mini:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.service-icon {
    font-size: 1rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 로딩 애니메이션 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.spinner {
    width: 3rem;
    height: 3rem;
    margin-right: 1rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .floating-panel {
        left: 10px;
        right: 10px;
        padding: 1.25rem;
        max-height: 75vh;
    }
    
    .floating-panel.show {
        bottom: 0;
    }
    
    .community-toggle {
        bottom: 20px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .community-dropdown {
        bottom: 75px;
        right: 10px;
        width: calc(100vw - 20px);
        max-width: 320px;
    }
    
    .control-panel {
        top: 75px;
        right: 10px;
        gap: 0.5rem;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    /* 맵박스 네비게이션 컨트롤 모바일 위치 */
    .mapboxgl-ctrl-top-right {
        top: 185px !important;
        right: 10px !important;
    }
    
    .mapboxgl-ctrl-group {
        background: var(--bg-white) !important;
        border-radius: 50px !important;
        box-shadow: var(--shadow-md) !important;
        border: none !important;
    }
    
    .mapboxgl-ctrl-group button {
        width: 45px !important;
        height: 45px !important;
        border-radius: 50px !important;
        border: none !important;
        background: transparent !important;
        transition: all 0.3s ease !important;
        margin: 0 !important;
    }
    
    .mapboxgl-ctrl-group button:hover {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    }
    
    .mapboxgl-ctrl-group button:hover .mapboxgl-ctrl-icon {
        filter: brightness(0) invert(1) !important;
    }
    
    .menu-toggle {
        top: 75px;
        left: 10px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .menu-dropdown {
        top: 130px;
        left: 10px;
        width: calc(100vw - 20px);
        max-width: 320px;
    }
    
    .filter-dropdown {
        top: 130px;
        right: 10px;
        width: calc(100vw - 20px);
        max-width: 320px;
    }
    
    .panel-title {
        font-size: 1.1rem;
    }
    
    /* 네비게이션 바 높이 조정 */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .map-container {
        top: 70px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.4rem 0;
        min-height: 65px;
    }
    
    .navbar-brand {
        font-size: 1rem;
        gap: 0.5rem;
        padding: 0.2rem 0;
    }
    
    .brand-logo {
        width: 30px;
        height: 30px;
    }
    
    .brand-title {
        font-size: 0.95rem;
    }
    
    .brand-text {
        gap: 2px;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
        margin: 0;
    }
    
    .brand-pick {
        font-size: 0.6rem;
        padding: 2px 5px;
        margin: 0;
        margin-top: 2px;
    }
    
    .map-container {
        top: 65px;
    }
    
    /* 버튼들을 네비게이션 바로 아래로 */
    .menu-toggle {
        top: 75px !important;
        left: 10px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .control-panel {
        top: 75px !important;
        right: 10px;
        gap: 0.4rem;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    /* 맵박스 네비게이션 컨트롤 */
    .mapboxgl-ctrl-top-right {
        top: 160px !important;
        right: 10px !important;
    }
    
    .mapboxgl-ctrl-group button {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* 드롭다운 위치 조정 */
    .menu-dropdown {
        top: 120px;
        left: 10px;
        width: calc(100vw - 20px);
        max-width: 300px;
    }
    
    .filter-dropdown {
        top: 120px;
        right: 10px;
        width: calc(100vw - 20px);
        max-width: 300px;
    }
    
    .floating-panel {
        padding: 1rem;
    }
    
    .info-item {
        padding: 0.75rem;
    }
    
    .menu-toggle,
    .community-toggle,
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .mapboxgl-ctrl-group button {
        width: 40px !important;
        height: 40px !important;
    }
    
    .menu-dropdown,
    .filter-dropdown,
    .community-dropdown {
        max-width: calc(100vw - 20px);
    }
}