:root {
    --bg-color: #050505;
    --panel-bg: rgba(15, 15, 15, 0.85);
    --accent-color: #4a90e2;
    --accent-glow: rgba(74, 144, 226, 0.35);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Manrope', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    position: relative;
    isolation: isolate;
}

#app::before,
#app::after {
    content: "";
    position: absolute;
    inset: auto;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    z-index: 0;
    pointer-events: none;
}

#app::before {
    top: -180px;
    left: -160px;
    background: radial-gradient(circle at 30% 30%, rgba(120, 190, 255, 0.45), transparent 60%);
}

#app::after {
    bottom: -200px;
    right: -140px;
    background: radial-gradient(circle at 70% 70%, rgba(120, 255, 209, 0.35), transparent 65%);
}

/* Header */
.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 10;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    font-family: var(--font-display);
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 400;
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

#globe-container {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#globe-container:active {
    cursor: grabbing;
}

/* Controls */
.controls {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    gap: 1rem;
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    z-index: 10;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    animation: float-up 0.7s ease both;
    align-items: flex-end;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.control-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.control-group select,
.control-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: white;
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
    color-scheme: dark;
}

.control-group select {
    appearance: none;
    background-color: rgba(10, 12, 16, 0.95);
    background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.5) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.5) 50%, transparent 50%);
    background-position: calc(100% - 16px) calc(1em + 2px), calc(100% - 11px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2rem;
}

.control-group select option {
    background-color: #0d0f14;
    color: var(--text-primary);
}

.control-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.control-group select:focus,
.control-group input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Info Panel */
.info-panel {
    position: absolute;
    top: 6rem;
    right: 2rem;
    width: 360px;
    max-height: calc(100vh - 12rem);
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.info-panel.open {
    transform: translateX(0);
}

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

.panel-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    font-family: var(--font-display);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

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

.panel-content::-webkit-scrollbar {
    width: 8px;
}

.panel-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
}

.panel-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 20px;
}

.project-details h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-family: var(--font-display);
}

.detail-row {
    margin-bottom: 1.25rem;
}

.detail-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-primary);
}

.ticker-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    box-shadow: 0 0 18px var(--accent-glow);
}

.strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #6ef3c4);
    box-shadow: 0 0 12px rgba(110, 243, 196, 0.6);
}

.strength-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

/* Stats Bar */
.stats-bar {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 2rem;
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    padding: 1rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    z-index: 10;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    animation: float-up 0.7s ease both 0.1s;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: var(--font-display);
}

.stat-label {
    font-size: 0.625rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.globe-tooltip {
    padding: 0.5rem 0.75rem;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--text-primary);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.globe-tooltip strong {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    font-family: var(--font-display);
}

@keyframes float-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .controls {
        left: 1rem;
        right: 1rem;
        bottom: 7rem;
        flex-direction: column;
    }
    
    .stats-bar {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        justify-content: space-around;
        padding: 0.75rem;
    }

    .info-panel {
        width: calc(100vw - 2rem);
        right: 1rem;
        top: 5rem;
    }
}
