.ibgrp-widget,
.ibgrp-widget * {
    box-sizing: border-box;
}

.ibgrp-widget {
    --ibgrp-red: #ff1f3d;
    --ibgrp-red-dark: #970014;
    --ibgrp-black: #050506;
    --ibgrp-panel: #111116;
    --ibgrp-text: #ffffff;
    --ibgrp-muted: rgba(255,255,255,0.68);
    --ibgrp-border: rgba(255,255,255,0.12);
    --ibgrp-soft: rgba(255,255,255,0.06);
    color: var(--ibgrp-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ibgrp-shell {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 10% 0%, rgba(255, 31, 61, 0.26), transparent 30%),
        radial-gradient(circle at 96% 12%, rgba(255, 31, 61, 0.18), transparent 25%),
        linear-gradient(145deg, #050506 0%, #131318 52%, #070707 100%);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 26px 90px rgba(0,0,0,0.50), inset 0 1px 0 rgba(255,255,255,0.09);
}

.ibgrp-glow {
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(36px);
    opacity: 0.7;
}

.ibgrp-glow-one {
    width: 180px;
    height: 180px;
    background: rgba(255,31,61,0.44);
    top: -90px;
    right: -74px;
}

.ibgrp-glow-two {
    width: 140px;
    height: 140px;
    background: rgba(151,0,20,0.38);
    bottom: 2%;
    left: -72px;
}

.ibgrp-header,
.ibgrp-dropzone,
.ibgrp-controls,
.ibgrp-actions,
.ibgrp-results,
.ibgrp-footer,
.ibgrp-note,
.ibgrp-status {
    position: relative;
    z-index: 1;
}

.ibgrp-header {
    text-align: center;
    margin-bottom: 23px;
}

.ibgrp-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255,31,61,0.13);
    border: 1px solid rgba(255,31,61,0.36);
    color: #ffb3be;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ibgrp-header h3 {
    margin: 15px 0 10px;
    color: #fff;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.04;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.ibgrp-header p {
    max-width: 800px;
    margin: 0 auto;
    color: var(--ibgrp-muted);
    font-size: 15px;
    line-height: 1.65;
}

.ibgrp-dropzone {
    display: grid;
    place-items: center;
    text-align: center;
    min-height: 245px;
    padding: 30px;
    border-radius: 26px;
    border: 1.5px dashed rgba(255,255,255,0.24);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.078), rgba(255,255,255,0.035)),
        radial-gradient(circle at center, rgba(255,31,61,0.12), transparent 58%);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
    cursor: pointer;
}

.ibgrp-dropzone:hover,
.ibgrp-dropzone.ibgrp-dragover {
    transform: translateY(-2px);
    border-color: rgba(255,31,61,0.88);
    background:
        linear-gradient(180deg, rgba(255,31,61,0.14), rgba(255,255,255,0.045)),
        radial-gradient(circle at center, rgba(255,31,61,0.17), transparent 58%);
}

.ibgrp-file {
    position: absolute;
    inset: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ibgrp-upload-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    margin-bottom: 14px;
    border-radius: 25px;
    background: linear-gradient(145deg, var(--ibgrp-red), var(--ibgrp-red-dark));
    box-shadow: 0 18px 44px rgba(255,31,61,0.28);
    font-size: 32px;
    color: #fff;
}

.ibgrp-dropzone strong {
    color: #fff;
    font-size: 24px;
    font-weight: 950;
}

.ibgrp-dropzone span,
.ibgrp-dropzone small {
    display: block;
    color: var(--ibgrp-muted);
    margin-top: 7px;
}

.ibgrp-dropzone small {
    max-width: 680px;
    line-height: 1.5;
}

.ibgrp-browse,
.ibgrp-process,
.ibgrp-download-all,
.ibgrp-clear,
.ibgrp-download {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 950;
    letter-spacing: -0.01em;
    transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}

.ibgrp-browse {
    margin-top: 16px;
    padding: 14px 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--ibgrp-red), var(--ibgrp-red-dark));
    box-shadow: 0 16px 38px rgba(255,31,61,.25);
}

