/* Neon Takeover overlay styles (moved unchanged from the single-file page). */
:root {
    --ink: #f1f4ff;
    --panel: #1e2230;
    --accent: #ffd43b;
    --accent-2: #4cc9f0;
    --board: #0d0f18;
    --board-edge: #2a2f3d;
    --team1: #ff4444;
    --team2: #4488ff;
}


* { box-sizing: border-box; }


.pill {
    background: #1b1f2c;
    border-radius: 999px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 18px rgba(7, 9, 18, 0.45);
    font-weight: 600;
}


.timer-pill {
    font-size: clamp(1rem, 2.3vw, 1.5rem);
    color: var(--accent);
    letter-spacing: 0.06em;
    min-width: 135px;
    text-align: center;
    font-weight: 700;
}


.battle-wrap {
    display: grid;
    gap: 12px;
    align-items: center;
    justify-items: center;
    position: relative;
}


.battle-card {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 9 / 16;
    background: linear-gradient(160deg, #1f202b 0%, #14141c 100%);
    border-radius: 26px;
    border: 3px solid var(--board-edge);
    box-shadow: 0 18px 40px rgba(10, 10, 20, 0.45);
    padding: 12px 26px;
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}


.battle-content {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: radial-gradient(circle at top, #1b2234, #0d0f18 60%);
    padding: 16px 12px 14px;
    display: grid;
    grid-template-rows: auto auto auto auto 1fr auto auto;
    gap: 12px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}


.battle-timer-row {
    display: grid;
    place-items: center;
}


.team-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
    align-items: center;
}


.team-box {
    background: #141824;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px;
    min-height: 66px;
}


.team-box h3 {
    margin: 0;
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.team-score {
    margin-top: 6px;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}


.versus {
    font-weight: 800;
    letter-spacing: 0.06em;
    opacity: 0.75;
}


.team1-name,

.team1-score,

.team1-general .name { color: var(--team1); }


.team2-name,

.team2-score,

.team2-general .name { color: var(--team2); }


.battle-bar-wrap {
    display: grid;
    gap: 6px;
}


.battle-bar {
    height: 28px;
    border-radius: 999px;
    background: #141824;
    border: 1px solid rgba(255, 255, 255, 0.18);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}


.team-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    transition: width 0.3s ease;
}


.team1-fill {
    left: 0;
    width: 50%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0%, var(--team1) 100%);
    box-shadow: 0 0 22px rgba(255, 68, 68, 0.45);
}


.team2-fill {
    right: 0;
    width: 50%;
    background: linear-gradient(270deg, rgba(0, 0, 0, 0.28) 0%, var(--team2) 100%);
    box-shadow: 0 0 22px rgba(68, 136, 255, 0.45);
}


.bar-center-marker {
    position: absolute;
    top: -5px;
    bottom: -5px;
    width: 3px;
    border-radius: 999px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.95);
    transition: left 0.3s ease;
}


.ratio-text {
    text-align: center;
    font-size: 0.86rem;
    opacity: 0.85;
    letter-spacing: 0.03em;
}


.combo-line {
    min-height: 36px;
    display: grid;
    place-items: center;
}


.combo-pill {
    opacity: 0;
    transform: scale(0.86);
    transition: opacity 0.24s ease, transform 0.24s ease;
    background: #141824;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}


.combo-pill.active { opacity: 1; transform: scale(1); }

.combo-pill.tier2 { box-shadow: 0 0 12px rgba(255, 196, 77, 0.55); }

.combo-pill.tier3 { box-shadow: 0 0 18px rgba(255, 196, 77, 0.8), 0 0 28px rgba(255, 196, 77, 0.6); }

.combo-pill.tier4 { box-shadow: 0 0 28px rgba(255, 110, 110, 0.9), 0 0 38px rgba(255, 110, 110, 0.7); }


.contributor-field {
    position: relative;
    min-height: 0;
    height: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 46%),
        linear-gradient(180deg, rgba(20, 24, 36, 0.98), rgba(10, 13, 22, 0.96));
    overflow: hidden;
}


