:root {
    --toolbar-bg: rgba(15, 15, 18, 0.82);
    --toolbar-accent: #FFF;
    --toolbar-btn: #007bef;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, sans-serif;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #111;
}

#map {
    height: 100%;
    width: 100%;
    background: #111;
}

.controle-rodape {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

#toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    background: rgba(90, 90, 90, 0.7);
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    min-width: 220px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.toolbar-group--time {
    justify-content: space-between;
    padding: 14px 18px;
}

.toolbar-group--time #btnPlay {
    flex-shrink: 0;
    padding: 14px 18px;
}

.toolbar-dbz {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 4px;
    border-radius: 0 0 10px 10px;
    backdrop-filter: blur(2px);
}

.toolbar-dbz img {
    display: block;
    width: 373px;
    height: auto;
    max-height: 373px;
    object-fit: contain;
    border-radius: 0 0 6px 6px;
}

.toolbar-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    font-size: 1.1rem;
    line-height: 1;
}

.toolbar-btn:hover { background: rgba(255, 255, 255, 0.18); }

.toolbar-btn--primary {
    background: var(--toolbar-btn);
    border-color: transparent;
    font-size: 0.95rem;
    min-width: 72px;
}

.toolbar-btn--primary:hover { background: #0056b3; }

#timestamp {
    font-size: 2rem;
    font-weight: 700;
    color: var(--toolbar-accent);
    white-space: nowrap;
}

.toolbar-opacity {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

#sliderOpacidade {
    flex: 1;
    width: auto;
    min-width: 80px;
    height: 28px;
    margin: 0;
    accent-color: var(--toolbar-btn);
    touch-action: none;
}

#labelOpacidade {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    min-width: 2.5rem;
}

@media (max-width: 768px), (pointer: coarse) {
    #toolbar {
        bottom: max(16px, env(safe-area-inset-bottom));
        left: max(16px, env(safe-area-inset-left));
        min-width: 200px;
        max-width: calc(100vw - 32px);
    }

    .toolbar-group--time {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    #timestamp {
        font-size: 1.5rem;
        text-align: left;
        flex: 1 1 auto;
        min-width: 0;
        white-space: nowrap;
    }

    .toolbar-btn--primary {
        width: auto;
        min-height: 48px;
        flex-shrink: 0;
    }

    #sliderOpacidade {
        min-width: 70px;
        height: 32px;
    }
}
