.aabp-lock {
    overflow: hidden !important;
}

.aabp-content-blurred {
    filter: blur(8px) saturate(0.85);
    pointer-events: none;
    user-select: none;
    transition: filter 220ms ease;
}

.aabp-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(4, 10, 22, 0.76), rgba(17, 24, 39, 0.72)),
        rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(18px) saturate(1.18);
    -webkit-backdrop-filter: blur(18px) saturate(1.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.aabp-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.aabp-modal {
    width: min(100%, 560px);
    max-height: min(780px, calc(100vh - 48px));
    overflow: auto;
    color: #f8fafc;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.76)),
        rgba(2, 6, 23, 0.76);
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 18px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(16px) scale(0.97);
    transition: transform 260ms cubic-bezier(0.2, 0.75, 0.25, 1), opacity 220ms ease;
    opacity: 0;
}

.aabp-overlay.is-visible .aabp-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.aabp-modal__inner {
    padding: 28px;
}

.aabp-modal__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.aabp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #dbeafe;
    font: 700 13px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    text-transform: uppercase;
}

.aabp-brand__mark {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    color: #051016;
    background: linear-gradient(135deg, #7dd3fc, #34d399 56%, #fde68a);
    box-shadow: 0 10px 30px rgba(52, 211, 153, 0.22);
}

.aabp-brand__text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.aabp-close {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 999px;
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.56);
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.aabp-close:hover {
    transform: translateY(-1px);
    background: rgba(30, 41, 59, 0.78);
    border-color: rgba(226, 232, 240, 0.34);
}

.aabp-close svg,
.aabp-brand__mark svg {
    width: 18px;
    height: 18px;
    display: block;
}

.aabp-modal h2 {
    margin: 0;
    color: #ffffff;
    font: 800 28px/1.08 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.aabp-copy {
    margin: 14px 0 0;
    color: #cbd5e1;
    font: 400 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.aabp-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 22px 0 0;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.58);
}

.aabp-score__label {
    color: #e2e8f0;
    font: 700 13px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.aabp-score__value {
    color: #fef3c7;
    font: 800 18px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.aabp-meter {
    position: relative;
    height: 8px;
    flex: 1 1 auto;
    min-width: 96px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.62);
}

.aabp-meter span {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--aabp-score, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #facc15 58%, #f43f5e);
    transition: width 320ms ease;
}

.aabp-instructions {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.aabp-instructions li {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
    color: #e5e7eb;
    font: 500 14px/1.48 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.aabp-instructions span {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #07111d;
    background: #bfdbfe;
    font-weight: 800;
}

.aabp-meta {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-left: 3px solid #38bdf8;
    border-radius: 10px;
    color: #cbd5e1;
    background: rgba(14, 165, 233, 0.1);
    font: 500 13px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.aabp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.aabp-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font: 800 14px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.aabp-button:disabled,
.aabp-button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.62;
}

.aabp-button:not(:disabled):hover {
    transform: translateY(-1px);
}

.aabp-button--primary {
    color: #07111d;
    background: linear-gradient(135deg, #93c5fd, #6ee7b7 62%, #fde68a);
    box-shadow: 0 14px 34px rgba(45, 212, 191, 0.2);
}

.aabp-button--secondary {
    color: #e2e8f0;
    border-color: rgba(226, 232, 240, 0.2);
    background: rgba(15, 23, 42, 0.7);
}

.aabp-methods {
    margin: 18px 0 0;
    display: none;
    color: #94a3b8;
    font: 500 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    overflow-wrap: anywhere;
}

.aabp-debug .aabp-methods {
    display: block;
}

.aabp-noscript {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #f8fafc;
    background: rgba(2, 6, 23, 0.88);
}

.aabp-noscript__panel {
    width: min(100%, 520px);
    padding: 26px;
    border: 1px solid rgba(226, 232, 240, 0.2);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
    text-align: center;
}

.aabp-noscript__panel strong {
    display: block;
    color: #dbeafe;
    font: 800 17px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.aabp-noscript__panel p {
    margin: 12px 0 0;
    color: #cbd5e1;
    font: 500 15px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 600px) {
    .aabp-overlay {
        padding: 14px;
        align-items: end;
    }

    .aabp-modal {
        max-height: calc(100vh - 28px);
        border-radius: 16px;
    }

    .aabp-modal__inner {
        padding: 22px;
    }

    .aabp-modal h2 {
        font-size: 23px;
        line-height: 1.14;
    }

    .aabp-copy {
        font-size: 15px;
    }

    .aabp-score {
        align-items: stretch;
        flex-direction: column;
    }

    .aabp-meter {
        width: 100%;
    }

    .aabp-actions,
    .aabp-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aabp-overlay,
    .aabp-modal,
    .aabp-button,
    .aabp-close,
    .aabp-meter span,
    .aabp-content-blurred {
        transition: none;
    }
}
