.battle-log-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.battle-log-header img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.battle-log-header-text h2 {
    margin: 0;
}

.battle-log-meta {
    margin-top: 4px;
    font-size: 14px;
    opacity: 0.85;
}

.battle-result.win {
    color: #3ecf8e;
}

.battle-result.lose {
    color: #ff5f5f;
}

.battle-result.neutral {
    color: #aaa;
}

.battle-date {
    margin-left: 12px;
    font-size: 13px;
}

.battle-mode-meta {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.battle-mode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(82, 51, 105, 0.28);
    border: 1px solid rgba(82, 51, 105, 0.72);
    color: #f3e2fe;
}

.battle-mode-badge.is-normal {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.battle-mode-badge.is-competitive {
    background: rgba(152, 0, 255, 0.18);
    border-color: rgba(152, 0, 255, 0.45);
}

.battle-vs-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.battle-card {
    width: 150px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #523369;
    background: var(--skeleton-card-bg);
    text-align: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.battle-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(82, 51, 105, 0.6);
}

.card-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #523369;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-name {
    font-weight: 600;
    margin-bottom: 6px;
}

.card-elo {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 16px;
}

.battle-card.winner {
    border: 1px solid #9800ff;
    background: linear-gradient(145deg, #2a1040, #1a0830);
    box-shadow: 0 0 18px rgba(152, 0, 255, 0.5);
}

.battle-card.loser {
    border: 1px solid #523369;
    background: linear-gradient(145deg, #1a0f20, #120816);
}

.battle-card.winner .card-elo {
    background: rgba(152, 0, 255, 0.25);
    color: #ffffff;
    border: 1px solid #9800ff;
    transform: translateY(-1px);
}

.battle-card.loser .card-elo {
    background: rgba(82, 51, 105, 0.25);
    color: #ffffff;
    border: 1px solid #523369;
}

.card-elo.elo-zero {
    color: #888;
}

@keyframes battleGlowPulse {
    from {
        box-shadow: 0 0 10px rgba(152, 0, 255, 0.4);
    }

    to {
        box-shadow: 0 0 25px rgba(152, 0, 255, 0.9);
    }
}

#page-battle-log .content {
    background: #000 !important;
}

.battle-log-section {
    margin-top: 22px;
}

.battle-log-body {
    width: 80%;
    margin: 0 auto;
    font-size: 20px;
    line-height: 1.8;
    white-space: normal;
}

.battle-log-body br {
    display: block;
    content: "";
    margin: 0.6em 0;
}

.inline-tail-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.34em;
    vertical-align: -0.08em;
}

.inline-tail-spinner__ring {
    width: 0.82em;
    height: 0.82em;
    border-radius: 999px;
    border: 1.6px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.9);
    animation: battleInlineSpin 0.8s linear infinite;
}

@keyframes battleInlineSpin {
    to {
        transform: rotate(360deg);
    }
}

.battle-image-slot {
    position: relative;
    width: min(100%, 720px);
    aspect-ratio: 16 / 10;
    margin: 8px auto 20px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(152, 0, 255, 0.28);
    background: linear-gradient(160deg, rgba(28, 12, 40, 0.96), rgba(12, 8, 18, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.battle-image-slot__inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.battle-image-slot__skeleton {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.05), transparent 34%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.04), transparent 26%),
        linear-gradient(145deg, var(--skeleton-surface-1), var(--skeleton-surface-2));
}

.battle-image-slot__skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 24%,
        rgba(255, 255, 255, 0.04) 42%,
        rgba(255, 255, 255, 0.10) 50%,
        rgba(255, 255, 255, 0.04) 58%,
        transparent 76%
    );
    transform: translateX(-120%);
    animation: battleImageShimmer 2s ease-in-out infinite;
}

.battle-image-slot__preview {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.battle-image-slot__preview-glow {
    position: absolute;
    inset: 16px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05), transparent 26%),
        radial-gradient(circle at 70% 68%, rgba(255, 255, 255, 0.04), transparent 20%);
}

.battle-image-slot__preview-card,
.battle-image-slot__preview-slash,
.battle-image-slot__preview-caption {
    position: absolute;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.battle-image-slot__preview-card::after,
.battle-image-slot__preview-slash::after,
.battle-image-slot__preview-caption::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 24%,
        rgba(255, 255, 255, 0.05) 42%,
        rgba(255, 255, 255, 0.11) 50%,
        rgba(255, 255, 255, 0.05) 58%,
        transparent 76%
    );
    transform: translateX(-120%);
    animation: battleImageShimmer 2.2s ease-in-out infinite;
}

