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

body {
    overflow: hidden;
    background: #000;
    font-family: 'Open Sans', sans-serif;
    color: #fff;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

#canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#info-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 350px;
}

#info-panel h1 {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #fff;
}

#info-panel p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 15px;
}

#timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.era {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.era:hover {
    background: rgba(100, 150, 255, 0.3);
    border-color: rgba(100, 150, 255, 0.5);
}

.era.active {
    background: rgba(100, 150, 255, 0.5);
    border-color: rgba(100, 150, 255, 0.8);
}

#scale-info {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

#scale-info::before,
#scale-info::after {
    content: '';
    display: inline-block;
    width: 100px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    vertical-align: middle;
    margin: 0 20px;
}

/* Labels in the 3D scene */
.label-3d {
    position: absolute;
    color: #fff;
    font-size: 14px;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

/* Loading screen */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

#loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #88ccff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    #info-panel {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        padding: 15px;
    }

    #info-panel h1 {
        font-size: 1.2rem;
    }

    .era {
        font-size: 0.6rem;
        padding: 3px 8px;
    }

    #scale-info {
        font-size: 0.9rem;
    }

    #scale-info::before,
    #scale-info::after {
        width: 50px;
    }
}
