:root {
    --primary: #00f2ff;
    --primary-dark: #0072ff;
    --bg-color: #050505;
    --text-color: #ffffff;
    --panel-bg: rgba(15, 15, 15, 0.85);
    --accent: #ff00ea;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#globe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.ui-overlay {
    position: relative;
    z-index: 2;
    pointer-events: none;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.ui-overlay>* {
    pointer-events: auto;
}

header {
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -1px;
}

header h1 span {
    color: var(--primary);
}

header p {
    font-size: 0.9rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.search-container {
    max-width: 500px;
    position: relative;
}

.search-box {
    display: flex;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

.search-box input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: white;
    padding: 12px 20px;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
}

.search-box button {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: #000;
    font-weight: 600;
    padding: 0 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-box button:hover {
    transform: scale(1.02);
}

.search-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
    align-self: center;
    margin-right: 10px;
    flex-shrink: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.search-spinner.hidden {
    display: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}



.search-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.search-item:last-child {
    border: none;
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.info-panel {
    position: fixed;
    right: 2rem;
    top: 2rem;
    bottom: 2rem;
    width: 380px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.info-panel.hidden {
    transform: translateX(calc(100% + 3rem));
}

.panel-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

#close-panel {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
}

#close-panel:hover {
    opacity: 1;
}

.panel-content {
    padding: 1.5rem;
    overflow-y: auto;
}

.coord-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 2rem;
}

.coord-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 10px;
}

.coord-item .label {
    display: block;
    font-size: 0.7rem;
    opacity: 0.5;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.coord-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.location-details {
    line-height: 1.6;
}

.detail-row {
    margin-bottom: 15px;
}

.detail-row span.key {
    display: block;
    font-size: 0.8rem;
    opacity: 0.6;
}

.detail-row span.val {
    font-size: 1rem;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile responsive fixes */
@media screen and (max-width: 480px) {
    .ui-overlay {
        padding: 1rem;
    }

    header {
        margin-bottom: 1rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .search-box input {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .search-box button {
        padding: 0 12px;
        font-size: 0.85rem;
    }

    .info-panel {
        right: 1rem;
        left: 1rem;
        top: 1rem;
        bottom: 1rem;
        width: auto;
    }
}