/* Image bingo engine. Isolated from numeric 90/75 bingo classes. */

:root {
    --image-bingo-bg: #fffaf2;
    --image-bingo-ink: #382314;
    --image-bingo-muted: #7b6656;
    --image-bingo-line: #efd9bb;
    --image-bingo-green: #72bf44;
    --image-bingo-green-dark: #2f9f4e;
    --image-bingo-blue: #0c577a;
    --image-bingo-yellow: #ffc126;
    --image-bingo-red: #ff5363;
    --image-bingo-official-cyan: #18b9cf;
    --image-bingo-official-cyan-dark: #0d8f9e;
    --image-bingo-official-pink: #ff5b78;
    --image-bingo-official-pink-dark: #d83c59;
    --image-bingo-shadow: 0 18px 50px rgba(84, 51, 22, 0.12);
    --image-bingo-page-background:
        radial-gradient(circle at 10% 10%, rgba(114, 191, 68, 0.08), transparent 25%),
        radial-gradient(circle at 92% 12%, rgba(255, 193, 38, 0.12), transparent 24%),
        var(--image-bingo-bg);
    --image-bingo-board-radius: 22px;
    --image-bingo-board-background: rgba(255, 255, 255, 0.62);
    --image-bingo-cell-radius: 10px;
    --image-bingo-cell-background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 239, 0.92));
    --image-bingo-cell-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
    --image-bingo-cell-image-filter: drop-shadow(0 5px 6px rgba(61, 38, 20, 0.12));
    --image-bingo-cell-name-size: clamp(12px, 1.05vw, 21px);
    --image-bingo-called-cell-background: linear-gradient(180deg, #0d5a80, #073653);
    --image-bingo-called-cell-shadow:
        inset 0 0 0 3px rgba(132, 217, 71, 0.86),
        0 10px 22px rgba(12, 87, 122, 0.22);
    --image-bingo-called-name-color: #ffffff;
    --image-bingo-called-name-shadow: 0 2px 0 rgba(0, 0, 0, 0.24);
    --image-bingo-panel-border: 2px solid rgba(239, 217, 187, 0.82);
    --image-bingo-brand-logo-filter: drop-shadow(0 5px 0 rgba(13, 97, 139, 0.15));
    --image-bingo-brand-subtitle-color: #422714;
    --image-bingo-current-frame-radius: 50% 50% 42% 42%;
    --image-bingo-current-frame-background: radial-gradient(circle, #ffffff 58%, #f6ffe8 100%);
    --image-bingo-current-frame-shadow:
        inset 0 0 0 5px rgba(255, 255, 255, 0.8),
        0 14px 30px rgba(61, 153, 69, 0.16);
    --image-bingo-current-image-filter: drop-shadow(0 8px 8px rgba(79, 52, 30, 0.12));
    --image-bingo-current-badge-background: linear-gradient(180deg, #8bd45a, #56ae2f);
    --image-bingo-current-badge-color: #ffffff;
    --image-bingo-current-badge-radius: 7px;
    --image-bingo-current-badge-shadow: 0 5px 0 rgba(45, 142, 56, 0.24);
    --image-bingo-last-circle-background: #ffffff;
    --image-bingo-counter-background: rgba(255, 255, 255, 0.74);
    --image-bingo-button-shadow: 0 6px 0 rgba(89, 52, 18, 0.13);
    --image-bingo-pause-background: linear-gradient(180deg, #ffcf42, #ffaf15);
    --image-bingo-pause-color: #3b2613;
    --image-bingo-resume-background: linear-gradient(180deg, #75dc99, #24b867);
    --image-bingo-exit-background: linear-gradient(180deg, #ff7480, #f34c5d);
    --image-bingo-toggle-background: #ffffff;
    --image-bingo-toggle-active-background: #f2ffe8;
    --image-bingo-intro-background:
        radial-gradient(circle at 20% 15%, rgba(114, 191, 68, 0.24), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(255, 193, 38, 0.2), transparent 30%),
        linear-gradient(160deg, #fffaf2 0%, #edfbea 100%);
    --image-bingo-intro-text-shadow: 2px 2px 0 #ffffff, 0 8px 20px rgba(12, 87, 122, 0.15);
    --image-bingo-loader-track: rgba(12, 87, 122, 0.16);
    --image-bingo-loader-border: 3px solid rgba(255, 255, 255, 0.95);
    --image-bingo-loader-shadow:
        inset 0 0 16px rgba(255, 255, 255, 0.65),
        0 12px 34px rgba(12, 87, 122, 0.15);
    --image-bingo-loader-complete-shadow:
        inset 0 0 18px rgba(255, 255, 255, 0.75),
        0 16px 42px rgba(47, 159, 78, 0.22);
    --image-bingo-loader-bar-background: linear-gradient(90deg, #72bf44 0%, #ffc126 48%, #18aee6 100%);
    --image-bingo-loader-bar-shadow: 0 0 18px rgba(114, 191, 68, 0.4);
    --image-bingo-cell-mounted-animation: imageBingoMountCell 430ms cubic-bezier(0.18, 0.85, 0.24, 1.18);
    --image-bingo-panel-item-animation: imageBingoMountPanelItem 540ms cubic-bezier(0.18, 0.85, 0.24, 1) both;
    --image-bingo-called-cell-animation: imageBingoStampCell 720ms cubic-bezier(0.13, 0.9, 0.18, 1.28);
    --image-bingo-called-image-animation: imageBingoMarkedImageKick 620ms cubic-bezier(0.15, 0.95, 0.18, 1.34);
    --image-bingo-current-frame-animation: imageBingoCurrentCall 860ms cubic-bezier(0.14, 0.88, 0.18, 1.32);
    --image-bingo-current-image-animation: imageBingoCurrentImageBounce 720ms cubic-bezier(0.12, 0.95, 0.18, 1.34);
    --image-bingo-current-badge-animation: imageBingoCurrentBadgeSnap 640ms cubic-bezier(0.14, 0.86, 0.18, 1.26);
    --image-bingo-last-item-animation: imageBingoLastEnter 640ms cubic-bezier(0.13, 0.9, 0.18, 1.28);
    --image-bingo-last-circle-animation: imageBingoLastCirclePop 720ms cubic-bezier(0.13, 0.9, 0.18, 1.28);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

.image-bingo-page {
    background: var(--image-bingo-page-background);
    color: var(--image-bingo-ink);
    font-family: Nunito, Arial, sans-serif;
    overflow: hidden;
}

.image-bingo-shell {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(342px, 28.5vw, 466px);
    gap: clamp(10px, 1.1vw, 18px);
    padding: clamp(12px, 1.2vw, 20px);
}

.image-bingo-mode-quick {
    --image-bingo-cell-name-size: clamp(14px, 1.18vw, 23px);
}

.image-bingo-mode-quick .image-bingo-board {
    gap: clamp(7px, 0.72vw, 12px);
}

.image-bingo-shell.prestart {
    opacity: 0;
    pointer-events: none;
}

.image-bingo-shell.mounting .image-bingo-board-wrap,
.image-bingo-shell.mounting .image-bingo-side {
    opacity: 0;
    transform: scale(0.96);
}

.image-bingo-shell.mounted .image-bingo-board-wrap,
.image-bingo-shell.mounted .image-bingo-side {
    opacity: 1;
    transform: scale(1);
    transition: opacity 420ms ease, transform 520ms cubic-bezier(0.18, 0.85, 0.24, 1);
}

.image-bingo-board-wrap {
    min-width: 0;
    min-height: 0;
    border: 2px solid var(--image-bingo-line);
    border-radius: var(--image-bingo-board-radius);
    background: var(--image-bingo-board-background);
    box-shadow: var(--image-bingo-shadow);
    padding: clamp(8px, 0.85vw, 14px);
    display: grid;
}

.image-bingo-board {
    display: grid;
    grid-template-columns: repeat(var(--image-bingo-columns, 7), minmax(0, 1fr));
    grid-template-rows: repeat(var(--image-bingo-rows, 7), minmax(0, 1fr));
    gap: clamp(6px, 0.65vw, 10px);
    min-height: 0;
}

.image-bingo-cell {
    position: relative;
    min-width: 0;
    min-height: 0;
    border: 2px solid var(--image-bingo-line);
    border-radius: var(--image-bingo-cell-radius);
    background: var(--image-bingo-cell-background);
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(1.42em, auto);
    align-items: center;
    justify-items: center;
    padding: clamp(3px, 0.38vw, 6px) clamp(4px, 0.45vw, 7px) clamp(2px, 0.28vw, 5px);
    overflow: hidden;
    box-shadow: var(--image-bingo-cell-shadow);
    transition: border-color 0.18s ease, background 0.18s ease;
}

.image-bingo-cell.mounting {
    opacity: 0;
    transform: translateY(14px) scale(0.72);
}

.image-bingo-cell.mounted {
    animation: var(--image-bingo-cell-mounted-animation);
}

.image-bingo-image-box {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    place-items: start center;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.image-bingo-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top center;
    filter: var(--image-bingo-cell-image-filter);
}

.image-bingo-cell-name {
    width: 100%;
    min-height: 1.42em;
    color: var(--image-bingo-ink);
    font-size: var(--image-bingo-cell-name-size);
    font-weight: 900;
    line-height: 0.95;
    text-align: center;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.image-bingo-cell.name-one-line {
    grid-template-rows: minmax(0, 1fr) minmax(1.08em, auto);
    padding-top: clamp(2px, 0.28vw, 5px);
}

.image-bingo-cell.name-one-line .image-bingo-cell-name {
    min-height: 1.08em;
    line-height: 0.9;
}

.image-bingo-cell.name-two-lines .image-bingo-cell-name {
    font-size: calc(var(--image-bingo-cell-name-size) - 2px);
}

.image-bingo-shell.names-hiding .image-bingo-cell-name {
    animation: imageBingoNamesSweepDown 420ms cubic-bezier(0.7, -0.08, 0.24, 1) both;
}

.image-bingo-shell.names-showing .image-bingo-cell-name {
    animation: imageBingoNamesSweepUp 460ms cubic-bezier(0.18, 1.22, 0.28, 1) both;
}

.image-bingo-shell.hide-names .image-bingo-cell {
    grid-template-rows: 1fr;
    padding-bottom: clamp(5px, 0.55vw, 9px);
}

.image-bingo-shell.hide-names .image-bingo-cell-name {
    display: none;
}

.image-bingo-cell.called {
    border-color: var(--image-bingo-green);
    background: var(--image-bingo-called-cell-background);
    box-shadow: var(--image-bingo-called-cell-shadow);
    transform: translateY(-1px);
}

.image-bingo-cell.called .image-bingo-cell-name {
    color: var(--image-bingo-called-name-color);
    text-shadow: var(--image-bingo-called-name-shadow);
}

.image-bingo-cell.just-called {
    animation: var(--image-bingo-called-cell-animation);
}

.image-bingo-cell.just-called .image-bingo-image-box img {
    animation: var(--image-bingo-called-image-animation);
}

.image-bingo-side {
    min-width: 0;
    min-height: 0;
    border-left: var(--image-bingo-panel-border);
    padding: clamp(2px, 0.35vw, 8px) 0 clamp(4px, 0.45vw, 8px) clamp(8px, 0.85vw, 14px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
    gap: clamp(6px, 0.6vw, 10px);
    container-type: size;
    container-name: image-bingo-side;
}

.image-bingo-side.mounting > * {
    opacity: 0;
    transform: translateX(26px);
}

.image-bingo-side.mounted > * {
    animation: var(--image-bingo-panel-item-animation);
}

.image-bingo-side.mounted > *:nth-child(1) { animation-delay: 0ms; }
.image-bingo-side.mounted > *:nth-child(2) { animation-delay: 90ms; }
.image-bingo-side.mounted > *:nth-child(3) { animation-delay: 170ms; }
.image-bingo-side.mounted > *:nth-child(4) { animation-delay: 250ms; }
.image-bingo-side.mounted > *:nth-child(5) { animation-delay: 330ms; }
.image-bingo-side.mounted > *:nth-child(6) { animation-delay: 410ms; }

.image-bingo-brand {
    text-align: center;
    line-height: 1;
    padding-top: clamp(2px, 0.3vw, 6px);
}

.image-bingo-brand-logo {
    display: block;
    width: auto;
    height: max(52px, 8.5cqh);
    max-width: min(86%, 320px);
    margin: 0 auto;
    filter: var(--image-bingo-brand-logo-filter);
}

.image-bingo-brand-logo.is-custom-logo {
    filter: none;
    object-fit: contain;
}

.image-bingo-brand-sub {
    display: block;
    margin-top: 0.35cqh;
    font-size: max(18px, 4.1cqh);
    font-weight: 1000;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--image-bingo-brand-subtitle-color);
}

.image-bingo-current-card {
    min-height: 0;
    overflow: hidden;
    container-type: size;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: clamp(2px, 0.25vw, 6px);
    padding-bottom: clamp(20px, 1.6vw, 32px);
}

.image-bingo-current-frame {
    flex: 0 0 auto;
    width: min(92%, 100cqh);
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1;
    height: auto;
    border: 5px solid var(--image-bingo-green);
    border-radius: var(--image-bingo-current-frame-radius);
    display: grid;
    place-items: center;
    background: var(--image-bingo-current-frame-background);
    box-shadow: var(--image-bingo-current-frame-shadow);
    position: relative;
    z-index: 0;
    overflow: visible;
}

.image-bingo-current-frame.current-called {
    animation: var(--image-bingo-current-frame-animation);
}

.image-bingo-current-frame img {
    width: 90%;
    height: 90%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: var(--image-bingo-current-image-filter);
}

.image-bingo-current-frame.current-called img {
    animation: var(--image-bingo-current-image-animation);
}

.image-bingo-current-badge {
    position: absolute;
    left: 11%;
    right: 11%;
    bottom: -8px;
    background: var(--image-bingo-current-badge-background);
    color: var(--image-bingo-current-badge-color);
    border-radius: var(--image-bingo-current-badge-radius);
    padding: 5px 8px;
    font-size: clamp(16px, 1.55vw, 26px);
    font-weight: 1000;
    line-height: 1;
    text-align: center;
    box-shadow: var(--image-bingo-current-badge-shadow);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-bingo-current-badge.current-name-long {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 0.92;
}

.image-bingo-current-frame.current-called .image-bingo-current-badge {
    animation: var(--image-bingo-current-badge-animation);
}

.image-bingo-last-area {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 0;
}

.image-bingo-last-title {
    margin: 0 0 0.8cqh;
    font-size: 2.4cqh;
    font-weight: 1000;
    letter-spacing: 0;
}

.image-bingo-last-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(4px, 0.45vw, 10px);
}

.image-bingo-last-item {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-items: center;
}

.image-bingo-last-item.just-entered {
    animation: var(--image-bingo-last-item-animation);
}

.image-bingo-last-item.just-entered .image-bingo-last-item-circle {
    animation: var(--image-bingo-last-circle-animation);
}

.image-bingo-last-item-circle {
    width: min(100%, max(72px, calc(12.3cqh + 2cqh)));
    aspect-ratio: 1;
    border: 2px solid var(--image-bingo-green);
    border-radius: 50%;
    background: var(--image-bingo-last-circle-background);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.image-bingo-last-item-circle img {
    width: 98%;
    height: 98%;
    object-fit: contain;
}

.image-bingo-counter {
    min-height: 48px;
    border: 2px solid var(--image-bingo-line);
    border-radius: 10px;
    background: var(--image-bingo-counter-background);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
}

.image-bingo-counter-text {
    font-size: clamp(14px, 1.3vw, 20px);
    font-weight: 900;
    line-height: 1;
}

.image-bingo-counter-value {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.22em;
    color: var(--image-bingo-ink);
}

.image-bingo-counter-number {
    display: inline-block;
    min-width: 1.15em;
    color: var(--image-bingo-green-dark);
    font-size: clamp(24px, 2.15vw, 34px);
    font-weight: 1000;
    vertical-align: middle;
}

.image-bingo-actions,
.image-bingo-toggle-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.image-bingo-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-bingo-toggle-row {
    grid-template-columns: 1fr;
}

.image-bingo-btn {
    border: 3px solid rgba(255, 255, 255, 0.72);
    border-radius: 12px;
    min-height: 44px;
    color: #ffffff;
    font: inherit;
    font-size: clamp(13px, 1.15vw, 16px);
    font-weight: 1000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 3px rgba(255, 255, 255, 0.24),
        0 4px 0 rgba(9, 108, 122, 0.24),
        0 8px 14px rgba(9, 108, 122, 0.12);
    text-shadow: 0 2px 0 rgba(33, 41, 55, 0.22);
}

.image-bingo-btn.pause {
    background: linear-gradient(180deg, #25d3df 0%, var(--image-bingo-official-cyan) 52%, var(--image-bingo-official-cyan-dark) 100%);
    color: #ffffff;
}

.image-bingo-btn.pause.paused {
    background: linear-gradient(180deg, #29dbe6 0%, var(--image-bingo-official-cyan) 52%, var(--image-bingo-official-cyan-dark) 100%);
    color: #ffffff;
}

.image-bingo-btn.exit {
    background: linear-gradient(180deg, #ff7d91 0%, var(--image-bingo-official-pink) 54%, var(--image-bingo-official-pink-dark) 100%);
}

.image-bingo-btn.toggle {
    color: #ffffff;
    background: linear-gradient(180deg, #26cfd4 0%, var(--image-bingo-official-cyan) 52%, var(--image-bingo-official-cyan-dark) 100%);
    box-shadow:
        inset 0 0 0 3px rgba(255, 255, 255, 0.24),
        0 4px 0 rgba(9, 108, 122, 0.28),
        0 8px 14px rgba(9, 108, 122, 0.12);
    user-select: none;
}

.image-bingo-btn.toggle.active {
    background: linear-gradient(180deg, #28dce6 0%, var(--image-bingo-official-cyan) 52%, var(--image-bingo-official-cyan-dark) 100%);
}

.image-bingo-names-check {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 2px 0 rgba(9, 108, 122, 0.18);
    pointer-events: none;
}

.image-bingo-names-check.checked {
    background: var(--image-bingo-official-pink);
    border-color: var(--image-bingo-official-pink);
}

.image-bingo-names-check.checked::after {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 3px solid #ffffff;
    border-bottom: 3px solid #ffffff;
    transform: rotate(-45deg) translateY(-1px);
}

.image-bingo-names-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-bingo-end-modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 35%, rgba(114, 191, 68, 0.2), transparent 34%),
        rgba(255, 250, 242, 0.92);
}

.image-bingo-tap {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a14 100%);
    cursor: pointer;
    gap: clamp(20px, 4vh, 40px);
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.5s ease;
}

.image-bingo-tap.hiding {
    opacity: 0;
    pointer-events: none;
}

.image-bingo-tap .tap-logo {
    width: clamp(200px, 40vw, 400px);
    height: auto;
    filter: drop-shadow(0 0 20px rgba(26, 188, 245, 0.3));
    animation: imageBingoTapLogoFloat 3s ease-in-out infinite;
}

.image-bingo-tap .tap-text {
    border: 0;
    border-radius: clamp(12px, 2vw, 24px);
    padding: clamp(14px, 2.5vh, 28px) clamp(40px, 8vw, 80px);
    background: linear-gradient(135deg, #ff6b9d, #c850c0, #6c63ff);
    box-shadow: 0 8px 30px rgba(200, 80, 192, 0.4);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: clamp(1.4rem, 3.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: imageBingoTapButtonGlow 2s ease-in-out infinite;
}

.image-bingo-tap .tap-text:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(200, 80, 192, 0.6);
}

.image-bingo-tap .tap-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: clamp(0.75rem, 1.5vw, 0.95rem);
    text-align: center;
}

.demo-end-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    justify-content: center;
    align-items: center;
    padding: clamp(12px, 3vw, 28px);
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.85);
}

.demo-end-modal.active {
    display: flex;
}

.demo-end-modal,
.demo-end-modal * {
    font-family: Nunito, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
}

.demo-end-content {
    width: min(100%, 440px);
    max-height: calc(100vh - clamp(24px, 6vw, 56px));
    overflow-y: auto;
    border-radius: 28px;
    padding: clamp(24px, 4vw, 36px) clamp(18px, 4vw, 28px) clamp(20px, 4vw, 28px);
    text-align: center;
    animation: imageBingoDemoEndSlideUp 0.5s ease;
}

.demo-end-web {
    background: linear-gradient(160deg, #ffffff 0%, #f0f9ff 100%);
    box-shadow: 0 0 0 1px rgba(26, 188, 245, 0.15), 0 25px 80px rgba(0, 0, 0, 0.5);
}

.demo-end-logo {
    width: clamp(82px, 22vw, 112px);
    height: auto;
    margin-bottom: clamp(14px, 3vw, 18px);
}

.demo-end-title {
    margin-bottom: clamp(8px, 2vw, 12px);
    color: #1f2937;
    font-size: clamp(1.45rem, 5.2vw, 1.72rem);
    font-weight: 900;
    line-height: 1.12;
}

.demo-end-subtitle {
    margin-bottom: clamp(18px, 3.2vw, 24px);
    color: #6b7280;
    font-size: clamp(1rem, 3.8vw, 1.08rem);
    font-weight: 800;
    line-height: 1.35;
}

.demo-end-stats {
    display: flex;
    justify-content: center;
    gap: clamp(18px, 5vw, 30px);
    margin-bottom: clamp(18px, 3.6vw, 24px);
}

.demo-end-stat-num {
    color: #1abcf5;
    font-size: clamp(1.65rem, 6vw, 2rem);
    font-weight: 900;
    line-height: 1;
}

.demo-end-stat-label {
    color: #9ca3af;
    font-size: clamp(0.72rem, 2.8vw, 0.82rem);
    font-weight: 900;
    text-transform: uppercase;
}

.demo-end-themes-preview {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: clamp(20px, 4vw, 26px);
}

.demo-end-theme-dot {
    width: clamp(30px, 7.2vw, 38px);
    height: clamp(30px, 7.2vw, 38px);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.demo-end-cta {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: clamp(15px, 3.6vw, 18px) clamp(18px, 4vw, 24px);
    border-radius: 16px;
    background: linear-gradient(135deg, #1abcf5 0%, #0ea5e9 100%);
    box-shadow: 0 4px 0 #0284c7, 0 6px 16px rgba(14, 165, 233, 0.35);
    color: #ffffff;
    font-size: clamp(1.05rem, 4vw, 1.18rem);
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.demo-end-cta-price {
    display: block;
    margin-top: 4px;
    font-size: clamp(0.82rem, 3.2vw, 0.94rem);
    font-weight: 800;
    opacity: 0.9;
}

.demo-end-secondary {
    display: inline-block;
    padding: 12px 20px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: #6b7280;
    cursor: pointer;
    font-size: clamp(0.95rem, 3.4vw, 1.05rem);
    font-weight: 900;
}

.demo-end-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 11px 18px;
    margin-top: clamp(14px, 3vw, 18px);
    padding-top: clamp(14px, 3vw, 18px);
    border-top: 1px solid #e5e7eb;
}

.demo-end-feat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4b5563;
    font-size: clamp(0.86rem, 3vw, 0.95rem);
    font-weight: 850;
    line-height: 1.25;
}

.demo-end-feat svg {
    width: 14px;
    height: 14px;
    color: #10b981;
    flex-shrink: 0;
}

.image-bingo-intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 29;
    display: none;
    place-items: center;
    padding: 24px;
    background: var(--image-bingo-intro-background);
}

.image-bingo-intro-overlay.active {
    display: grid;
}

.image-bingo-intro-container {
    width: min(86vw, 760px);
    min-height: 260px;
    display: grid;
    place-items: center;
}

.image-bingo-intro-loader {
    width: 100%;
    display: grid;
    gap: clamp(20px, 3vw, 34px);
    justify-items: center;
}

.image-bingo-intro-loader-text {
    opacity: 0;
    transform: translateY(12px);
    color: var(--image-bingo-blue);
    font-size: clamp(34px, 4.2vw, 66px);
    font-weight: 1000;
    line-height: 1;
    text-align: center;
    text-shadow: var(--image-bingo-intro-text-shadow);
    transition: opacity 360ms ease, transform 360ms ease;
}

.image-bingo-intro-loader-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.image-bingo-intro-loader-bar-container {
    width: min(100%, 620px);
    height: clamp(24px, 2.6vw, 38px);
    border: var(--image-bingo-loader-border);
    border-radius: 999px;
    padding: 4px;
    background: var(--image-bingo-loader-track);
    box-shadow: var(--image-bingo-loader-shadow);
    overflow: hidden;
    transition: transform 380ms ease, box-shadow 380ms ease;
}

.image-bingo-intro-loader-bar-container.complete {
    transform: scale(1.035);
    box-shadow: var(--image-bingo-loader-complete-shadow);
}

.image-bingo-intro-loader-bar {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    transform: scaleX(0);
    transform-origin: left center;
    background: var(--image-bingo-loader-bar-background);
    box-shadow: var(--image-bingo-loader-bar-shadow);
}

.image-bingo-tap.hidden,
.image-bingo-end-modal.hidden {
    display: none;
}

.image-bingo-tap-card,
.image-bingo-end-card {
    width: min(92vw, 520px);
    border: 2px solid var(--image-bingo-line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--image-bingo-shadow);
    padding: clamp(24px, 4vw, 42px);
    text-align: center;
}

.image-bingo-tap-card h1,
.image-bingo-end-card h2 {
    margin: 0 0 10px;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1;
    color: #18aee6;
}

.image-bingo-tap-card p,
.image-bingo-end-card p {
    margin: 0 0 22px;
    color: var(--image-bingo-muted);
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 800;
}

.image-bingo-primary-link,
.image-bingo-primary-button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 0 24px;
    background: linear-gradient(180deg, #8bd45a, #45ad58);
    color: #ffffff;
    font: inherit;
    font-size: 18px;
    font-weight: 1000;
    text-decoration: none;
    cursor: pointer;
}

@keyframes imageBingoTapLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes imageBingoTapButtonGlow {
    0%, 100% { box-shadow: 0 8px 30px rgba(200, 80, 192, 0.4); }
    50% { box-shadow: 0 8px 40px rgba(200, 80, 192, 0.7); }
}

@keyframes imageBingoPopCell {
    0% { transform: scale(0.96); }
    55% { transform: scale(1.05); }
    100% { transform: translateY(-1px) scale(1); }
}

@keyframes imageBingoStampCell {
    0% {
        transform: translateY(-1px) scale(1) rotate(0deg);
        filter: brightness(1);
    }
    26% {
        transform: translateY(-8px) scale(1.16) rotate(-2.5deg);
        filter: brightness(1.22);
    }
    58% {
        transform: translateY(2px) scale(0.96) rotate(1.4deg);
        filter: brightness(1.06);
    }
    78% {
        transform: translateY(-3px) scale(1.04) rotate(-0.6deg);
    }
    100% {
        transform: translateY(-1px) scale(1) rotate(0deg);
        filter: brightness(1);
    }
}

@keyframes imageBingoMarkedImageKick {
    0% {
        transform: scale(1) rotate(0deg);
    }
    34% {
        transform: scale(1.18) rotate(-3deg);
    }
    66% {
        transform: scale(0.95) rotate(2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes imageBingoCurrentCall {
    0% {
        transform: scale(1) rotate(0deg);
    }
    24% {
        transform: scale(1.08) rotate(-1.4deg);
    }
    55% {
        transform: scale(0.97) rotate(0.9deg);
    }
    76% {
        transform: scale(1.025) rotate(-0.35deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes imageBingoCurrentImageBounce {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    32% {
        transform: translateY(-9px) scale(1.12) rotate(-2deg);
    }
    62% {
        transform: translateY(5px) scale(0.98) rotate(1.2deg);
    }
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

@keyframes imageBingoCurrentBadgeSnap {
    0% {
        transform: translateY(0) scale(1);
    }
    36% {
        transform: translateY(-7px) scale(1.08);
    }
    70% {
        transform: translateY(2px) scale(0.98);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes imageBingoLastEnter {
    0% {
        opacity: 0;
        transform: translateY(-16px) scale(0.72) rotate(-8deg);
    }
    56% {
        opacity: 1;
        transform: translateY(3px) scale(1.1) rotate(3deg);
    }
    78% {
        transform: translateY(-2px) scale(0.98) rotate(-1deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

@keyframes imageBingoLastCirclePop {
    0% {
        box-shadow: 0 0 0 0 rgba(114, 191, 68, 0);
    }
    45% {
        box-shadow: 0 0 0 10px rgba(114, 191, 68, 0.18);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(114, 191, 68, 0);
    }
}

@keyframes imageBingoDemoEndSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes imageBingoMountCell {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.72);
    }
    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.04);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes imageBingoMountPanelItem {
    0% {
        opacity: 0;
        transform: translateX(26px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes imageBingoNamesSweepDown {
    0% {
        opacity: 1;
        clip-path: inset(0 0 0 0 round 3px);
        transform: translateY(0) scaleY(1);
    }
    42% {
        opacity: 1;
        clip-path: inset(0 0 12% 0 round 3px);
        transform: translateY(3px) scaleY(0.98);
    }
    72% {
        opacity: 0.5;
        clip-path: inset(38% 0 0 0 round 3px);
        transform: translateY(10px) scaleY(0.78);
    }
    100% {
        opacity: 0;
        clip-path: inset(100% 0 0 0 round 3px);
        transform: translateY(18px) scaleY(0.54);
    }
}

@keyframes imageBingoNamesSweepUp {
    0% {
        opacity: 0;
        clip-path: inset(0 0 100% 0 round 3px);
        transform: translateY(16px) scaleY(0.6);
    }
    54% {
        opacity: 1;
        clip-path: inset(0 0 0 0 round 3px);
        transform: translateY(-4px) scaleY(1.06);
    }
    76% {
        opacity: 1;
        transform: translateY(2px) scaleY(0.98);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0 round 3px);
        transform: translateY(0) scaleY(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .image-bingo-cell.just-called,
    .image-bingo-cell.just-called .image-bingo-image-box img,
    .image-bingo-current-frame.current-called,
    .image-bingo-current-frame.current-called img,
    .image-bingo-current-frame.current-called .image-bingo-current-badge,
    .image-bingo-last-item.just-entered,
    .image-bingo-last-item.just-entered .image-bingo-last-item-circle,
    .image-bingo-shell.names-hiding .image-bingo-cell-name,
    .image-bingo-shell.names-showing .image-bingo-cell-name {
        animation-duration: 1ms;
        animation-iteration-count: 1;
    }
}

@media (max-width: 1200px) {
    .image-bingo-cell {
        grid-template-rows: 1fr;
        padding: clamp(4px, 0.5vw, 8px);
    }

    .image-bingo-cell-name {
        display: none;
    }

    .image-bingo-image-box {
        place-items: center;
    }

    .image-bingo-image-box img {
        object-fit: cover;
        object-position: center;
    }
}

@media (max-height: 800px) {
    .image-bingo-last-item-circle {
        width: min(100%, max(72px, calc(16.1cqh + 2cqh)));
    }
}

@media (max-width: 920px) {
    .image-bingo-page {
        overflow: auto;
    }

    .image-bingo-shell {
        height: auto;
        min-height: 100vh;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        overflow: visible;
    }

    .image-bingo-board-wrap {
        aspect-ratio: 1 / 1;
    }

    .image-bingo-side {
        border-left: 0;
        border-top: 2px solid rgba(239, 217, 187, 0.82);
        padding: 12px 0 0;
        grid-template-rows: auto auto auto auto auto;
    }

    .image-bingo-brand {
        order: 20;
        padding-top: clamp(16px, 4vw, 28px);
        padding-bottom: clamp(4px, 1.5vw, 12px);
    }

    .image-bingo-current-frame {
        flex: 0 0 auto;
        width: min(50%, 224px);
        height: auto;
        aspect-ratio: 1;
    }

    .image-bingo-current-badge {
        display: none;
    }
}

@media (max-width: 520px) {
    .image-bingo-brand-logo {
        width: auto;
        height: max(44px, 8.5cqh);
        max-width: min(70%, 220px);
    }

    .image-bingo-brand-sub {
        font-size: max(16px, 4.1cqh);
    }

    .image-bingo-current-frame {
        width: min(40%, 188px);
    }

    .image-bingo-shell {
        padding: 8px;
        gap: 10px;
    }

    .image-bingo-board-wrap {
        border-radius: 14px;
        padding: 5px;
    }

    .image-bingo-board {
        gap: 4px;
    }

    .image-bingo-cell {
        border-radius: 7px;
        padding: 3px 2px 2px;
    }

    .image-bingo-cell-name {
        font-size: clamp(9px, 2.65vw, 12px);
    }

    .image-bingo-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .image-bingo-toggle-row {
        grid-template-columns: 1fr;
    }
}
