/* 플레이스 조회 페이지 스타일 */

/* 모바일 뷰포트 오버플로우 방지 */
* {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    * {
        max-width: 100vw !important;
    }
    
    body {
        overflow-x: hidden;
    }
}

/* PC 버전에서 테이블 가로 스크롤 문제 해결 */
@media (min-width: 769px) {
    .searchplace-container {
        max-width: calc(100% - 10px); /* 약간의 여백으로 확대 방지 */
        overflow-x: hidden;
    }
    
    .table-wrapper {
        overflow-x: auto;
        max-width: 100%;
        width: 100%;
    }
    
    .places-table {
        min-width: 800px; /* 테이블 최소 너비를 고정값으로 설정 */
        width: auto; /* width를 auto로 변경 */
    }
    
    /* 전체 페이지 확대 방지를 위한 추가 설정 */
    body {
        overflow-x: hidden;
    }
    
    .main-content {
        overflow-x: hidden;
    }
}

.searchplace-container {
    padding: 5px;
    max-width: 1800px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* 모바일에서 기본 패딩 줄이기 */
@media (max-width: 1024px) {
    .searchplace-container {
        padding: 8px;
    }
}

/* 모바일 및 태블릿에서 플렉스 박스 강제 수직 배치 */
@media (max-width: 768px) {
    .search-form-row {
        flex-direction: row !important;
        gap: 12px !important;
        align-items: end !important;
    }
    
    .comparison-controls-row {
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .search-input-group {
        flex: 1 !important;
        min-width: 0 !important;
        max-width: none !important;
    }
    
    .count-select-group {
        flex: 0 0 auto !important;
        width: 100px !important;
        min-width: 100px !important;
        max-width: 100px !important;
    }
    
    .search-button-group {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    
    .comparison-date-group,
    .legend-group {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

/* 검색 컨트롤 영역 */
.search-controls {
    background: linear-gradient(135deg, var(--white) 0%, var(--blue-50) 100%);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--blue-100);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 태블릿에서 패딩 줄이기 */
@media (max-width: 1024px) {
    .search-controls {
        padding: 24px;
        margin-bottom: 24px;
        border-radius: 16px;
    }
}

.search-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.search-form-section {
    position: relative;
    z-index: 1;
}

.search-form-row {
    display: flex;
    gap: 24px;
    align-items: end;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.comparison-controls-row {
    display: flex;
    gap: 40px;
    align-items: end;
    flex-wrap: wrap;
}

/* 입력 그룹 스타일 */
.search-input-group,
.count-select-group,
.search-button-group,
.comparison-date-group,
.legend-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-input-group {
    flex: 1;
    min-width: 0;
}

.count-select-group {
    min-width: 0;
}

.comparison-date-group {
    flex: 1;
    min-width: 0;
}

.legend-group {
    min-width: 0;
}

/* 라벨 스타일 */
.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.input-label i {
    font-size: 16px;
    color: var(--primary-blue);
}

/* 검색 입력 필드 */
.search-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        var(--shadow-md);
}

.search-input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

/* 개수 선택 드롭다운 */
.count-select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 48px;
}

.count-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        var(--shadow-md);
}

.count-select:hover {
    border-color: var(--primary-blue-light);
}

/* 검색 버튼 */
.btn-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        var(--shadow-md),
        0 4px 20px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 56px;
}

.btn-search::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-search:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    box-shadow: 
        var(--shadow-lg),
        0 8px 30px rgba(59, 130, 246, 0.4);
}

.btn-search:hover::before {
    left: 100%;
}

.btn-search:active {
    transform: translateY(-1px);
}

.btn-search i {
    font-size: 18px;
}

/* 날짜 옵션 버튼들 */
.date-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.date-option {
    padding: 12px 20px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.date-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.4s ease;
}

.date-option:hover {
    border-color: var(--primary-blue-light);
    background: var(--blue-50);
}

.date-option:hover::before {
    left: 100%;
}

.date-option.active {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--white);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.date-option.custom {
    padding: 12px 16px;
}

.date-option.custom:hover {
    background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    border-color: var(--primary-blue-light);
}

/* 범례 스타일 */
.legend-items {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    font-size: 12px;
    font-weight: 500;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-item.rank-up .legend-color {
    background: var(--error-color);
}

.legend-item.my-place .legend-color {
    background: var(--primary-blue);
}

.legend-item span {
    color: var(--gray-600);
    white-space: nowrap;
}

/* 키워드 정보 섹션 */
.keyword-info-section {
    background: linear-gradient(135deg, var(--white) 0%, var(--blue-50) 100%);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--blue-100);
    position: relative;
    overflow: hidden;
}

/* 태블릿에서 키워드 정보 섹션 패딩 줄이기 */
@media (max-width: 1024px) {
    .keyword-info-section {
        padding: 20px;
        margin-bottom: 16px;
        border-radius: 16px;
    }
}

.keyword-info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.keyword-info-header {
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
}

.keyword-info-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.keyword-info-header h3 i {
    font-size: 22px;
    color: var(--primary-blue);
}

.keyword-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    position: relative;
    z-index: 1;
}