.battle-image-slot__preview-card {
    top: 18%;
    width: 24%;
    height: 48%;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.battle-image-slot__preview-card--left {
    left: 16%;
    transform: rotate(-7deg);
}

.battle-image-slot__preview-card--right {
    right: 16%;
    transform: rotate(7deg);
}

.battle-image-slot__preview-slash {
    top: 24%;
    width: 10px;
    height: 34%;
    border-radius: 999px;
    transform: rotate(22deg);
    background: rgba(255, 255, 255, 0.10);
}

.battle-image-slot__preview-caption {
    bottom: 14%;
    width: 44%;
    height: 16px;
    border-radius: 999px;
}

.battle-image-slot__preview--static .battle-image-slot__preview-card::after,
.battle-image-slot__preview--static .battle-image-slot__preview-slash::after,
.battle-image-slot__preview--static .battle-image-slot__preview-caption::after,
.battle-image-slot--idle .battle-image-slot__skeleton::after,
.battle-image-slot--pending .battle-image-slot__skeleton::after {
    animation: none;
    transform: none;
    opacity: 0;
}

.battle-image-slot__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 24px;
    text-align: center;
}

.battle-image-slot__eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.battle-image-slot__title {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.battle-image-slot__desc {
    max-width: 380px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.6;
}

.battle-image-slot__button {
    margin-top: 6px;
    min-width: 220px;
    padding: 12px 18px;
    border: 1px solid #9800ff;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(46, 20, 69, 0.96), rgba(27, 14, 42, 0.96));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.battle-image-slot__button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(152, 0, 255, 0.24);
}

.battle-image-slot__button:disabled {
    opacity: 0.65;
    cursor: default;
    transform: none;
    box-shadow: none;
}


.battle-image-slot--idle .battle-image-slot__title {
    color: #ffffff;
}

.battle-image-slot--pending .battle-image-slot__title {
    color: #efe7ff;
}

.battle-image-slot--error {
    border-color: rgba(255, 111, 111, 0.28);
    background: linear-gradient(160deg, rgba(42, 16, 23, 0.96), rgba(14, 8, 12, 0.98));
}

.battle-image-slot--error .battle-image-slot__skeleton {
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 95, 95, 0.14), transparent 34%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.04), transparent 26%),
        linear-gradient(145deg, rgba(40, 18, 24, 0.92), rgba(17, 11, 15, 0.98));
}

.battle-image-slot--error .battle-image-slot__button {
    border-color: rgba(255, 111, 111, 0.65);
    background: linear-gradient(145deg, rgba(66, 24, 35, 0.96), rgba(40, 14, 21, 0.96));
}

.battle-image-slot--done {
    border-color: rgba(152, 0, 255, 0.4);
    background: #09070f;
}

.battle-image-slot__media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes battleImageShimmer {
    to {
        transform: translateX(120%);
    }
}


