body {
    font-family: 'Noto Sans SC', sans-serif;
    margin: 0;
    padding: 0px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    .container {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }

    .header {
        background: linear-gradient(90deg, #015C71, #015C71);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    }

    .back-button {
        color: #ffffff;
    }

    .back-button:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }

    .page-title {
        color: #ffffff;
    }

    .search-bar input[type="text"] {
        background-color: #2b2b2b;
        color: #e0e0e0;
        border-color: #444;
    }

    .search-bar input[type="text"]:focus {
        box-shadow: 0 0 10px rgba(72, 207, 173, 0.5);
    }

    .suggestions-list {
        background-color: #333;
        border-color: #444;
        color: #ccc;
    }

    .suggestions-list li:hover {
        background-color: #444;
    }

    .hospital-item {
        background-color: #2b2b2b;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }

    .hospital-name {
        color: #ddd;
    }

    .hospital-description {
        color: #999;
    }

    .hospital-rating {
        color: #f39c12;
    }

    .spinner {
        border-color: rgba(255, 255, 255, 0.1);
        border-left-color: #ffffff;
    }
}

@media (prefers-color-scheme: light) {
    body {
        background-color: #d4dee7;
        color: #333;
    }

    .container {
        background-color: white;
        color: #333;
    }

    .header {
        background: linear-gradient(90deg, #015C71, #015C71);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .back-button {
        color: #ffffff;
    }

    .back-button:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }

    .page-title {
        color: #ffffff;
    }

    .search-bar input[type="text"] {
        background-color: #ffffff;
        color: #333;
        border-color: #ddd;
    }

    .search-bar input[type="text"]:focus {
        box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    }

    .suggestions-list {
        background-color: #fff;
        border-color: #ddd;
        color: #333;
    }

    .suggestions-list li:hover {
        background-color: #f0f4f8;
    }

    .hospital-item {
        background-color: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .hospital-name {
        color: #333;
    }

    .hospital-description {
        color: #999;
    }

    .hospital-rating {
        color: #f39c12;
    }

    .spinner {
        border-color: rgba(0, 0, 0, 0.1);
        border-left-color: #000;
    }
}

/* 헤더 스타일 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;    
    border-radius: 12px;
    color: white;
    margin-bottom: 30px;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}

.back-button {
    background: none;
    border: none;
    font-size: 22px;
    color: white;
    cursor: pointer;
    padding: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border-radius: 50%;
    margin-right: 15px;
}

.lang-select select {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 20px;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 검색 바 스타일 */
.search-bar {
    margin-top: 20px;
    margin-bottom: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.search-input-container {
    position: relative;
    width: 100%;
    max-width: 98%;
    margin-bottom: 10px;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 18px;
    color: #aaa;
}

#search-input {
    width: 100%;
    padding: 15px 20px;
    padding-left: 50px;
    border-radius: 50px;
    border: 1px solid #ddd;
    font-size: 18px;
    box-sizing: border-box;
    outline: none;
    transition: box-shadow 0.3s ease;
}

.clear-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #aaa;
    cursor: pointer;
}

.clear-icon:hover {
    color: #555;
}

/* 자동완성 리스트 스타일 */
.suggestions-list {
    list-style: none;
    margin: 5px 0 0 0;
    padding: 0;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background-color: #fff;
    position: absolute;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    transition: all 0.3s ease;
}

.suggestions-list li {
    padding: 10px 20px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.suggestions-list li:last-child {
    border-bottom: none;
}

.suggestions-list li:hover {
    background-color: #f0f4f8;
}

/* 병원 리스트 스타일 */
.hospital-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.hospital-item {
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    transition: transform 0.2s;
    flex: 0 1 calc(25% - 10px);
}

.hospital-item:hover {
    transform: translateY(-5px);
}

.hospital-thumbnail {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.hospital-info {
    padding: 5px;
}

.hospital-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.hospital-description {
    font-size: 14px;
    margin-bottom: 10px;
}

.hospital-rating {
    font-size: 14px;
    margin-bottom: 10px;
}

/* 스피너 스타일 */
#spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hospital-name {
        font-size: 14px;
    }

    .icon-item i {
        font-size: 22px;
    }

    .icon-item span {
        font-size: 14px;
    }

    .hospital-item {
        flex: 0 1 calc(50% - 5px);
    }
}

@media (max-width: 480px) {
    .search-bar input[type="text"] {
        width: 100%;
    }    
}

.wishlist-icon {
    color: grey; /* 기본 색상 */
    font-size: 24px;
    margin-right: 10px;
}

.wishlist-icon.active {
    color: red; /* 찜한 상태에서 붉은색 */
}

