* {
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    margin: 0;
    background: #111217;
    color: #ddd;
    overflow: hidden;
}

#ui {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#topbar {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
    background: #0f1114;
    border-bottom: 1px solid #222;
}

#title {
    font-weight: 600;
    color: #fff;
    margin-right: 12px;
}

#status {
    color: #aaa;
    font-size: 13px;
    margin-left: auto;
}

.panel {
    padding: 12px;
    flex: 1;
    overflow: auto;
}

#gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-content: flex-start;
    padding-top: 8px;
}

.thumb {
    width: 220px;
    height: 140px;
    border-radius: 8px;
    background: #1c1e22;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.thumb img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    display: block;
}

.thumb .label {
    position: absolute;
    bottom: 6px;
    left: 8px;
    color: #eee;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.35);
    padding: 3px 6px;
    border-radius: 4px;
}

.thumb.locked {
    opacity: 1;
}

.thumb.unlocked {
    box-shadow: 0 0 0 3px rgba(240, 200, 60, 0.08);
    border: 3px solid rgba(240, 200, 60, 0.15);
}

.thumb.selected {
    outline: 3px solid rgba(80, 200, 120, 0.18);
}

#three-container {
    width: 100%;
    height: calc(100vh - 80px);
    background: #222428;
}

#hud {
    position: absolute;
    top: 56px;
    left: 16px;
    z-index: 20;
    pointer-events: none;
}

#hudtext {
    font-size: 14px;
    color: #dfe;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 10px;
    border-radius: 6px;
}

#limits {
    font-size: 13px;
    color: #ddd;
    margin-top: 6px;
    background: rgba(0, 0, 0, 0.18);
    padding: 4px 8px;
    border-radius: 6px;
}

#backToGallery {
    padding: 6px 10px;
    font-size: 14px;
}