:root {
    --border-color: rgba(0, 0, 0, 0.1);
    --scroll-thumb: rgba(0, 0, 0, 0.2);
}

.dark-mode {
    --border-color: rgba(255, 255, 255, 0.1);
    --scroll-thumb: rgba(255, 255, 255, 0.2);
}


/* 기본 레이아웃 */
.content-wrapper {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    min-height: 100vh;
    background: var(--background-color);
}

.content-wrapper.ready {
    opacity: 1;
}

.container {
    width: 80%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
}

/* 헤더 스타일 */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header p {
    font-size: 3.5  rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
}

/* 컨트롤 버튼 스타일 */
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: flex-end;
}

.controls__item {
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    background: var(--button-bg);
    color: var(--button-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.controls__item:hover {
    background: var(--button-hover-bg);
}

.controls__item i {
    font-size: 1.1rem;
}

/* 지도 컨테이너 스타일 */
.location-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    height: 75vh;
    background: var(--container-bg);
    border-radius: 12px;
    margin: 2rem 0 0 0;
    box-shadow: var(--box-shadow);
}

/* 지도 섹션 */
.map-section {
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

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

/* 검색 결과 섹션 */
.search-section {
    height: 100%;
    overflow-y: auto;
    background: var(--background-color);
    border-radius: 8px;
    padding: 0;
    border: 1px solid var(--border-color);
}

#placesList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#placesList .item {
    padding: 20px 20px;
    margin-bottom: 0;
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

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

#placesList .item:hover {
    background: var(--hover-bg);
}

#placesList h5 {
    margin: 0 0 15px 0;
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.2;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 1.4rem;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.info .tel {
    color: #2ecc71;
    font-weight: 600;
    font-size: 1.5rem;
}

.copy-btn {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    padding: 0;
    border: none;
    border-radius: 16px;
    background: #2ecc71;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.25);
    margin: 0;
}

.copy-btn:hover {
    transform: scale(1.1);
    background: #27ae60;
}

.copy-btn i {
    font-size: 2.4rem;
}

.copy-btn span {
    display: none;
}

/* 로딩 화면 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease-in-out;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .container {
        width: 100%;
        padding: 20px;
    }

    .location-container {
        grid-template-columns: 1fr;
        height: auto;
        gap: 15px;
    }

    .map-section {
        height: 60vh;
    }

    .search-section {
        height: 50vh;
    }

    #placesList .item {
        padding: 25px;
    }

    #placesList h5 {
        font-size: 2rem;
        margin-bottom: 12px;
    }

    .info {
        font-size: 1.2rem;
    }

    .info-bottom {
        gap: 15px;
    }

    .copy-btn {
        width: 70px;
        height: 70px;
    }

    .copy-btn i {
        font-size: 2rem;
    }
}

/* 모바일 디자인 (768px 이하) */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .content {
        padding-top: 1rem !important;
    }

    .header p {
        padding-top: 1rem;
        font-size: 3rem !important;
        font-weight: 400;
    }

    .location-container {
        padding: 10px;
    }

    .map-section {
        height: 25vh;
    }

    .search-section {
        height: auto;
        max-height: 40vh;
        padding: 0;
    }

    #placesList {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    #placesList .item {
        padding: 15px;
    }

    #placesList h5 {
        font-size: 1.5rem;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    .info {
        font-size: 1rem;
        gap: 5px;
    }

    .info-bottom {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .address-container {
        gap: 5px;
    }

    .tel {
        font-size: 1.1rem;
    }

    .copy-btn {
        width: 50px;
        height: 50px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .copy-btn i {
        font-size: 1.4rem;
    }

    .search-section::-webkit-scrollbar {
        width: 4px;
    }

    .search-section::-webkit-scrollbar-thumb {
        border-radius: 2px;
    }

}

/* 주소와 버튼을 감싸는 컨테이너 추가 */
.info-bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.address-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

/* 스크롤바 스타일링 */
.search-section::-webkit-scrollbar {
    width: 8px;
}

.search-section::-webkit-scrollbar-track {
    background: var(--background-color);
}

.search-section::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 4px;
}
