.gbtbugreport-root {
    --gbtbugreport-bg: #0f172a;
    --gbtbugreport-panel: #ffffff;
    --gbtbugreport-text: #0f172a;
    --gbtbugreport-muted: #5b6474;
    --gbtbugreport-accent: #1d7afc;
    --gbtbugreport-accent-strong: #155dcc;
    --gbtbugreport-border: rgba(15, 23, 42, 0.12);
    --gbtbugreport-shadow: 0 24px 72px rgba(15, 23, 42, 0.2);
    --gbtbugreport-radius: 20px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.gbtbugreport-launcher {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 2147483500;
    border: 0;
    border-radius: 999px;
    padding: 0.95rem 1.2rem;
    background: linear-gradient(135deg, var(--gbtbugreport-accent), #4f8ff8);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 14px 32px rgba(29, 122, 252, 0.35);
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.gbtbugreport-launcher:hover,
.gbtbugreport-launcher:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(29, 122, 252, 0.42);
    filter: saturate(1.05);
}

.gbtbugreport-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483501;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.gbtbugreport-modal:popover-open {
    display: grid;
    place-items: center;
}

.gbtbugreport-modal::backdrop {
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(2px);
}

.gbtbugreport-panel {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: min(52rem, calc(100vw - 1rem));
    max-height: min(90vh, 56rem);
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--gbtbugreport-panel);
    color: var(--gbtbugreport-text);
    border: 1px solid var(--gbtbugreport-border);
    border-radius: var(--gbtbugreport-radius);
    box-shadow: var(--gbtbugreport-shadow);
    transform-origin: center;
    animation: gbtbugreport-pop 160ms ease-out;
}

.gbtbugreport-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--gbtbugreport-border);
}

.gbtbugreport-kicker {
    margin: 0 0 0.25rem;
    color: var(--gbtbugreport-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gbtbugreport-header h2 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.2;
}

.gbtbugreport-close {
    flex: 0 0 auto;
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--gbtbugreport-text);
    font-size: 1.25rem;
    cursor: pointer;
}

.gbtbugreport-body {
    padding: 1rem 1.25rem 1.25rem;
}

.gbtbugreport-success-state .gbtbugreport-notice,
.gbtbugreport-success-state .gbtbugreport-form {
    display: none;
}

.gbtbugreport-submitting .gbtbugreport-notice,
.gbtbugreport-submitting .gbtbugreport-form {
    display: none;
}

.gbtbugreport-notice {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(29, 122, 252, 0.08);
    color: #12376d;
    border: 1px solid rgba(29, 122, 252, 0.18);
}

.gbtbugreport-form {
    display: grid;
    gap: 0.9rem;
}

.gbtbugreport-field {
    display: grid;
    gap: 0.4rem;
    font-weight: 600;
}

.gbtbugreport-field span {
    font-size: 0.92rem;
}

.gbtbugreport-field input,
.gbtbugreport-field textarea {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--gbtbugreport-border);
    border-radius: 14px;
    background: #fff;
    color: var(--gbtbugreport-text);
    font: inherit;
    font-weight: 400;
    resize: vertical;
}

.gbtbugreport-field input:focus,
.gbtbugreport-field textarea:focus {
    outline: 2px solid rgba(29, 122, 252, 0.24);
    border-color: rgba(29, 122, 252, 0.55);
}

.gbtbugreport-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--gbtbugreport-border);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0));
}

.gbtbugreport-options label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--gbtbugreport-text);
    font-weight: 500;
}

.gbtbugreport-attachments[hidden] {
    display: none;
}

.gbtbugreport-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.3rem;
}

.gbtbugreport-submit,
.gbtbugreport-secondary {
    border: 0;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.gbtbugreport-submit {
    background: linear-gradient(135deg, var(--gbtbugreport-accent), var(--gbtbugreport-accent-strong));
    color: #fff;
}

.gbtbugreport-secondary {
    background: rgba(15, 23, 42, 0.08);
    color: var(--gbtbugreport-text);
}

.gbtbugreport-status {
    margin-top: 0.9rem;
    min-height: 1.25rem;
    color: var(--gbtbugreport-muted);
    font-size: 0.92rem;
    white-space: pre-line;
}

.gbtbugreport-status.success {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.1);
    color: #0f5132;
}

.gbtbugreport-status.error {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(239, 68, 68, 0.24);
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.1);
    color: #7f1d1d;
}

@keyframes gbtbugreport-pop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .gbtbugreport-launcher {
        right: 0.8rem;
        bottom: 0.8rem;
    }

    .gbtbugreport-panel {
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }

    .gbtbugreport-actions {
        flex-direction: column-reverse;
    }

    .gbtbugreport-submit,
    .gbtbugreport-secondary {
        width: 100%;
    }
}
