
#app {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #242424;
    border-bottom: 1px solid #333
}

header h1 {
    font-size: 16px;
    font-weight: 600
}

.toolbar {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 20
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #4a8cff;
    color: #fff;
    font-size: 13px;
    transition: background .2s
}

.btn:hover {
    background: #3a78f0
}

.btn.ghost {
    background: #333
}

.btn.ghost:hover {
    background: #444
}

main {
    position: relative;
    flex: 1;
    overflow: hidden
}

#viewer {
    width: 100%;
    height: 100%;
    display: block
}

#dropzone {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    pointer-events: none;
    color: #888;
    font-size: 15px;
    transition: background .2s, color .2s
}

#dropzone.hidden {
    display: none
}

#dropzone.dragover {
    background: #4a8cff1f;
    color: #4a8cff
}

#dropzone .loader {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, .15);
    border-top-color: #4a8cff;
    border-radius: 50%;
    animation: spin .9s linear infinite
}

#dropzone .loader-text {
    font-size: 14px;
    color: #aaa;
    letter-spacing: 1px
}

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

#info {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 10px 14px;
    background: #0000008c;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.6;
    max-width: 320px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: none
}

#info .row {
    display: flex;
    justify-content: space-between;
    gap: 12px
}

#info .label {
    color: #999
}

#info .value {
    color: #fff
}

#hud {
    position: absolute;
    right: 16px;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.chip {
    padding: 4px 10px;
    background: #00000080;
    border-radius: 12px;
    font-size: 11px;
    color: #ccc;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px)
}

.toast {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translate(-50%);
    padding: 10px 18px;
    background: #ff4d4f;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none
}

.toast.show {
    opacity: 1
}

a.btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none
}

#drawCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair
}

#hint {
    margin-right: 4px
}