:root {
    --bg-dark: #070a0f;
    --sidebar-bg: #0c121d;
    --accent-orange: #f39c12;
    --text-main: #ffffff;
    --text-dim: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-overlay: rgba(15, 23, 42, 0.85);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar styling */
#sidebar {
    width: 460px;
    background: rgba(12, 18, 29, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--glass-border);
    z-index: 1000;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    transition: 0.3s;
}

.sidebar-header {
    padding: 40px 40px 20px 40px;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-orange);
    text-shadow: 0 0 20px rgba(243, 156, 18, 0.4);
}

.powered-by {
    font-size: 11px;
    color: var(--accent-orange);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
    transition: 0.3s;
}

.powered-by:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.8);
}

.description {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.6;
}

.search-container {
    padding: 0 40px 20px 40px;
    position: relative;
}

.search-container i {
    position: absolute;
    left: 55px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 14px;
}

#search-input {
    width: 100%;
    padding: 14px 20px 14px 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: 0.3s;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.2);
}

#hospital-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px 20px;
}

/* Custom Scrollbar */
#hospital-list::-webkit-scrollbar {
    width: 6px;
}
#hospital-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
#hospital-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
#hospital-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hospital-item {
    padding: 16px 20px;
    margin: 0 20px 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.hospital-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.4s ease;
}

.hospital-item:hover::before {
    background: var(--accent-orange);
    width: 5px;
}

.hospital-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.hospital-rank {
    font-size: 10px;
    color: var(--accent-orange);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    display: inline-block;
}

.hospital-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    margin-bottom: 4px;
}

.hospital-location {
    font-size: 12px;
    color: var(--text-dim);
}

/* Map Styling */
#map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    background: #000;
}

/* Popup styling */
.leaflet-popup-content-wrapper {
    background: rgba(12, 18, 29, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 16px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
}

.leaflet-popup-tip {
    background: rgba(12, 18, 29, 0.95) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 320px !important;
}

.popup-video {
    width: 100%;
    height: 180px;
    background: #000;
}

.popup-details {
    padding: 20px;
}

.popup-rank {
    font-size: 10px;
    color: var(--accent-orange);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    display: inline-block;
}

.popup-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 18px;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.2;
}

.popup-address {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.popup-desc {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.5;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
}

.leaflet-container a.leaflet-popup-close-button {
    color: #fff !important;
    top: 10px !important;
    right: 10px !important;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-weight: bold;
}
.leaflet-container a.leaflet-popup-close-button:hover {
    background: var(--accent-orange);
    color: #000 !important;
}

/* Custom Marker */
.custom-marker {
    background: linear-gradient(135deg, var(--accent-orange), #d68910);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.6);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}
.custom-marker:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 8px 20px rgba(243, 156, 18, 0.9);
    border-color: var(--accent-orange);
    background: #fff;
    color: var(--accent-orange);
}

/* Tooltip Labels */
.custom-hospital-tooltip {
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 0 !important;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    pointer-events: none;
    transform: translateX(-10px);
}
.custom-hospital-tooltip::before {
    display: none;
}
.show-labels .custom-hospital-tooltip {
    opacity: 1 !important;
    visibility: visible;
    transform: translateX(0);
}
.hospital-tooltip {
    background: rgba(12, 18, 29, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(243, 156, 18, 0.4);
    padding: 10px 14px;
    border-radius: 10px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    white-space: nowrap;
    position: relative;
}
.hospital-tooltip::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid rgba(243, 156, 18, 0.4);
}
.tt-rank {
    font-size: 10px;
    color: var(--accent-orange);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 3px;
}
.tt-name {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 2px;
    letter-spacing: -0.2px;
}
.tt-country {
    font-size: 11px;
    color: #94a3b8;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    #sidebar {
        width: 100%;
        height: 50vh;
        order: 2;
    }
    #map-container {
        height: 50vh;
        order: 1;
    }
}
