body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #0b1222;
    color: #f7fbff;
}

.spaceBackdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 10% 20%, rgba(93, 136, 255, 0.22), transparent 18%),
        radial-gradient(circle at 85% 15%, rgba(0, 223, 196, 0.16), transparent 16%),
        radial-gradient(circle at 65% 80%, rgba(255, 197, 61, 0.12), transparent 18%),
        radial-gradient(#ffffff 1px, transparent 1px),
        radial-gradient(rgba(255,255,255,0.55) 1px, transparent 1px),
        linear-gradient(180deg, #11182e 0%, #09111f 100%);
    background-size: auto, auto, auto, 80px 80px, 130px 130px, auto;
    background-position: center center, center center, center center, 0 0, 20px 35px, center center;
    opacity: 1;
}

.loginBody,
.appBody {
    min-height: 100vh;
    position: relative;
}

.authWrap,
.pageWrap,
.topNav {
    width: min(1220px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.authWrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    align-items: center;
}

.heroCard,
.authCard,
.panel {
    background: rgba(13, 22, 43, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.heroCard,
.panel {
    padding: 28px;
}

.authCard {
    padding: 24px;
}

.cinematicHero {
    overflow: hidden;
    position: relative;
}

.cinematicHero:after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 211, 77, 0.25), rgba(255, 211, 77, 0));
}

.versionBadge,
.panelLabel,
.claimedBadge,
.missionStatus {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.versionBadge,
.panelLabel {
    background: rgba(89, 149, 255, 0.18);
    color: #c3dbff;
}

h1, h2, h3, p, ul {
    margin-top: 0;
}

h1 {
    font-size: 42px;
    line-height: 1.08;
    margin-bottom: 12px;
}

.heroText,
p,
.smallNote,
.progressNote,
.parentNote,
.pathMeta {
    color: #cedbf1;
    line-height: 1.6;
}

.heroFeatureRow,
.characterRow,
.missionMetaRow,
.navActions,
.tabRow,
.resultActions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.heroFeatureRow span,
.missionMetaRow span {
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 14px;
}

.characterRow {
    margin-top: 20px;
}

.characterCard {
    min-width: 118px;
    text-align: center;
    background: rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 14px;
    color: #e7f0ff;
}

.characterEmoji,
.badgeEmoji,
.rankIcon {
    font-size: 34px;
    margin-bottom: 6px;
}

.rankHero {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 18px;
    align-items: center;
}

.rankIcon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(255, 211, 77, 0.25), rgba(94, 216, 182, 0.2));
    font-size: 50px;
}

.topNav {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.brandTitle {
    font-size: 25px;
    font-weight: bold;
}

.brandSub {
    color: #bac8e5;
    margin-top: 5px;
}

.pageWrap {
    padding: 20px 0 34px;
}

.v3TopGrid,
.dashboardGrid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
    margin-bottom: 22px;
}

.storyPanel {
    margin-top: 18px;
}

.statsRow {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.statsRow.threeUp {
    grid-template-columns: repeat(3, 1fr);
}

.statsRow.fourUp {
    grid-template-columns: repeat(4, 1fr);
}

.statCard,
.badgeCard,
.nextBadgeBox,
.questionCard,
.pathNode {
    background: rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 18px 16px;
}

.statCard {
    text-align: center;
}

.statNumber {
    font-size: 30px;
    font-weight: bold;
    color: #ffffff;
}

.statLabel,
.badgeMin,
.pathType,
.questionNumber {
    color: #a8b9d9;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.progressBox {
    margin-top: 18px;
    background: rgba(255,255,255,0.05);
    border-radius: 18px;
    padding: 18px;
}

.progressTop {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: bold;
}

.progressTrack {
    height: 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.progressFill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #59a5ff, #5ad9ba, #ffd34d);
}

.badgeGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.badgeCard {
    text-align: center;
    opacity: 0.65;
}

.badgeCard.earned {
    opacity: 1;
    outline: 2px solid rgba(255, 211, 77, 0.5);
}

.badgeName,
.pathTitle {
    font-weight: bold;
    color: #fff;
}

.mapPath {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-top: 16px;
}

.mapPath:before {
    content: '';
    position: absolute;
    left: 5%;
    right: 5%;
    top: 64px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(89,165,255,0.3), rgba(255,211,77,0.38), rgba(90,217,186,0.3));
    z-index: 0;
}

.pathNode {
    position: relative;
    z-index: 1;
    min-height: 220px;
}

.pathDot {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: bold;
    margin: 0 auto 10px;
    border: 4px solid rgba(255,255,255,0.08);
}