.ibgrp-browse:hover,
.ibgrp-process:hover,
.ibgrp-download-all:hover,
.ibgrp-clear:hover,
.ibgrp-download:hover {
    transform: translateY(-1px);
}

.ibgrp-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.ibgrp-controls label {
    display: grid;
    gap: 9px;
    padding: 17px;
    border-radius: 19px;
    background: rgba(255,255,255,0.058);
    border: 1px solid rgba(255,255,255,0.105);
}

.ibgrp-controls span {
    color: rgba(255,255,255,0.68);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ibgrp-controls strong {
    color: #fff;
    font-size: 15px;
    font-weight: 950;
}

.ibgrp-controls select {
    width: 100%;
    min-height: 44px;
    color: #fff;
    background: #08080a;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 13px;
    padding: 10px 11px;
    outline: 0;
}

.ibgrp-note {
    margin-top: 13px;
    padding: 13px 15px;
    border-radius: 17px;
    color: rgba(255,255,255,0.76);
    background: rgba(255,255,255,0.046);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
    line-height: 1.58;
}

.ibgrp-note strong {
    color: #fff;
}

.ibgrp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.ibgrp-process,
.ibgrp-download-all,
.ibgrp-clear,
.ibgrp-download {
    padding: 13px 18px;
    color: #fff;
}

.ibgrp-process,
.ibgrp-download-all,
.ibgrp-download {
    background: linear-gradient(135deg, var(--ibgrp-red), var(--ibgrp-red-dark));
    box-shadow: 0 12px 29px rgba(255,31,61,0.22);
}

.ibgrp-clear {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.12);
}

.ibgrp-process:disabled,
.ibgrp-download-all:disabled,
.ibgrp-clear:disabled,
.ibgrp-download[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .45;
    transform: none;
    box-shadow: none;
}

.ibgrp-status {
    min-height: 24px;
    margin-top: 14px;
    color: #ffccd2;
    font-size: 14px;
    font-weight: 800;
}

.ibgrp-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.ibgrp-card {
    overflow: hidden;
    border-radius: 23px;
    background: rgba(255,255,255,0.062);
    border: 1px solid rgba(255,255,255,0.105);
}

.ibgrp-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ibgrp-card-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.ibgrp-badge {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffdce1;
    background: rgba(255,31,61,0.16);
    border: 1px solid rgba(255,31,61,0.27);
    font-size: 11px;
    font-weight: 950;
}

.ibgrp-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(255,255,255,0.07);
}

.ibgrp-preview {
    min-height: 225px;
    padding: 12px;
    background:
        linear-gradient(45deg, rgba(255,255,255,.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.05) 75%),
        #0b0b0d;
    background-size: 22px 22px;
    background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}

.ibgrp-preview span {
    display: block;
    margin-bottom: 9px;
    color: rgba(255,255,255,0.58);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ibgrp-preview img {
    display: block;
    max-width: 100%;
    max-height: 275px;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 13px;
    image-rendering: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.ibgrp-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
}

.ibgrp-meta {
    color: rgba(255,255,255,0.62);
    font-size: 12px;
    line-height: 1.5;
}

.ibgrp-download {
    flex: 0 0 auto;
    text-decoration: none !important;
    font-size: 13px;
}

.ibgrp-error {
    padding: 14px 15px;
    color: #ffd6dc;
    background: rgba(255,31,61,0.10);
    border-top: 1px solid rgba(255,31,61,0.15);
    font-size: 13px;
    line-height: 1.55;
}

.ibgrp-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    color: rgba(255,255,255,0.50);
    font-size: 12px;
}

.ibgrp-footer a {
    color: #ff7a8c;
    font-weight: 950;
    text-decoration: none;
}

@media (max-width: 880px) {
    .ibgrp-controls,
    .ibgrp-results {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .ibgrp-shell {
        padding: 18px;
        border-radius: 22px;
    }

    .ibgrp-preview-grid {
        grid-template-columns: 1fr;
    }

    .ibgrp-card-foot,
    .ibgrp-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ibgrp-process,
    .ibgrp-download-all,
    .ibgrp-clear,
    .ibgrp-download {
        width: 100%;
        text-align: center;
    }
}
