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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Splash Screen */
.splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.splash-header {
    background: linear-gradient(135deg, #2c5282 0%, #3182ce 100%);
    color: white;
    padding: 30px;
    border-radius: 16px 16px 0 0;
    text-align: center;
}

.splash-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.splash-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.splash-body {
    padding: 25px 30px;
    text-align: center;
}

.splash-body .enter-btn {
    margin: 20px 0;
}

.splash-section {
    margin-bottom: 20px;
    text-align: left;
}

.splash-section:last-child {
    margin-bottom: 0;
}

.splash-section h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2c5282;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e2e8f0;
}

.splash-section p {
    font-size: 14px;
    line-height: 1.6;
    color: #4a5568;
}

.splash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.splash-stat {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2c5282;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.splash-list {
    list-style: none;
    font-size: 13px;
    color: #4a5568;
}

.splash-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.splash-list li:last-child {
    border-bottom: none;
}

.splash-list strong {
    color: #2d3748;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword {
    background: #ebf8ff;
    color: #2b6cb0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid #bee3f8;
}

.splash-footer {
    background: #f7fafc;
    padding: 20px 30px;
    border-radius: 0 0 16px 16px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.splash-footer .attribution {
    font-size: 12px;
    color: #718096;
    margin-bottom: 4px;
}

.splash-footer .copyright {
    font-size: 11px;
    color: #a0aec0;
    margin-bottom: 10px;
}

.splash-footer .dataset-link {
    margin-bottom: 20px;
}

.splash-footer .dataset-link a {
    color: #3182ce;
    font-size: 13px;
    text-decoration: none;
}

.splash-footer .dataset-link a:hover {
    text-decoration: underline;
}

.enter-btn {
    background: linear-gradient(135deg, #3182ce 0%, #2b6cb0 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(49, 130, 206, 0.4);
}

.enter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 130, 206, 0.5);
}

.enter-btn:active {
    transform: translateY(0);
}

#map {
    width: 100%;
    height: 100vh;
}

.panel {
    position: absolute;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 9px 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.header {
    top: 12px;
    left: 50px;
}

.header h1 {
    font-size: 20px;
    margin-bottom: 5px;
}

.header .attr {
    font-size: 11px;
    color: #666;
}

.header .version {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
}

.controls {
    bottom: 20px;
    right: 3px;
    width: 140px;
}

.controls h3 {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.controls .toggles {
    max-height: 300px;
    overflow: hidden;
}

.animation-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

#animateBtn {
    padding: 6px 12px;
    font-size: 11px;
    border: none;
    border-radius: 4px;
    background: #4488ff;
    color: white;
    cursor: pointer;
    width: 100px;
    height: 40px;
}

#animateBtn:hover {
    background: #3377ee;
}

#animateBtn.playing {
    background: #ff4444;
}

#animationYear {
    font-size: 12px;
    font-weight: bold;
    min-width: 40px;
}

.controls input[type="checkbox"] {
    margin-right: 6px;
}

.color-box {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.spinner {
    width: 12px;
    height: 12px;
    border: 2px solid #ddd;
    border-top-color: #4488ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    display: none;
    flex-shrink: 0;
}

.spinner.active {
    display: block;
}

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

.controls label {
    display: flex;
    align-items: center;
    margin: 4px 0;
    font-size: 11px;
    cursor: pointer;
}

.zoom-message {
    font-size: 10px;
    color: #999;
    padding: 4px 0;
    border-top: 1px solid #eee;
    margin-top: 8px;
    display: none;
}

.zoom-message.visible {
    display: block;
}

.coords {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #444;
    word-break: break-word;
}