.info-item {
    background: var(--white);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-blue-light);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, var(--white) 0%, var(--blue-50) 100%);
}

.info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.info-label i {
    font-size: 16px;
    color: var(--primary-blue);
}

.info-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
}

.keyword-value {
    color: var(--primary-blue);
    font-size: 20px;
}

/* 플레이스 테이블 래퍼 */
.table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 32px;
    width: 100%;
    max-width: 100%;
}

/* 태블릿에서 테이블 래퍼 여백 줄이기 */
@media (max-width: 1024px) {
    .table-wrapper {
        margin-bottom: 20px;
        border-radius: 12px;
    }
}

/* 플레이스 테이블 */
.places-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 14px;
}

.places-table thead {
    background: linear-gradient(135deg, 
        #1e40af 0%, 
        #2563eb 25%, 
        #3b82f6 50%, 
        #2563eb 75%, 
        #1e40af 100%);
    position: relative;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.2);
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

.places-table thead th {
    padding: 14px 16px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 50%, 
        rgba(0, 0, 0, 0.05) 100%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.places-table thead th:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.places-table thead th::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
}

.places-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--gray-100);
}

.places-table tbody tr:hover {
    background: var(--blue-50);
}

.places-table tbody tr:last-child {
    border-bottom: none;
}

.places-table tbody td {
    padding: 6px 12px;
    text-align: center;
    vertical-align: middle;
    border-right: 1px solid var(--gray-100);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.places-table tbody td:last-child {
    border-right: none;
}

/* 순위 셀 */
.rank-cell {
    width: 80px;
}

.rank-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rank-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.rank-number::after {
    content: '위';
    font-size: 12px;
    font-weight: 400;
    color: var(--gray-600);
    margin-left: 2px;
}

/* 상호명 셀 */
.business-name-cell {
    text-align: left !important;
    min-width: 120px;
}

.business-name-container {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}

.business-name {
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* 상호 링크 스타일 */
.place-name-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-name-link:hover {
    color: var(--blue-700);
    background-color: var(--blue-50);
    text-decoration: underline;
}

.place-name-link:active {
    color: var(--blue-800);
    background-color: var(--blue-100);
}

/* 리뷰 정보 스타일 */
.review-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.review-count {
    font-weight: 600;
    color: var(--gray-700);
}

.review-score {
    font-size: 12px;
    color: var(--orange-600);
    font-weight: 500;
}

.new-badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--error-color);
    color: var(--white);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 2px;
    vertical-align: middle;
}

/* 점수 셀 */
.score-cell {
    width: 90px;
}

.score-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.score-number {
    font-weight: 600;
    color: var(--gray-800);
}

/* 리뷰 셀 */
.review-cell {
    width: 100px;
}

.review-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.review-number {
    font-weight: 600;
    color: var(--gray-800);
}

/* 카테고리 셀 */
.category-cell {
    width: 80px;
}

.category-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--blue-100);
    color: var(--primary-blue);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* 업종 셀 */
.business-type-cell {
    width: 80px;
    font-weight: 500;
    color: var(--gray-600);
    text-align: left !important;
}

/* 브랜드 업종 스타일 */
.business-type-cell.brand-business-type {
    color: var(--primary-blue);
    font-weight: 600;
}

/* 키워드 셀 */
.keywords-cell {
    text-align: left !important;
    min-width: 80px;
}

.keywords-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    overflow: hidden;
    max-width: 200px;
}

