/* Extra Life 2026 dragon fight. Loaded only on /extra-life-2026/. The scene is always dark, because the art
   is. Everything below it stays in the site's cards so light and dark themes follow. */
.el-scene {
    --el-ember: #f58a1f;
    --el-molten: #c8330e;
    --el-gold: #d9a93a;
    --el-heal: #5fd0ae;
    --el-bone: #efe8d8;
    --el-iron: #14161b;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1200 / 805;
    max-height: 72vh;
    width: 100%;
    margin-bottom: 12px;
    border-radius: 6px;
    background: var(--el-iron);
    color: var(--el-bone);
}

.el-scene.is-struck .el-dragon.is-current {
    animation: el-struck 280ms ease-out;
}

.el-dragon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 500ms ease;
}

.el-dragon.is-current {
    opacity: 1;
}

.el-boss {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 56px 24px 20px;
    background: linear-gradient(to bottom, rgba(10, 11, 14, 0), rgba(10, 11, 14, 0.88) 55%);
}

.el-boss-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0 16px;
    margin-bottom: 6px;
}

.el-scene .el-boss-name {
    margin: 0;
    color: var(--el-bone);
    font-family: 'Almendra', Georgia, serif;
    font-size: clamp(1.25rem, 3.4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 2px 6px #000;
}

.el-boss-hp {
    color: var(--el-bone);
    font-size: clamp(0.85rem, 1.8vw, 1.1rem);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 4px #000;
}

.el-bar {
    position: relative;
    height: clamp(10px, 1.6vw, 16px);
    overflow: hidden;
    border: 1px solid var(--el-gold);
    border-radius: 2px;
    background: #0a0b0e;
    box-shadow: 0 0 0 1px #000, inset 0 1px 3px #000;
}

.el-bar-fill,
.el-bar-lag {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
}

.el-bar-fill {
    background: linear-gradient(to right, var(--el-molten), var(--el-ember));
    transition: width 800ms ease-out, background 200ms linear;
}

/* The chunk just lost lingers behind the bar before it falls away. */
.el-bar-lag {
    background: var(--el-bone);
    opacity: 0.55;
    transition: width 800ms ease-in 800ms;
}

.el-scene.is-healing .el-bar-fill {
    background: var(--el-heal);
}

.el-scene.is-healing .el-bar {
    box-shadow: 0 0 14px var(--el-heal);
}

.el-floats {
    position: absolute;
    top: 34%;
    left: 50%;
    pointer-events: none;
}

.el-float {
    position: absolute;
    transform: translateX(-50%);
    color: var(--el-ember);
    font-family: 'Almendra', Georgia, serif;
    font-size: clamp(1.4rem, 4.5vw, 3rem);
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 2px 8px #000, 0 0 2px #000;
    animation: el-float 1500ms ease-out forwards;
}

.el-float.is-heal {
    color: var(--el-heal);
}

.el-callouts {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    max-width: min(460px, calc(100% - 28px));
}

.el-callout {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid rgba(217, 169, 58, 0.6);
    border-radius: 4px;
    background: rgba(10, 11, 14, 0.82);
    font-size: 0.9rem;
    line-height: 1.3;
    animation: el-callout 220ms ease-out;
}

.el-callout:not(:last-child) {
    opacity: 0.72;
}

.el-scene .el-callout .el-line-name {
    margin: 0;
    color: var(--el-gold);
}

.el-callout .el-kind,
.el-callout .el-arrival {
    display: none;
}

.el-skip {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 10px;
    border: 0;
    border-radius: 3px;
    background: rgba(10, 11, 14, 0.7);
    color: var(--el-bone);
    font-size: 0.8rem;
    text-decoration: underline;
    cursor: pointer;
}

.el-skip[hidden] {
    display: none;
}

.el-skip:focus-visible {
    outline: 2px solid var(--el-gold);
    outline-offset: 2px;
}

.el-status {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

[data-el-status].is-waiting {
    visibility: hidden;
}

.el-log,
.el-fundraisers {
    margin: 0;
    padding: 0;
    list-style: none;
}

.el-line {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
}

.el-line + .el-line {
    border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.el-line.is-waiting {
    display: none;
}

.el-line-text {
    align-self: center;
}

.el-line-name {
    margin-bottom: 2px;
    font-weight: 700;
}

.el-kind {
    font-weight: 400;
}

.el-line-heal .el-line-text,
.el-line-slain .el-line-text {
    font-weight: 600;
}

.el-portrait {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.el-portrait-blank {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(128, 128, 128, 0.15);
    font-size: 1.15rem;
}

.el-line-heal .el-portrait-blank {
    color: #1c9c78;
}

.el-line-slain .el-portrait-blank,
.el-line-hit .el-portrait-blank {
    color: #c8330e;
}

.el-line-bonus .el-portrait-blank {
    color: #b98a1c;
}

.el-callout .el-portrait {
    width: 44px;
    height: 44px;
    color: var(--el-gold);
}

.el-fundraisers li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
}

.el-fundraisers li + li {
    border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.el-milestones {
    position: relative;
    height: 64px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

/* Each mark's right edge lines up under its dollar amount on the bar. */
.el-mark {
    position: absolute;
    top: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    transform: translateX(-100%);
}

.el-mark::before {
    content: "";
    position: absolute;
    top: -8px;
    right: 0;
    width: 1px;
    height: 8px;
    background: rgba(128, 128, 128, 0.6);
}

.el-mark-face {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(128, 128, 128, 0.4);
    border-radius: 50%;
    background: rgba(128, 128, 128, 0.15);
    color: rgba(128, 128, 128, 0.9);
    font-size: 0.8rem;
    object-fit: cover;
}

.el-mark.is-called .el-mark-face {
    border-color: #d9a93a;
}

.el-mark.is-next .el-mark-face {
    border: 2px solid #d9a93a;
    color: #d9a93a;
}

.el-mark-label {
    margin-top: 2px;
    font-size: 0.72rem;
    line-height: 1.2;
}

.el-lore h6 {
    margin-top: 16px;
    margin-bottom: 4px;
    font-family: 'Almendra', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
}

@media (max-width: 575px) {
    .el-scene {
        max-height: none;
    }

    .el-boss {
        padding: 32px 12px 10px;
    }

    .el-callouts {
        top: 8px;
        left: 8px;
        max-width: calc(100% - 16px);
    }

    .el-callout {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    /* More than one covers the dragon on a phone. The battle log below keeps them all. */
    .el-callout:not(:last-child) {
        display: none;
    }

    .el-callout .el-portrait {
        width: 30px;
        height: 30px;
    }

    .el-skip {
        top: auto;
        right: 8px;
        bottom: 52px;
    }
}

@keyframes el-float {
    from { opacity: 0; transform: translate(-50%, 12px); }
    15% { opacity: 1; }
    to { opacity: 0; transform: translate(-50%, -64px); }
}

@keyframes el-callout {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

@keyframes el-struck {
    0%, 100% { transform: none; }
    25% { transform: translateX(-5px); }
    60% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
    .el-dragon,
    .el-bar-fill,
    .el-bar-lag {
        transition: none;
    }
}
