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

body {
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
    background: #0d1b2a;
    color: #e0e0e0;
}

#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

#top-bar, #bottom-bar {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.95), rgba(27, 38, 59, 0.95));
    border: 1px solid rgba(100, 149, 237, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

#top-bar {
    top: 16px;
}

#bottom-bar {
    bottom: 16px;
}

.bar-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6495ed;
    font-weight: 600;
}

#seed-display, #tile-count, #zoom-level {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: #ffd700;
    font-weight: 700;
}

button {
    font-family: 'JetBrains Mono', monospace;
    padding: 8px 16px;
    border: 1px solid rgba(100, 149, 237, 0.5);
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(100, 149, 237, 0.2), rgba(100, 149, 237, 0.1));
    color: #e0e0e0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button:hover {
    background: linear-gradient(135deg, rgba(100, 149, 237, 0.4), rgba(100, 149, 237, 0.2));
    border-color: #ffd700;
    color: #ffd700;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1));
    border-color: #ffd700;
    color: #ffd700;
}

#tooltip {
    display: none;
    position: fixed;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.98), rgba(27, 38, 59, 0.98));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 6px;
    pointer-events: none;
    z-index: 200;
    min-width: 140px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.terrain-name {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 4px;
}

.terrain-coords {
    font-size: 10px;
    color: #6495ed;
    margin-bottom: 8px;
}

.terrain-yields {
    font-size: 13px;
    color: #e0e0e0;
}

#footer {
    position: absolute;
    bottom: 16px;
    right: 16px;
    font-size: 11px;
    color: rgba(224, 224, 224, 0.6);
    pointer-events: auto;
}

#footer a {
    color: #ffd700;
    text-decoration: none;
    transition: color 0.2s;
}

#footer a:hover {
    color: #ffeb3b;
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loader {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(100, 149, 237, 0.3);
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 20px;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: #ffd700;
    letter-spacing: 2px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #top-bar, #bottom-bar {
        padding: 10px 14px;
        gap: 10px;
        font-size: 11px;
    }
    
    button {
        padding: 6px 12px;
        font-size: 10px;
    }
    
    .label {
        font-size: 9px;
    }
    
    #seed-display, #tile-count, #zoom-level {
        font-size: 12px;
    }
    
    #tooltip {
        padding: 10px 12px;
    }
    
    .terrain-name {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #top-bar {
        flex-wrap: wrap;
        max-width: 90%;
    }
    
    #bottom-bar {
        max-width: 80%;
    }
}