.keyword-tag {
    display: inline-block;
    padding: 4px 8px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

/* 진단 셀 */
.diagnosis-cell {
    width: 60px;
}

.diagnosis-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.diagnosis-btn:hover {
    background: var(--primary-blue-dark);
    transform: scale(1.05);
}

.diagnosis-btn i {
    font-size: 14px;
}

/* 변화 지표 */
.change-indicator {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 600;
}

.change-indicator.up {
    color: var(--error-color);
}

.change-indicator.down {
    color: var(--primary-blue);
}

.change-indicator i {
    font-size: 10px;
}

/* 테이블 섹션 */
.table-section {
    background: transparent;
    border-radius: 20px;
    margin-top: -8px;
    margin-bottom: 32px;
}

.table-placeholder {
    text-align: center;
    padding: 80px 32px;
    background: linear-gradient(135deg, var(--white) 0%, var(--blue-50) 100%);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--blue-100);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.table-placeholder i {
    font-size: 64px;
    color: var(--gray-300);
    margin-bottom: 24px;
}

.table-placeholder h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.table-placeholder p {
    font-size: 16px;
    color: var(--gray-500);
    line-height: 1.6;
}

/* 모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show {
    opacity: 1;
}

.modal-container {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 100%);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-700);
}

.modal-title i {
    font-size: 22px;
    color: var(--primary-blue);
}

.modal-close {
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--gray-500);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: 32px;
}

/* 모달 안내 문구 스타일 */
.modal-notice {
    background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 100%);
    border: 1px solid var(--blue-200);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.notice-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--gray-700);
}

.notice-item:last-child {
    margin-bottom: 0;
}

.notice-item i {
    color: var(--primary-blue);
    font-size: 16px;
    flex-shrink: 0;
}

.notice-item span {
    font-weight: 500;
    line-height: 1.4;
}

.calendar-container {
    display: flex;
    justify-content: center;
}

.date-selector-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.date-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.date-selector label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    text-align: center;
}

.date-dropdown {
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 14px;
    padding-right: 40px;
    min-width: 80px;
    text-align: center;
}

.date-dropdown:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        var(--shadow-md);
}

.date-dropdown:hover {
    border-color: var(--primary-blue-light);
    background-color: var(--blue-50);
}

.date-separator {
    margin: 0 4px;
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-400);
    align-self: flex-end;
    margin-bottom: 12px;
}

/* 연도 드롭다운 스타일 조정 */
#year-select {
    min-width: 90px;
}

/* 월 드롭다운 스타일 조정 */
#month-select {
    min-width: 70px;
}