.pathNode.done .pathDot {
    background: linear-gradient(135deg, #5ad9ba, #59a5ff);
    color: #06101f;
}

.pathNode.open .pathDot {
    background: linear-gradient(135deg, #ffd34d, #ffb11f);
    color: #1f1b08;
}

.pathNode.shut .pathDot {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.65);
}

.pathZone {
    color: #87d8ff;
    font-weight: bold;
    margin-bottom: 5px;
}

.missionForm {
    margin-top: 18px;
}

.questionCard + .questionCard {
    margin-top: 16px;
}

.choiceGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.choiceButton {
    position: relative;
    display: block;
}

.choiceButton input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choiceButton span {
    display: block;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.07);
    border: 2px solid transparent;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.choiceButton span:hover {
    transform: translateY(-1px);
}

.choiceButton input:checked + span {
    border-color: #ffd34d;
    background: rgba(255,211,77,0.14);
}

.btnPrimary,
.btnSecondary,
.btnDisabled {
    display: inline-block;
    border: 0;
    border-radius: 16px;
    padding: 14px 18px;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

.btnPrimary {
    background: linear-gradient(135deg, #ffd34d, #ffb11f);
    color: #1a2238;
}

.btnSecondary {
    background: rgba(255,255,255,0.08);
    color: #f7fbff;
}

.btnDisabled {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
    cursor: default;
}

.fullButton,
.bigButton {
    width: 100%;
    box-sizing: border-box;
}

.message {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 14px;
    font-weight: bold;
}

.message.error {
    background: rgba(239, 81, 81, 0.18);
    color: #ffd4d4;
}

.message.success,
.resultGood {
    background: rgba(67, 190, 120, 0.16);
    color: #deffea;
}

.resultTry {
    background: rgba(255, 188, 49, 0.18);
    color: #ffefcc;
}

.claimedBadge {
    background: rgba(90, 217, 186, 0.18);
    color: #d9fff3;
    margin-top: 14px;
}

.pointsBurst {
    display: inline-block;
    margin: 8px 0 16px;
    font-size: 26px;
    font-weight: bold;
    color: #ffd34d;
    animation: popUp 0.8s ease;
}

@keyframes popUp {
    0% { transform: scale(0.4) translateY(14px); opacity: 0; }
    60% { transform: scale(1.1) translateY(-4px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.formStack {
    display: grid;
    gap: 10px;
}

label {
    font-size: 14px;
    color: #d4dff5;
    font-weight: bold;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: #0f1730;
    color: #fff;
    font-size: 16px;
}

.tab {
    flex: 1;
    text-align: center;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: #d8e2f7;
    font-weight: bold;
}

.tab.active {
    background: linear-gradient(135deg, #58a8ff, #5fd5b6);
    color: #0b1630;
}

.missionTips {
    padding-left: 18px;
    color: #cedbf1;
}

.tableWrap {
    overflow-x: auto;
}

.reportTable {
    width: 100%;
    border-collapse: collapse;
}

.reportTable th,
.reportTable td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.09);
    text-align: left;
}

.narrowWrap {
    max-width: 940px;
}

@media (max-width: 1100px) {
    .authWrap,
    .v3TopGrid,
    .dashboardGrid {
        grid-template-columns: 1fr;
    }

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

    .mapPath:before {
        display: none;
    }
}

@media (max-width: 700px) {
    .topNav {
        flex-direction: column;
        align-items: stretch;
    }

    h1 {
        font-size: 32px;
    }

    .statsRow.threeUp,
    .statsRow.fourUp,
    .choiceGrid,
    .badgeGrid,
    .mapPath {
        grid-template-columns: 1fr;
    }

    .rankHero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .authWrap,
    .pageWrap,
    .topNav {
        width: min(100% - 20px, 1220px);
    }
}


.adminGrid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 22px;
}

textarea,
select,
input[type="text"],
input[type="password"],
input[type="number"] {
    width: 100%;
    box-sizing: border-box;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.checkRow {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inlineFilter {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.miniLink {
    color: #9fd1ff;
    text-decoration: none;
    margin-right: 10px;
    font-weight: bold;
}

.dangerLink {
    color: #ff9db3;
}

.btnDisabled {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    color: #96a7c8;
    font-weight: bold;
}

@media (max-width: 900px) {
    .adminGrid {
        grid-template-columns: 1fr;
    }
}


.loginSplitLinks {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tinyNote {
    margin-top: 14px;
    font-size: 13px;
    opacity: 0.85;
}

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

@media (max-width: 900px) {
    .importGrid {
        grid-template-columns: 1fr;
    }
}
