body {
    margin: 0;
    overflow: hidden;
    background-color: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#ui {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    pointer-events: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border: 2px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.5;
    display: none;
}

.controls-hint {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 5px;
}

canvas {
    display: block;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    z-index: 20;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.toggle {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #aaa;
    cursor: pointer;
}

/* Editor selector bar */
#editor-selector {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 100;
    pointer-events: auto;
}

/* Items row (above category buttons) */
.items-row {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px;
}

/* Category buttons row (bottom) */
.category-bar {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.category-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #aaa;
    padding: 10px 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.category-btn.active {
    background: rgba(74, 158, 255, 0.3);
    border-color: #4a9eff;
    color: #fff;
}

.category-btn.bulldozer-btn.active {
    background: rgba(255, 80, 80, 0.3);
    border-color: #ff5050;
    color: #fff;
}

.selector-arrow {
    width: 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    user-select: none;
}

.selector-arrow:hover {
    color: #fff;
}

.selector-items {
    display: flex;
    gap: 8px;
    padding: 0 8px;
}

.selector-item {
    width: 64px;
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.selector-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.selector-item.selected {
    border-color: #4a9eff;
    background: rgba(74, 158, 255, 0.2);
}

.item-swatch {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.item-icon {
    font-size: 1.5rem;
}

.item-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.item-name {
    font-size: 0.6rem;
    color: #aaa;
    text-align: center;
    margin-top: 4px;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-library-link {
    color: #9fd5ff;
    text-decoration: none;
}

.asset-library-link:hover {
    color: #fff;
    text-decoration: underline;
}

html.capture-mode #overlay,
html.capture-mode #ui,
html.capture-mode #crosshair,
html.capture-mode #editor-selector {
    display: none !important;
}

