#toolbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tool-btn {
    background: #333;
    color: white;
    border: 1px solid #555;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 24px;
}

.tool-btn:hover {
    background: #444;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.tool-btn.active {
    background: #4a90e2;
    border-color: #2171c7;
}

/* Custom Road Icon: Black rect with dashed center */
.icon-road {
    width: 24px;
    height: 24px;
    background: #111;
    position: relative;
    border-radius: 2px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.icon-road::after {
    content: '';
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(to bottom, white 0%, white 30%, transparent 30%, transparent 70%, white 70%, white 100%);
    background-size: 100% 6px;
    /* Dash pattern */
    background-repeat: repeat-y;
}

/* Yellow Bulldozer Style */
#info-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    top: auto;
}

#time-display {
    font-weight: bold;
    font-size: 16px;
    font-family: monospace;
}

#speed-controls {
    display: flex;
    gap: 5px;
}

.speed-btn {
    background: #444;
    border: 1px solid #666;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.speed-btn:hover {
    background: #555;
}

.speed-btn.active {
    background: #4a90e2;
    border-color: #2171c7;
}

#pop-display {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #4a90e2;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: monospace;
}

/* Sub-tool Flyouts */
.sub-tool-container {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 8px;
    border-radius: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    bottom: calc(100% + 10px);
    /* Position it slightly above the button */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* Invisible bridge to keep hover active across the gap */
.sub-tool-container::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

.tool-btn:hover .sub-tool-container,
.sub-tool-container.active {
    display: flex;
}

.sub-tool-btn {
    width: 60px;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sub-tool-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sub-tool-btn.active {
    background: #4a90e2;
    border-color: #2171c7;
}

.tool-btn .sub-tool-container {
    pointer-events: auto;
}