
:root {
    --bg: #080a12;
    --panel: rgba(19, 22, 35, 0.86);
    --panel-strong: #151a29;
    --text: #f6f7ff;
    --muted: #aab1c7;
    --accent: #ff3c7d;
    --accent-two: #7b5cff;
    --line: rgba(255,255,255,0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 5%, rgba(123, 92, 255, 0.20), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(255, 60, 125, 0.16), transparent 28%),
        linear-gradient(180deg, #0b0e18 0%, #070910 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.24;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.page-glow {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.14;
    pointer-events: none;
}

.page-glow-one {
    top: 18%;
    left: -180px;
    background: #7b5cff;
}

.page-glow-two {
    right: -180px;
    bottom: 5%;
    background: #ff3c7d;
}

.hero {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 104px 0 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow,
.small-label {
    display: inline-block;
    color: #bdb5ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.22em;
}

.hero h1 {
    margin: 16px 0 18px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.hero h1 span {
    background: linear-gradient(90deg, #ff4e89, #9a7cff, #5ee4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    margin: 0;
    max-width: 650px;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.65;
}

.hero-badge {
    flex: 0 0 auto;
    width: 148px;
    height: 148px;
    display: grid;
    place-items: center;
    border-radius: 38px;
    transform: rotate(9deg);
    background:
        linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.03)),
        linear-gradient(145deg, #ff3c7d, #6547ff);
    border: 1px solid rgba(255,255,255,.26);
    box-shadow:
        0 30px 80px rgba(101, 71, 255, 0.30),
        inset 0 1px 0 rgba(255,255,255,.35);
}

.hero-badge span {
    font-size: 54px;
    font-weight: 1000;
    font-style: italic;
    text-shadow: 0 8px 22px rgba(0,0,0,.35);
}

main {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto 80px;
}

.selection-panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 18, 29, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 90px rgba(0,0,0,.28);
}

.selection-status {
    padding: 6px 4px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.selection-status strong {
    display: block;
    margin-top: 5px;
    font-size: 26px;
}

.battle-button {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 14px 22px;
    color: white;
    background: linear-gradient(135deg, #ff3c7d, #7657ff);
    font: inherit;
    font-weight: 900;
    letter-spacing: .02em;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(255, 60, 125, .22);
    transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}

.battle-button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 36px rgba(255, 60, 125, .30);
}

.battle-button:disabled {
    cursor: not-allowed;
    opacity: .34;
    box-shadow: none;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.fighter-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
    cursor: pointer;
    outline: none;
    transform: translateY(0);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.fighter-card:hover,
.fighter-card:focus-visible {
    transform: translateY(-8px);
    border-color: rgba(255,255,255,.28);
    box-shadow: 0 24px 50px rgba(0,0,0,.34);
}

.fighter-card.selected {
    border-color: #ff4f8a;
    box-shadow:
        0 0 0 2px rgba(255, 79, 138, .28),
        0 24px 55px rgba(255, 60, 125, .18);
}

.fighter-card.selected::after {
    content: "SELECTED";
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    padding: 7px 9px;
    border-radius: 999px;
    color: white;
    background: #ff3c7d;
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: .09em;
}

.card-number {
    position: absolute;
    left: 13px;
    top: 11px;
    z-index: 3;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .14em;
    color: rgba(255,255,255,.65);
}

.portrait {
    position: relative;
    height: 238px;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.portrait::before,
.portrait::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.portrait::before {
    width: 190px;
    height: 190px;
    background: rgba(255,255,255,.13);
    box-shadow: inset 0 0 40px rgba(255,255,255,.08);
}

.portrait::after {
    width: 112px;
    height: 150px;
    border-radius: 54% 54% 42% 42%;
    transform: translateY(22px);
    background:
        radial-gradient(circle at 36% 38%, rgba(255,255,255,.82) 0 4px, transparent 5px),
        radial-gradient(circle at 64% 38%, rgba(255,255,255,.82) 0 4px, transparent 5px),
        linear-gradient(150deg, rgba(255,255,255,.33), rgba(255,255,255,.05));
    border: 1px solid rgba(255,255,255,.20);
    box-shadow: 0 20px 45px rgba(0,0,0,.22);
}

.portrait-symbol {
    position: relative;
    z-index: 2;
    transform: translateY(-48px);
    color: rgba(255,255,255,.92);
    font-size: 46px;
    font-weight: 900;
    text-shadow: 0 8px 20px rgba(0,0,0,.35);
}

.portrait-akira {
    background: linear-gradient(145deg, #ff4b3e, #ff8a00 55%, #4a1522);
}

.portrait-mika {
    background: linear-gradient(145deg, #4fd8ff, #697cff 52%, #172354);
}

.portrait-ren {
    background: linear-gradient(145deg, #f8ff52, #00d8b6 54%, #163b45);
}

.portrait-yuna {
    background: linear-gradient(145deg, #b05cff, #ff4ba8 52%, #2a1742);
}

.portrait-daichi {
    background: linear-gradient(145deg, #ffb25b, #836347 52%, #2a2524);
}

.card-body {
    padding: 16px;
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.fighter-type {
    color: #aeb6ce;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .14em;
}

.card-heading h2 {
    margin: 5px 0 0;
    font-size: 19px;
    line-height: 1.1;
}

.rarity {
    flex: 0 0 auto;
    padding: 5px 7px;
    border-radius: 7px;
    color: #0b0e18;
    background: #f7d776;
    font-size: 10px;
    font-weight: 1000;
}

.stats {
    margin-top: 17px;
    display: grid;
    gap: 10px;
}

.stat {
    position: relative;
    display: grid;
    grid-template-columns: 32px 1fr 26px;
    align-items: center;
    gap: 7px;
    font-size: 10px;
}

.stat span {
    color: #aab1c7;
    font-weight: 900;
}

.stat strong {
    grid-column: 3;
    text-align: right;
    font-size: 11px;
}

.stat i {
    grid-column: 2;
    grid-row: 1;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.09);
}

.stat i::after {
    content: "";
    display: block;
    width: var(--value);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6e59ff, #ff4f8a);
}

.special {
    margin-top: 16px;
    color: #d9dded;
    font-size: 11px;
    line-height: 1.45;
}

.select-indicator {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: #9fa8bf;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fighter-card.selected .select-indicator {
    color: #ff79a6;
}

.battle-modal {
    position: fixed;
    inset: 0;
    z-index: 9999998;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(3, 5, 11, .82);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
}

.battle-modal.open {
    opacity: 1;
    visibility: visible;
}

.battle-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 30px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 26px;
    background:
        radial-gradient(circle at 50% 0%, rgba(120, 80, 255, .18), transparent 35%),
        #121725;
    box-shadow: 0 40px 120px rgba(0,0,0,.58);
    transform: scale(.94) translateY(12px);
    transition: transform .22s ease;
}

.battle-modal.open .battle-dialog {
    transform: scale(1) translateY(0);
}

.close-button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    color: white;
    background: rgba(255,255,255,.06);
    font-size: 23px;
    cursor: pointer;
}

.battle-dialog h2 {
    margin: 8px 0 22px;
    font-size: 34px;
}

.versus-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 14px;
}

.combatant {
    min-height: 138px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.10);
}

.combatant h3 {
    margin: 0 0 12px;
    font-size: 21px;
}

.combatant p {
    margin: 5px 0;
    color: #bcc3d7;
    font-size: 13px;
}

.combatant strong {
    color: white;
}

.versus-mark {
    align-self: center;
    font-size: 25px;
    font-weight: 1000;
    font-style: italic;
    color: #ff5b91;
}

.battle-feed {
    margin-top: 18px;
    padding: 17px;
    border-radius: 16px;
    color: #cbd1e2;
    background: rgba(0,0,0,.22);
    font-size: 14px;
    line-height: 1.7;
}

.battle-feed p {
    margin: 0 0 5px;
}

.winner-box {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,60,125,.17), rgba(118,87,255,.17));
    font-size: 18px;
    font-weight: 900;
}

.secondary-button {
    width: 100%;
}

@media (max-width: 1000px) {
    .cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .hero {
        padding-top: 92px;
    }

    .hero-badge {
        display: none;
    }

    .selection-status {
        align-items: stretch;
        flex-direction: column;
    }

    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .versus-layout {
        grid-template-columns: 1fr;
    }

    .versus-mark {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        width: min(100% - 24px, 1180px);
        padding-bottom: 38px;
    }

    main {
        width: min(100% - 20px, 1180px);
    }

    .selection-panel {
        padding: 12px;
        border-radius: 20px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .portrait {
        height: 270px;
    }

    .battle-dialog {
        padding: 24px 18px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
.ddive-disclaimer {
    margin: 60px 20px 20px;
    text-align: center;
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    line-height: 1.5;
    font-family: Arial, Helvetica, sans-serif;
}
