* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=Inter:wght@300;400;500&display=swap');

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    overflow: hidden;
    color: #ffffff;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

#info-panel {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    max-width: 380px;
    z-index: 10;
    border: 1px solid rgba(96, 165, 250, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

#info-panel:hover {
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6), 
                0 0 60px rgba(59, 130, 246, 0.2);
}

#info-panel h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #60a5fa 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

#info-panel p {
    font-size: 15px;
    color: #cbd5e1;
    margin-bottom: 15px;
    line-height: 1.6;
    font-weight: 300;
}

#location-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.location-detail {
    margin-bottom: 10px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
    border-radius: 12px;
    border-left: 4px solid #60a5fa;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.location-detail h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #60a5fa;
}

.location-detail p {
    font-size: 13px;
    margin: 5px 0;
    color: #e2e8f0;
    line-height: 1.5;
}

.coordinates {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: rgba(15, 23, 42, 0.6);
    padding: 12px 15px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 8px;
    border: 1px solid rgba(96, 165, 250, 0.2);
    font-size: 12px;
}

.learn-more-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.learn-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.location-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 15px;
    border: 2px solid rgba(96, 165, 250, 0.2);
    transition: all 0.3s ease;
}

.location-image:hover {
    border-color: rgba(96, 165, 250, 0.5);
    transform: scale(1.02);
}

#controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

#controls button {
    background: rgba(59, 130, 246, 0.2);
    color: white;
    border: 1px solid rgba(96, 165, 250, 0.3);
    padding: 14px 28px;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#controls button:hover {
    background: rgba(59, 130, 246, 0.4);
    border-color: rgba(96, 165, 250, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

#controls button:active {
    transform: translateY(-1px);
}

/* Stats panel */
#stats-panel {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    padding: 25px;
    border-radius: 20px;
    max-width: 300px;
    z-index: 10;
    border: 1px solid rgba(96, 165, 250, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#stats-panel h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #60a5fa;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
    font-size: 14px;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #94a3b8;
    font-weight: 400;
}

.stat-value {
    color: #34d399;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
}

/* Footer */
#footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    text-align: center;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 100%);
    backdrop-filter: blur(10px);
    z-index: 5;
}

#footer p {
    color: #94a3b8;
    font-size: 13px;
    margin: 5px 0;
}

/* Loading animation */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: #60a5fa;
    font-family: 'Space Grotesk', sans-serif;
}

/* Cluster Menu */
.cluster-menu {
    position: fixed;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 16px;
    padding: 20px;
    min-width: 280px;
    max-width: 350px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(96, 165, 250, 0.1);
    animation: menuFadeIn 0.3s ease;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cluster-menu-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
    text-align: center;
}

.cluster-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin: 8px 0;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: itemSlideIn 0.3s ease forwards;
    opacity: 0;
}

@keyframes itemSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cluster-menu-item:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(96, 165, 250, 0.4);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.cluster-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.cluster-name {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 14px;
    flex: 1;
}

.cluster-country {
    font-size: 11px;
    color: #94a3b8;
    text-align: right;
}

.cluster-menu::-webkit-scrollbar {
    width: 6px;
}

.cluster-menu::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
}

.cluster-menu::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.3);
    border-radius: 10px;
}

.cluster-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.5);
}
