body {
    margin: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(65, 133, 255, 0.12), transparent 30%),
        #12151b;
    font-family: monospace;
}

#camera-control-wrapper {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#scene-ui-layer {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

#prompt-toggle-button {
    display: none;
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 12;
    pointer-events: auto;
    min-width: 96px;
    padding: 10px 16px;
    border: 1px solid rgba(120, 160, 255, 0.24);
    border-radius: 999px;
    background: rgba(8, 11, 16, 0.9);
    color: #d7def4;
    cursor: pointer;
    font: inherit;
    letter-spacing: 0.08em;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    backdrop-filter: blur(10px);
}

#prompt-toggle-button:hover {
    transform: translateY(-1px);
    border-color: rgba(120, 160, 255, 0.45);
}

#prompt-overlay {
    position: absolute;
    top: 96px;
    right: 24px;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 48px));
    max-height: calc(100vh - 120px);
    padding: 14px;
    border-radius: 14px;
    background: rgba(7, 9, 14, 0.72);
    border: 1px solid rgba(120, 160, 255, 0.14);
    backdrop-filter: blur(14px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
    pointer-events: auto;
}

#prompt-copy-button {
    position: relative;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    color: #00ff88;
    white-space: normal;
    text-align: left;
    max-width: 100%;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    user-select: none;
}

#prompt-copy-button:hover {
    border-color: #00ff88;
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.01);
}

#prompt-copy-button:active {
    transform: scale(0.99);
}

.prompt-detail-toggle {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    border: 1px solid rgba(120, 160, 255, 0.15);
    color: #d7def4;
    cursor: pointer;
    user-select: none;
}

.prompt-detail-toggle input {
    margin: 0;
    accent-color: #7aa7ff;
}

.toast {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #00ff88;
    color: #000;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

svg {
    width: 18px;
    height: 18px;
}

#prompt-copy-button svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex: 0 0 20px;
    margin-top: 1px;
}

@media (max-width: 720px) {
    #prompt-toggle-button {
        display: inline-flex;
        position: fixed;
        left: 50%;
        right: auto;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        z-index: 30;
        align-items: center;
        justify-content: center;
        transform: translateX(-50%);
    }

    #prompt-overlay {
        position: fixed;
        top: auto;
        left: 12px;
        right: 12px;
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        width: auto;
        max-height: min(52vh, 320px);
        transform: translateY(calc(100% + 16px));
        opacity: 0;
        transition: transform 0.25s ease, opacity 0.25s ease;
        pointer-events: none;
    }

    #prompt-overlay.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    #prompt-copy-button {
        padding: 12px 16px;
        font-size: 14px;
    }

    #prompt-toggle-button:hover {
        transform: translateX(-50%) translateY(-1px);
    }
}

@media (max-width: 520px) {
    #prompt-overlay {
        max-height: min(46vh, 280px);
    }
}
