/* Movimento leve para o telão e os computadores das equipes. */
.ibg-app {
    --copa-ease: cubic-bezier(.22, .72, .24, 1);
}

.ibg-sound {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    gap: 7px;
    min-width: 43px;
    min-height: 43px;
    padding: 5px 10px;
    border: 1px solid #9dc9e277;
    border-radius: 10px;
    color: #d9eaff;
    background: #153653;
    font-size: 13px;
    font-weight: 750;
}

.ibg-sound > span:first-child {
    font-size: 17px;
    line-height: 1;
}

.ibg-sound:hover {
    background: #245879;
}

.ibg-sound[aria-pressed="true"] {
    border-color: #ffe2a6a8;
    color: #fff1bc;
    background: #513b24;
}

.ibg-sound:focus-visible {
    outline: 3px solid #fff0a4;
    outline-offset: 3px;
}

@media (max-width: 500px) {
    .ibg-screen .ibg-screen-tools { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
    .ibg-screen .ibg-brand { gap: 7px; font-size: 12px; }
    .ibg-screen .ibg-brand small { display: block; font-size: 10px; }
    .ibg-screen .ibg-fullscreen { width: 40px; height: 40px; font-size: 21px; }
    .ibg-sound { min-width: 40px; min-height: 40px; padding: 4px; }
    .ibg-sound > span + span {
        position: absolute;
        width: 1px;
        height: 1px;
        clip-path: inset(50%);
        overflow: hidden;
        white-space: nowrap;
    }
}

.ibg-wait-panel,
.ibg-pin-card,
.ibg-screen[data-screen-type="general"] .ibg-ranking-panel {
    position: relative;
    isolation: isolate;
}

.ibg-wait-panel[data-wait-kind="lobby"]::before,
.ibg-pin-card::before,
.ibg-screen[data-screen-type="general"][data-copa-phase="lobby"] .ibg-ranking-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 16% 22%, #65d5ec40, transparent 46%),
        radial-gradient(ellipse at 91% 86%, #956cf534, transparent 50%),
        radial-gradient(circle at 8% 26%, #ffefc9 0 1px, transparent 2.5px),
        radial-gradient(circle at 28% 11%, #beedf9 0 1.5px, transparent 3px),
        radial-gradient(circle at 38% 30%, #ffefc9 0 1px, transparent 2.5px),
        radial-gradient(circle at 76% 13%, #beedf9 0 1px, transparent 2px),
        radial-gradient(circle at 91% 24%, #ffefc9 0 1px, transparent 2.5px),
        radial-gradient(circle at 86% 77%, #dbccff 0 1.5px, transparent 3px),
        radial-gradient(circle at 64% 88%, #f5dc9b 0 1px, transparent 2.5px);
    opacity: .55;
}

.ibg-pin-card::before {
    background:
        radial-gradient(ellipse at 50% 3%, #f1c56c37, transparent 47%),
        radial-gradient(circle at 24% 12%, #ffefc9 0 1px, transparent 2.5px),
        radial-gradient(circle at 75% 9%, #beedf9 0 1.5px, transparent 3px),
        radial-gradient(circle at 68% 21%, #ffefc9 0 1px, transparent 2.5px),
        radial-gradient(circle at 29% 23%, #dbccff 0 1px, transparent 2px);
}

.ibg-screen[data-screen-type="general"][data-copa-phase="lobby"] .ibg-ranking-panel::before {
    background:
        radial-gradient(ellipse at 36% 0%, #65d5ec32, transparent 48%),
        radial-gradient(ellipse at 91% 86%, #956cf521, transparent 45%);
}

.ibg-app[data-copa-ready="true"] .ibg-wait-panel[data-wait-kind="lobby"] {
    border-color: #9df2c37d;
}

.ibg-app[data-copa-ready="true"] .ibg-wait-presence {
    border-color: #9df2c3b5;
    background: #0d3039;
    box-shadow: 0 0 24px #73e5cd1b, inset 0 1px #ffffff23;
}

.ibg-app[data-copa-ready="true"] .ibg-wait-presence strong {
    color: #acf8d5;
}

.ibg-answer:nth-child(1) { --copa-option: #97d9ff; --copa-letter-bg: #183d5d; }
.ibg-answer:nth-child(2) { --copa-option: #dac4ff; --copa-letter-bg: #342d57; }
.ibg-answer:nth-child(3) { --copa-option: #f9d88a; --copa-letter-bg: #493821; }
.ibg-answer:nth-child(4) { --copa-option: #9aead8; --copa-letter-bg: #183f44; }
.ibg-answer:nth-child(5) { --copa-option: #ffb8a9; --copa-letter-bg: #493341; }

.ibg-answer:not([data-selected="true"], [data-correct="true"], [data-wrong="true"]) .ibg-answer-letter {
    color: var(--copa-option, var(--ibg-cyan));
    background: var(--copa-letter-bg, #09203c);
    border-color: color-mix(in srgb, var(--copa-option, #a9dbf0) 65%, transparent);
}

.ibg-app[data-copa-phase="reveal"] .ibg-kicker[data-ibg-question-label] {
    color: var(--ibg-green);
}

.ibg-app[data-copa-phase="finished"] .ibg-ranking-panel,
.ibg-wait-panel[data-wait-kind="finished"] {
    background: radial-gradient(ellipse at 16% 0%, #e2a24829, transparent 48%),
                linear-gradient(148deg, #193650, #0b1d35 74%);
    border-color: #ffe09c83;
}

.ibg-app[data-copa-phase="finished"] .ibg-team-list > .ibg-team-row:first-child {
    border-color: #f5cf79bd;
    background: linear-gradient(100deg, #423121, #17354c 75%);
    box-shadow: 0 0 18px #efc57526, inset 0 1px #ffe2a531;
}

.ibg-app[data-copa-phase="finished"] .ibg-team-list > .ibg-team-row:first-child .ibg-team-points {
    color: #ffe8b3;
}

@keyframes copa-light-drift {
    0%, 100% { opacity: .46; }
    50% { opacity: .92; }
}

@keyframes copa-emblem-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes copa-enter {
    from { opacity: .56; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes copa-label-in {
    from { opacity: .6; transform: translateX(-6px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes copa-option-in {
    from { opacity: .73; translate: 0 7px; }
    to { opacity: 1; translate: 0 0; }
}

@keyframes copa-correct {
    0%, 100% { box-shadow: inset 0 0 0 1px #a8f8c670; }
    32% { box-shadow: inset 0 0 0 1px #a8f8c6, 0 0 22px #64dea85e; }
}

@keyframes copa-presence-light {
    0%, 100% { box-shadow: 0 0 10px #8dffc74d; }
    50% { box-shadow: 0 0 0 3px #8dffc724, 0 0 12px #8dffc78c; }
}

@keyframes copa-champion-gleam {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: no-preference) {
    .ibg-wait-panel[data-wait-kind="lobby"]::before,
    .ibg-pin-card::before,
    .ibg-screen[data-screen-type="general"][data-copa-phase="lobby"] .ibg-ranking-panel::before {
        animation: copa-light-drift 8s ease-in-out infinite;
    }

    .ibg-wait-panel[data-wait-kind="lobby"] .ibg-wait-lamp,
    .ibg-pin-lamp {
        animation: copa-emblem-float 6s ease-in-out infinite;
    }

    .ibg-app[data-copa-phase="lobby"] .ibg-presence-team[data-online="true"]::before,
    .ibg-app[data-copa-phase="lobby"] .ibg-team-status[data-online="true"]::before {
        animation: copa-presence-light 3s ease-in-out infinite;
    }

    .ibg-playing-transition[data-copa-phase="question"] :is(.ibg-question-panel, .ibg-screen-question) h2,
    .ibg-playing-transition[data-copa-phase="lobby"] .ibg-wait-intro h2,
    .ibg-playing-transition[data-copa-phase="lobby"] .ibg-wait-presence,
    .ibg-playing-transition[data-copa-phase="score"] .ibg-section-title,
    .ibg-playing-transition[data-copa-phase="finished"] [data-ibg-phase-note],
    .ibg-playing-transition[data-copa-phase="finished"] [data-ibg-wait-title] {
        animation: copa-enter .48s var(--copa-ease);
    }

    .ibg-playing-transition:is([data-copa-phase="question"], [data-copa-phase="reveal"]) [data-ibg-question-label] {
        animation: copa-label-in .36s var(--copa-ease);
    }

    .ibg-playing-transition[data-copa-phase="question"] .ibg-answer {
        animation: copa-option-in .39s var(--copa-ease) both;
    }
    .ibg-playing-transition[data-copa-phase="question"] .ibg-answer:nth-child(2) { animation-delay: .035s; }
    .ibg-playing-transition[data-copa-phase="question"] .ibg-answer:nth-child(3) { animation-delay: .07s; }
    .ibg-playing-transition[data-copa-phase="question"] .ibg-answer:nth-child(4) { animation-delay: .105s; }
    .ibg-playing-transition[data-copa-phase="question"] .ibg-answer:nth-child(5) { animation-delay: .14s; }

    .ibg-playing-transition[data-copa-phase="reveal"] .ibg-answer[data-correct="true"] {
        animation: copa-correct .85s var(--copa-ease);
    }

    .ibg-playing-transition[data-copa-phase="finished"] .ibg-team-list > .ibg-team-row:first-child::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background: linear-gradient(100deg, transparent 27%, #ffe2a448 51%, transparent 72%);
        animation: copa-champion-gleam 1.05s ease-out both;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ibg-timer[data-urgent="true"] { animation: none; }
}