.territory-grid {
    position: absolute;
    inset: 12px;
    display: grid;
    grid-template-columns: repeat(var(--grid-size, 6), 1fr);
    grid-template-rows: repeat(var(--grid-size, 6), 1fr);
    gap: 5px;
}


.territory-tile {
    display: grid;
    place-items: center;
    border: 1px solid rgba(170, 227, 255, 0.22);
    border-radius: 7px;
    background: rgba(7, 14, 30, 0.86);
    color: rgba(225, 245, 255, 0.62);
    font-size: 0.75rem;
    font-weight: 800;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}


.territory-tile.team1 { background: color-mix(in srgb, var(--team1) 72%, #091329); box-shadow: inset 0 0 12px var(--team1), 0 0 8px color-mix(in srgb, var(--team1) 65%, transparent); color: white; }

.territory-tile.team2 { background: color-mix(in srgb, var(--team2) 72%, #091329); box-shadow: inset 0 0 12px var(--team2), 0 0 8px color-mix(in srgb, var(--team2) 65%, transparent); color: white; }

.territory-tile.frontier1 { outline: 2px solid color-mix(in srgb, var(--team1) 80%, white); outline-offset: -3px; }

.territory-tile.frontier2 { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--team2) 80%, white); }

.territory-tile.frontier1.frontier2 { outline-color: #f7ff7a; box-shadow: inset 0 0 0 2px #f7ff7a; }


.play-instruction {
    min-height: 28px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #e9fbff;
    font-size: clamp(0.72rem, 2vw, 0.9rem);
    font-weight: 800;
    letter-spacing: 0.03em;
}


.mvp-row {
    display: grid;
    gap: 8px;
    align-content: end;
}


.general-card {
    background: #141824;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    display: grid;
    gap: 6px;
}


.general-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
}


.general-main {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
}


.name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.victory {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    background: radial-gradient(circle, rgba(15, 20, 31, 0.82), rgba(9, 12, 20, 0.96));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 5;
    padding: 18px;
}


.victory.active {
    opacity: 1;
    animation: victoryFlash 0.45s ease;
}


.victory h3 {
    margin: 0;
    font-size: clamp(2rem, 4.8vw, 3rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transform: scale(0.9);
    animation: growWin 0.42s ease forwards;
}


.victory p { margin: 8px 0 0; font-size: 1.05rem; }


.new-round-btn {
    border: none;
    background: linear-gradient(140deg, var(--accent), #ffd166);
    color: #1b1300;
    font-weight: 800;
    letter-spacing: 0.05em;
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    box-shadow: 0 12px 22px rgba(255, 179, 71, 0.42);
    transition: transform 0.2s ease, filter 0.2s ease;
}


.new-round-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }


.battle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}


.is-hidden { display: none; }


@keyframes growWin {
    to { transform: scale(1); }
}


@keyframes victoryFlash {
    0% { filter: brightness(1.35); }
    100% { filter: brightness(1); }
}

/* Shared core 1.2.0 overlay frame */
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
html.source-page body { display: block; font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif; color: var(--ink); }
.battle-wrap { position: absolute; left: 50%; top: 50%; width: 420px; transform-origin: center center; will-change: transform; }
.battle-card { max-width: none; }
.mode-label { position: absolute; z-index: 6; top: 14px; right: 14px; padding: 4px 10px; border-radius: 999px; background: #0d0f18e6; border: 1px solid #ffffff2e; color: #f7ff7a; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* Gift line sits on the left edge between the grid and the top gifter cards at 14px or larger; never over the grid or the middle third. */
.gift-rail { position: absolute; z-index: 5; left: 33px; top: 530px; width: 102px; min-height: 52px; display: block; padding: 3px 5px; border-radius: 10px; background: #0d0f18e0; border: 1px solid #ffd43b8c; color: #f4f6ff; font-size: 14px; line-height: 1.08; font-weight: 700; pointer-events: none; box-sizing: border-box; }
.gift-rail > #giftRailText { display: inline; }
.gift-rail-icon { float: left; width: 18px; height: 18px; margin: 0 3px 0 0; display: grid; place-items: center; font-size: 15px; }
.gift-rail-icon img { width: 18px; height: 18px; object-fit: contain; }