/* 고정 일자 표시 스타일 조정 */
.date-separator span {
    font-weight: 600;
    color: var(--gray-600);
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 24px 32px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.btn-cancel,
.btn-confirm {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-cancel {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-cancel:hover {
    background: var(--gray-300);
}

.btn-confirm {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-confirm:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    box-shadow: var(--shadow-md);
}

/* 검색 결과 정보 스타일 */
.search-result-info {
    padding: 24px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.result-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0;
}

.result-header h3 i {
    font-size: 22px;
    color: var(--primary-blue);
}

.result-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.result-count,
.comparison-info {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.result-count {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.comparison-info {
    background: linear-gradient(135deg, var(--blue-100) 0%, var(--blue-50) 100%);
    color: var(--primary-blue);
    border: 1px solid var(--blue-200);
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .search-form-row,
    .comparison-controls-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input-group,
    .count-select-group,
    .comparison-date-group,
    .legend-group {
        min-width: 0;
        width: 100%;
    }
    
    .comparison-controls-row {
        gap: 24px;
    }
    
    .keyword-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px;
    }
    
    .keyword-info-section {
        padding: 24px;
    }
    
    .places-table {
        font-size: 13px;
        min-width: 800px;
    }
    
    .places-table thead th {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .places-table tbody td {
        padding: 12px 8px;
    }
}

@media (max-width: 768px) {
    .searchplace-container {
        padding: 16px;
    }
    
    .search-controls {
        padding: 24px 20px;
    }
    
    .date-options {
        gap: 8px;
    }
    
    .date-option {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .legend-items {
        gap: 12px;
    }
    
    .keyword-info-section {
        padding: 20px;
    }
    
    .keyword-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .info-item {
        padding: 16px;
    }
    
    .table-wrapper {
        border-radius: 12px;
    }
    
    .places-table {
        font-size: 12px;
        min-width: 800px;
    }
    
    .places-table thead th {
        padding: 16px 6px;
        font-size: 11px;
    }
    
    .places-table tbody td {
        padding: 10px 6px;
    }
    
    .business-name-cell {
        min-width: 80px;
    }
    
    .keywords-cell {
        min-width: 80px;
    }
    
    .keyword-tag {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .new-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .category-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .diagnosis-btn {
        width: 28px;
        height: 28px;
    }
    
    .diagnosis-btn i {
        font-size: 12px;
    }
    
    .change-indicator {
        font-size: 10px;
        gap: 1px;
    }
    
    .change-indicator i {
        font-size: 9px;
    }
    
    .modal-header {
        padding: 20px 24px;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .modal-footer {
        padding: 20px 24px;
    }
    
    .date-selector-group {
        gap: 12px;
    }
    
    .date-dropdown {
        min-width: 70px;
        font-size: 14px;
        padding: 10px 12px;
        padding-right: 32px;
    }
    
    .date-separator {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    #year-select {
        min-width: 80px;
    }
    
    #month-select {
        min-width: 65px;
    }
}

/* 모바일 반응형 스타일링 */
@media (max-width: 768px) {
    .searchplace-container {
        padding: 8px;
        margin: 0;
    }
    
    .search-controls {
        padding: 16px 12px;
        margin-bottom: 24px;
        border-radius: 16px;
    }
    
    .search-form-row {
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .comparison-controls-row {
        gap: 16px;
    }
    
    .search-input-group {
        min-width: 0;
    }
    
    .count-select-group {
        min-width: 0;
    }
    
    .comparison-date-group {
        min-width: 0;
    }
    
    .legend-group {
        min-width: 0;
    }
    
    .btn-search {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 48px;
        justify-content: center;
        text-align: center;
    }
    
    .date-options {
        gap: 8px;
    }
    
    .date-option {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .legend-items {
        gap: 12px;
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .legend-item {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
    
    .keyword-info-section {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .keyword-info-header h3 {
        font-size: 18px;
    }
    
    .keyword-info-header h3 i {
        font-size: 18px;
    }
    
    .keyword-info-grid {
        gap: 12px;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .info-item {
        padding: 12px;
    }
    
    .info-label i {
        font-size: 14px;
    }
    
    .info-value {
        font-size: 16px;
    }
    
    .keyword-value {
        font-size: 18px;
    }
    
    .table-wrapper {
        margin-bottom: 16px;
    }
    
    .places-table {
        font-size: 12px;
        min-width: 800px;
    }
    
    .places-table thead th {
        padding: 10px 6px;
        font-size: 11px;
    }
    
    .places-table tbody td {
        padding: 8px 6px;
    }
    
    .business-name-cell {
        min-width: 100px;
    }
    
    .keywords-cell {
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .searchplace-container {
        padding: 6px;
        margin: 0;
    }
    
    .search-controls {
        padding: 12px 8px;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    
    .search-form-row {
        gap: 8px;
        margin-bottom: 12px;
        flex-direction: row !important;
        align-items: end !important;
    }
    
    .comparison-controls-row {
        gap: 12px;
    }
    
    .search-input-group {
        flex: 1 !important;
        min-width: 0;
        max-width: none !important;
    }
    
    .count-select-group {
        flex: 0 0 auto !important;
        width: 90px !important;
        min-width: 90px !important;
        max-width: 90px !important;
    }
    
    .search-button-group {
        width: 100% !important;
        min-width: 0;
        max-width: 100% !important;
    }
    
    .comparison-date-group {
        min-width: 0;
    }
    
    .legend-group {
        min-width: 0;
    }
    
    .input-label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .search-input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .count-select {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .btn-search {
        padding: 12px 18px;
        font-size: 13px;
        min-height: 44px;
        justify-content: center;
        text-align: center;
    }
    
    .date-options {
        flex-direction: row !important;
        gap: 4px;
        flex-wrap: wrap;
    }
    
    .date-option {
        justify-content: center;
        padding: 6px 10px;
        font-size: 11px;
        flex: 1;
        min-width: 0;
    }
    
    .legend-items {
        flex-direction: row !important;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .legend-item {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
    
    .keyword-info-section {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .keyword-info-header h3 {
        font-size: 16px;
    }
    
    .keyword-info-header h3 i {
        font-size: 16px;
    }
    
    .keyword-info-grid {
        gap: 8px;
        grid-template-columns: 1fr;
    }
    
    .info-item {
        padding: 10px;
    }
    
    .info-label {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .info-label i {
        font-size: 12px;
    }
    
    .info-value {
        font-size: 14px;
    }
    
    .keyword-value {
        font-size: 16px;
    }
    
    .table-wrapper {
        margin-bottom: 12px;
    }
    
    .places-table {
        font-size: 11px;
        min-width: 800px;
    }
    
    .places-table thead th {
        padding: 12px 4px;
        font-size: 10px;
    }
    
    .places-table tbody td {
        padding: 6px 4px;
    }
    
    .business-name-cell {
        min-width: 70px;
    }
    
    .keywords-cell {
        min-width: 70px;
    }
}

/* 로딩 오버레이 스타일 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.95) 0%, 
        rgba(139, 92, 246, 0.95) 50%, 
        rgba(59, 130, 246, 0.95) 100%);
    backdrop-filter: blur(20px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.loading-overlay.show {
    opacity: 1;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    position: relative;
    transform: scale(0.8) translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-overlay.show .loading-container {
    transform: scale(1) translateY(0);
}

/* 로딩 애니메이션 */
.loading-animation {
    position: relative;
    margin-bottom: 40px;
}

.loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.spinner-ring:nth-child(1) {
    width: 120px;
    height: 120px;
    border-top-color: rgba(255, 255, 255, 0.9);
    border-right-color: rgba(255, 255, 255, 0.3);
    animation-duration: 2s;
}

.spinner-ring:nth-child(2) {
    width: 90px;
    height: 90px;
    top: 15px;
    left: 15px;
    border-top-color: rgba(255, 255, 255, 0.7);
    border-left-color: rgba(255, 255, 255, 0.3);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 30px;
    left: 30px;
    border-top-color: rgba(255, 255, 255, 0.5);
    border-bottom-color: rgba(255, 255, 255, 0.3);
    animation-duration: 1s;
}

.spinner-ring:nth-child(4) {
    width: 30px;
    height: 30px;
    top: 45px;
    left: 45px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: rgba(255, 255, 255, 0.8);
    animation-duration: 0.8s;
    animation-direction: reverse;
}

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

/* 로딩 점들 */
.loading-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
.dot:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* 로딩 텍스트 */
.loading-text {
    margin-bottom: 40px;
}

.loading-text h3 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.loading-text p {
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 프로그레스 바 */
.loading-progress {
    width: 300px;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 1) 50%, 
        rgba(255, 255, 255, 0.9) 100%);
    border-radius: 10px;
    animation: progress 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes progress {
    0% {
        width: 0%;
        transform: translateX(-100%);
    }
    50% {
        width: 100%;
        transform: translateX(0%);
    }
    100% {
        width: 100%;
        transform: translateX(100%);
    }
}

.progress-text {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 배경 파티클 */
.loading-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 6s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 1s;
    animation-duration: 8s;
}

.particle:nth-child(3) {
    left: 35%;
    animation-delay: 2s;
    animation-duration: 7s;
}

.particle:nth-child(4) {
    left: 65%;
    animation-delay: 3s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    left: 80%;
    animation-delay: 4s;
    animation-duration: 6s;
}

.particle:nth-child(6) {
    left: 90%;
    animation-delay: 5s;
    animation-duration: 8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(-10vh) scale(1);
    }
    100% {
        transform: translateY(-10vh) scale(0);
        opacity: 0;
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .loading-container {
        padding: 20px;
    }
    
    .loading-spinner {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }
    
    .spinner-ring:nth-child(1) {
        width: 80px;
        height: 80px;
    }
    
    .spinner-ring:nth-child(2) {
        width: 60px;
        height: 60px;
        top: 10px;
        left: 10px;
    }
    
    .spinner-ring:nth-child(3) {
        width: 40px;
        height: 40px;
        top: 20px;
        left: 20px;
    }
    
    .spinner-ring:nth-child(4) {
        width: 20px;
        height: 20px;
        top: 30px;
        left: 30px;
    }
    
    .loading-text h3 {
        font-size: 20px;
    }
    
    .loading-text p {
        font-size: 14px;
    }
    
    .loading-progress {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .loading-text h3 {
        font-size: 18px;
    }
    
    .loading-progress {
        width: 200px;
    }
}

/* 큰 화면에서의 컨테이너 너비 조정 */
@media (min-width: 1400px) {
    .searchplace-container {
        max-width: calc(100vw - 240px - 48px);
    }
}

@media (min-width: 1600px) {
    .searchplace-container {
        max-width: calc(100vw - 240px - 48px);
    }
} 