* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header h1 {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.map-container {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* 클러스터 마커 스타일 */
.cluster-marker {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    border: 3px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cluster-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* 일반 마커 스타일 */
.property-marker {
    background: white;
    color: #667eea;
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.property-marker:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 매물 상세 패널 */
.detail-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: white;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.detail-panel.active {
    transform: translateY(0);
}

.detail-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    color: white;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.modal-header .property-type {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.modal-body {
    padding: 20px 30px;
    flex: 1;
    overflow-y: auto;
}

.property-info {
    display: grid;
    gap: 20px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.info-row:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.info-label {
    font-weight: 600;
    color: #667eea;
    min-width: 80px;
    font-size: 14px;
}

.info-value {
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

.price-highlight {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* 이미지 갤러리 스타일 */
.image-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 20px 0;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

.image-gallery::-webkit-scrollbar {
    height: 6px;
}

.image-gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.image-gallery::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.gallery-item {
    flex: 0 0 240px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 로딩 스피너 */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
}

/* Filter Toggle Button */
.filter-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    transition: all 0.3s ease;
    z-index: 100;
}

.filter-toggle:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.filter-badge {
    background: #ff6b6b;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* Filter Panel */
.filter-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
    display: flex;
    flex-direction: column;
}

.filter-panel.active {
    transform: translateX(0);
}

.filter-header {
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.reset-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Pretendard', sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.filter-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.range-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: #667eea;
    font-weight: 600;
}

.range-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.range-inputs input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #667eea 0%, #764ba2 100%);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.range-inputs input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
}

/* Auth & Profile Styles */
.auth-container {
    display: flex;
    align-items: center;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #FEE500;
    color: #000000;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Pretendard', sans-serif;
}

.login-btn:hover {
    background-color: #FDD835;
}

.kakao-icon {
    width: 18px;
    height: 18px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
}

.user-nickname {
    font-weight: 600;
    font-size: 14px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Pretendard', sans-serif;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

#adminNavItem {
    color: #ffd700 !important;
    /* Gold color for better visibility */
    font-weight: 700 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    margin: 0 1rem;
    text-decoration: none;
}

#adminNavItem:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

/* Roadview Styles */
.roadview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 150;
    display: none;
    border-radius: 20px;
    overflow: hidden;
}

.roadview-container.active {
    display: block;
}

#roadview {
    width: 100%;
    height: 100%;
}

.close-roadview {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 160;
}

/* Favorite Styles */
.property-marker.favorite {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: #fff0f0;
}

.favorite-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    color: #ccc;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.favorite-btn.active {
    color: #ff6b6b;
    border-color: #ff6b6b;
    background: #fff0f0;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    animation: toastIn 0.3s forwards;
}

@keyframes toastIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        gap: 10px;
    }

    .header {
        padding: 15px 20px;
    }

    .header h1 {
        font-size: 20px;
    }

    .detail-panel {
        height: 60%;
    }

    .filter-panel {
        width: 100%;
    }
}