.battle-page-shell {
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 208, 44, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(122, 199, 76, 0.14), transparent 22%),
        linear-gradient(180deg, #f7f0ff 0%, #f3f2f8 42%, #f5f5f5 100%);
}

.battle-page-backdrop {
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    pointer-events: none;
}

.battle-page-backdrop-left {
    width: 420px;
    height: 420px;
    top: 160px;
    left: -120px;
    background: radial-gradient(circle, rgba(176, 87, 197, 0.18), rgba(176, 87, 197, 0));
}

.battle-page-backdrop-right {
    width: 460px;
    height: 460px;
    top: 120px;
    right: -160px;
    background: radial-gradient(circle, rgba(99, 144, 240, 0.16), rgba(99, 144, 240, 0));
}

.battle-page-layout {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 220px 24px 80px;
}

.battle-page-header {
    text-align: center;
}

.battle-page-kicker {
    margin: 0 0 12px;
    color: rgba(67, 26, 103, 0.72);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.battle-page-header h1 {
    margin: 0;
    color: var(--dark-purple);
    font-size: clamp(40px, 5vw, 62px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.battle-page-subtitle {
    margin: 18px auto 0;
    max-width: 760px;
    color: rgba(67, 26, 103, 0.78);
    font-size: 18px;
    line-height: 1.65;
    font-weight: 700;
}

.battle-summary-card,
.battle-replay-card,
.battle-chat-card {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 30px;
    box-shadow: 0 20px 56px rgba(39, 21, 58, 0.08);
    border: 1px solid rgba(67, 26, 103, 0.08);
}

.battle-summary-card {
    margin-top: 28px;
    padding: 26px 28px;
}

.battle-summary-meta {
    margin: 0;
    text-align: center;
    color: rgba(67, 26, 103, 0.58);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.battle-reveal-button {
    border: none;
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(67, 26, 103, 0.08);
    color: var(--dark-purple);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.battle-reveal-button:hover {
    background: rgba(176, 87, 197, 0.16);
    transform: translateY(-1px);
}

.battle-reveal-row {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.battle-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.player-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 148px;
    text-align: center;
    gap: 8px;
}

.battle-result-badge {
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    color: rgba(67, 26, 103, 0.6);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.player-head {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(39, 21, 58, 0.08);
}

.battle-player-name {
    color: var(--dark-purple);
    font-size: 18px;
    font-weight: 900;
    text-decoration: none;
}

.battle-player-name:hover {
    color: var(--light-purple);
}

.battle-player-label {
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    color: rgba(67, 26, 103, 0.56);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.battle-summary-card.show-outcome .battle-result-badge,
.battle-summary-card.show-outcome .battle-player-label {
    opacity: 1;
    transform: translateY(0);
}

.vs-container {
    min-width: 50px;
    text-align: center;
    color: var(--dark-purple);
    font-size: 26px;
    font-weight: 900;
}

.battle-summary-note {
    margin: 18px 0 0;
    text-align: center;
    color: rgba(67, 26, 103, 0.7);
    font-size: 15px;
    font-weight: 700;
}

.battle-replay-card {
    margin-top: 24px;
    padding: 22px;
}

.battle-replay-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.battle-chat-card {
    margin-top: 20px;
    padding: 22px;
}

.battle-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.battle-card-header h2 {
    margin: 0;
    color: var(--dark-purple);
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.battle-card-header p {
    margin: 0;
    color: rgba(67, 26, 103, 0.62);
    font-size: 14px;
    font-weight: 700;
}

.battle-chat-log {
    max-height: 420px;
    overflow: auto;
    padding-right: 6px;
}

.battle-chat-log-hidden {
    display: none;
}

.battle-chat-entry {
    padding: 10px 0;
    border-bottom: 1px solid rgba(67, 26, 103, 0.08);
    color: rgba(67, 26, 103, 0.8);
    font-size: 14px;
    line-height: 1.6;
    font-weight: 700;
}

.battle-chat-entry:last-child {
    border-bottom: none;
}

.battle-page-shell .battle-log,
.battle-page-shell .battle-log-inline {
    font-family: Verdana, sans-serif;
    font-size: 10pt;
}

.battle-page-shell .battle-log-inline {
    border: 1px solid #AAAAAA;
    background: #EEF2F5;
    color: black;
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: 5px;
}

.battle-page-shell .battle-log .inner {
    padding: 4px 8px 0 8px;
}

.battle-page-shell .battle-log .inner-preempt {
    padding: 0 8px 4px 8px;
}

.battle-page-shell .battle-log .chat {
    vertical-align: middle;
    padding: 3px 0;
    font-size: 8pt;
}

.battle-page-shell .battle-log .chat strong {
    color: #40576A;
}

.battle-page-shell .battle-log .chat em {
    padding: 1px 4px 1px 3px;
    color: #000000;
    font-style: normal;
}

.battle-page-shell .chat.mine {
    background: rgba(0,0,0,0.05);
    margin-left: -8px;
    margin-right: -8px;
    padding-left: 8px;
    padding-right: 8px;
}

.battle-page-shell .spoiler {
    color: #BBBBBB;
    background: #BBBBBB;
    padding: 0 3px;
}

.battle-page-shell .spoiler:hover,
.battle-page-shell .spoiler:active,
.battle-page-shell .spoiler-shown {
    color: #000000;
    background: #E2E2E2;
    padding: 0 3px;
}

.battle-page-shell .chat code,
.battle-page-shell .chat .spoiler:hover code,
.battle-page-shell .chat .spoiler:active code,
.battle-page-shell .chat .spoiler-shown code {
    border: 1px solid #C0C0C0;
    background: #EEEEEE;
    color: black;
    padding: 0 2px;
}

.battle-page-shell .infobox {
    border: 1px solid #6688AA;
    padding: 2px 4px;
}

.battle-page-shell .infobox-limited {
    max-height: 200px;
    overflow: auto;
    overflow-x: hidden;
}

.battle-page-shell .message-effect-weak {
    font-weight: bold;
    color: #CC2222;
}

.battle-page-shell .message-effect-resist {
    font-weight: bold;
    color: #6688AA;
}

.battle-page-shell .message-effect-immune {
    font-weight: bold;
    color: #666666;
}

.battle-page-shell .subtle {
    color: #3A4A66;
}

@media (max-width: 768px) {
    .battle-page-layout {
        padding: 160px 16px 56px;
    }

    .battle-summary-card,
    .battle-replay-card,
    .battle-chat-card {
        border-radius: 24px;
        padding: 20px;
    }

    .battle-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