.battle-ending-emphasis {
    display: inline-block;
    margin: 0.5em 0 0.15em;
    padding: 0.42em 0.72em;
    border-radius: 12px;
    border: 1px solid rgba(82, 51, 105, 0.55);
    background: linear-gradient(180deg, rgba(82, 51, 105, 0.12), rgba(82, 51, 105, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.96);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.battle-ending-emphasis .story-em,
.battle-ending-emphasis .story-skill,
.battle-ending-emphasis .story-talk {
    font-weight: 800;
}


.battle-log-loading {
    width: min(100%, 820px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.battle-log-loading__vs {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.battle-log-loading__card {
    width: 150px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--skeleton-border-strong);
    background: var(--skeleton-card-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.battle-log-loading__avatar {
    width: 100px;
    height: 100px;
    border-radius: 999px;
}

.battle-log-loading__image {
    width: min(100%, 720px);
    aspect-ratio: 16 / 10;
    margin: 0 auto;
    border-radius: 18px;
    border: 1px solid var(--skeleton-border);
}

.battle-log-loading__body {
    width: 80%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.battle-log-loading__line {
    border-radius: 999px;
}

.battle-log-loading__line--name {
    width: 82px;
    height: 14px;
}

.battle-log-loading__line--elo {
    width: 58px;
    height: 28px;
}

.battle-log-loading__line--story {
    height: 18px;
}

.battle-log-loading__line--story-1 { width: 92%; }
.battle-log-loading__line--story-2 { width: 88%; }
.battle-log-loading__line--story-3 { width: 96%; }
.battle-log-loading__line--story-4 { width: 78%; }
.battle-log-loading__line--story-5 { width: 90%; }
.battle-log-loading__line--story-6 { width: 66%; }

.battle-log-loading__shimmer {
    position: relative;
    overflow: hidden;
    background: var(--skeleton-block-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.battle-log-loading__shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 24%,
        rgba(255, 255, 255, 0.04) 42%,
        rgba(255, 255, 255, 0.10) 50%,
        rgba(255, 255, 255, 0.04) 58%,
        transparent 76%
    );
    transform: translateX(-120%);
    animation: battleLogSkeletonShimmer 1.8s ease-in-out infinite;
}

@keyframes battleLogSkeletonShimmer {
    to {
        transform: translateX(120%);
    }
}


.battle-image-slot__model-picker {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 6, 14, 0.72);
    backdrop-filter: blur(10px);
}

.battle-image-slot__model-toggle {
    min-width: 60px;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.battle-image-slot__model-toggle.is-active {
    background: rgba(152, 0, 255, 0.24);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(152, 0, 255, 0.36);
}

.battle-image-slot__model-toggle:disabled {
    opacity: 0.6;
    cursor: default;
}

.battle-image-slot__mode-status {
    margin: -2px 0 2px;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.66);
}

.battle-image-slot__loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.battle-image-slot__spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top-color: rgba(255, 255, 255, 0.92);
    animation: battleInlineSpin 0.8s linear infinite;
}

.battle-card.is-deleted {
    border-color: rgba(156, 38, 54, 0.82);
}

.card-image.is-deleted img {
    filter: grayscale(1) contrast(0.92) brightness(0.82);
}

.card-image__deleted-tag {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(78, 8, 18, 0.82);
    border: 1px solid rgba(176, 44, 63, 0.78);
    color: #ff7b8e;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    z-index: 2;
    white-space: nowrap;
}


/* ===============================
   BATTLE IMAGE SLOT - FINAL MINIMAL BLACK UI
=============================== */
.battle-image-slot,
.battle-image-slot--idle,
.battle-image-slot--pending,
.battle-image-slot--error,
.battle-image-slot--locked {
    position: relative;
    width: min(100%, 720px);
    aspect-ratio: 16 / 10;
    margin: 8px auto 20px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(152, 0, 255, 0.28);
    background: #07070b !important;
    box-shadow: none !important;
}

.battle-image-slot__inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: #07070b !important;
}

.battle-image-slot__skeleton,
.battle-image-slot__preview,
.battle-image-slot__preview-glow,
.battle-image-slot__eyebrow,
.battle-image-slot__desc,
.battle-image-slot__mode-status {
    display: none !important;
}

.battle-image-slot__skeleton::before,
.battle-image-slot__skeleton::after,
.battle-image-slot__preview-card::after,
.battle-image-slot__preview-slash::after,
.battle-image-slot__preview-caption::after {
    content: none !important;
    display: none !important;
    animation: none !important;
    background: none !important;
}

.battle-image-slot__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    padding: 22px;
    text-align: center;
    background: transparent !important;
}

.battle-image-slot__button {
    min-width: 0;
    margin: 0;
    padding: 13px 24px;
    border: 1px solid rgba(152, 0, 255, 0.82);
    border-radius: 14px;
    background: #190425 !important;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    cursor: pointer;
    box-shadow: none !important;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.battle-image-slot__button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #21052f !important;
    border-color: #9800ff;
    box-shadow: none !important;
}

.battle-image-slot__button:disabled {
    opacity: 0.48;
    cursor: default;
    transform: none;
    box-shadow: none !important;
}

.battle-image-slot__model-picker {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 54px;
    height: 18px;
    gap: 0;
    padding: 2px;
    border-radius: 999px;
    border: 1px solid rgba(152, 0, 255, 0.28);
    background: #030306 !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
}

.battle-image-slot__model-toggle {
    min-width: 0 !important;
    width: 100%;
    height: 100%;
    padding: 0 !important;
    border: 0;
    border-radius: 999px;
    background: transparent !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0;
    cursor: pointer;
    box-shadow: none !important;
    transition: background 0.16s ease, opacity 0.16s ease;
}

.battle-image-slot__model-toggle.is-active {
    background: #36104d !important;
    box-shadow: none !important;
}

.battle-image-slot__model-toggle:disabled {
    opacity: 0.65;
    cursor: default;
}

.battle-image-slot__model-cost {
    position: absolute;
    top: 38px;
    right: 15px;
    z-index: 2;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.battle-image-slot__model-name {
    color: rgba(255, 255, 255, 0.7);
}

.battle-image-slot__model-cost .resource-inline {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.battle-image-slot__model-cost .resource-inline-icon {
    width: 12px;
    height: 12px;
}

.battle-image-slot__model-cost .resource-inline-multiplier,
.battle-image-slot__model-cost .resource-inline-value {
    color: rgba(255, 255, 255, 0.7);
}

.battle-image-slot__loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.battle-image-slot__spinner {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.88);
    animation: battleInlineSpin 0.78s linear infinite;
}

.battle-image-slot__title {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.battle-image-slot__error-reason {
    max-width: 78%;
    margin: 2px 0 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
    line-height: 1.5;
    word-break: keep-all;
}

.battle-image-slot__locked-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.battle-image-slot--done {
    border-color: rgba(152, 0, 255, 0.4);
    background: #07070b !important;
}

.battle-image-slot__media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
