/* ---------- Bolygó oldal (v2: Theia ébredése) ---------- */

.planet-page {
    display: grid;
    gap: 16px;
    max-width: 1200px;
}

.planet-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--neon-line);
    background:
        radial-gradient(circle at 12% 50%, rgba(56, 232, 255, .16), transparent 46%),
        radial-gradient(circle at 90% 10%, rgba(232, 121, 249, .14), transparent 40%),
        linear-gradient(160deg, rgba(20, 32, 57, .95), rgba(10, 16, 30, .95));
    overflow: hidden;
}

    .planet-hero h1 {
        margin: 0 0 4px;
    }

.planet-ring {
    position: relative;
    flex: none;
    width: 150px;
    height: 150px;
}

    .planet-ring svg {
        width: 100%;
        height: 100%;
        transform: rotate(-90deg);
    }

    .planet-ring .ring-track {
        fill: none;
        stroke: rgba(138, 160, 194, .15);
        stroke-width: 9;
    }

    .planet-ring .ring-fill {
        fill: none;
        stroke: url(#ring-grad);
        stroke-width: 9;
        stroke-linecap: round;
        filter: drop-shadow(0 0 6px rgba(56, 232, 255, .55));
        transition: stroke-dasharray 1.2s cubic-bezier(.2, .8, .2, 1);
    }

    .planet-ring .tick {
        fill: #1b2742;
        stroke: rgba(138, 160, 194, .6);
        stroke-width: 1.2;
    }

        .planet-ring .tick.done {
            fill: #fde68a;
            stroke: #fbbf24;
            filter: drop-shadow(0 0 4px #fbbf24);
        }

.ring-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
}

    .ring-label strong {
        font-size: 1.9rem;
        line-height: 1;
        background: linear-gradient(90deg, #fdba74, #67e8f9, #86efac);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    .ring-label span {
        font-size: .78rem;
        color: var(--muted);
    }

.planet-eta {
    margin: 6px 0;
    color: #fde68a;
}

.physical {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 8px;
    font-variant-numeric: tabular-nums;
}

    .physical span {
        padding: 3px 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .05);
        border: 1px solid rgba(138, 160, 194, .2);
    }

.planet-tabs {
    justify-self: start;
}

.meter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.meter-card {
    --meter: #38e8ff;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid color-mix(in srgb, var(--meter) 40%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--meter) 10%, rgba(20, 32, 57, .95)), rgba(13, 20, 36, .95));
    box-shadow: 0 0 22px color-mix(in srgb, var(--meter) 12%, transparent);
    animation: meter-in .5s ease-out both;
}

    .meter-card:nth-child(2) {
        animation-delay: .08s;
    }

    .meter-card:nth-child(3) {
        animation-delay: .16s;
    }

    .meter-card.meter-atmosphere {
        --meter: #c4b5fd;
    }

    .meter-card.meter-hydrosphere {
        --meter: #38bdf8;
    }

    .meter-card.meter-biosphere {
        --meter: #4ade80;
    }

    .meter-card header {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .meter-card h2 {
        flex: 1;
        margin: 0;
        font-size: 1.05rem;
    }

.meter-value {
    font-size: 1.4rem;
    font-variant-numeric: tabular-nums;
    color: var(--meter);
}

.meter-icon {
    font-size: 1.4rem;
}

.meter-bar {
    position: relative;
    height: 12px;
    margin: 10px 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--meter) 55%, #0b1120), var(--meter));
    box-shadow: 0 0 12px var(--meter);
    transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
    position: relative;
}

    .meter-fill::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
        transform: translateX(-100%);
        animation: meter-shine 3.2s ease-in-out infinite;
    }

.meter-cap {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 2px;
    background: #fbbf24;
    box-shadow: 0 0 6px #fbbf24;
}

.meter-rate {
    margin: 0 0 6px;
    font-size: .88rem;
    color: #86efac;
}

    .meter-rate.neg {
        color: #fca5a5;
    }

.meter-card.eroding {
    animation: meter-in .5s ease-out both, eroding 1.6s ease-in-out infinite;
}

.meter-sources summary {
    cursor: pointer;
    font-size: .85rem;
    color: var(--muted);
}

.meter-sources ul {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: grid;
    gap: 4px;
    font-size: .84rem;
}

.meter-sources li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.meter-sources .warn {
    color: #fde68a;
}

.stability {
    display: grid;
    gap: 6px;
}

.stability-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .stability-head h2 {
        margin: 0;
        font-size: 1.05rem;
    }

.band-chip {
    padding: 2px 12px;
    border-radius: 999px;
    font-weight: 600;
    background: rgba(34, 197, 94, .18);
    color: #86efac;
}

.band-tense .band-chip {
    background: rgba(251, 191, 36, .18);
    color: #fde68a;
}

.band-unstable .band-chip {
    background: rgba(248, 113, 113, .2);
    color: #fca5a5;
    animation: eroding 1.6s ease-in-out infinite;
}

.stability-bar {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e 0%, #22c55e 25%, #fbbf24 25%, #fbbf24 50%, #ef4444 50%, #7f1d1d 100%);
    opacity: .8;
}

.stability-marker {
    position: absolute;
    top: -5px;
    width: 4px;
    height: 22px;
    margin-left: -2px;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 0 10px #fff;
    transition: left 1s ease;
}

.stability-scale {
    display: grid;
    grid-template-columns: 25fr 25fr 50fr auto;
    font-size: .75rem;
    color: var(--muted);
}

.advice ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.advice h2,
.planet-columns h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.planet-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

    .planet-columns .panel {
        margin: 0;
    }

.upcoming,
.climate-effects {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

    .upcoming li {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        align-items: center;
    }

        .upcoming li > div {
            flex: 1;
            min-width: 0;
        }

        .upcoming li.loss strong {
            color: #fde68a;
        }

.upcoming-bar {
    height: 5px;
    margin-top: 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .06);
    overflow: hidden;
}

    .upcoming-bar div {
        height: 100%;
        background: linear-gradient(90deg, #38e8ff, #4ade80);
        transition: width 1s ease;
    }

.upcoming-when {
    white-space: nowrap;
    font-size: .85rem;
    font-variant-numeric: tabular-nums;
}

.climate-effects li {
    display: flex;
    gap: 8px;
}

    .climate-effects li.pos {
        color: #bbf7d0;
    }

    .climate-effects li.neg {
        color: #fecaca;
    }

.history-chart {
    width: 100%;
    height: 160px;
}

    .history-chart .grid {
        stroke: rgba(138, 160, 194, .15);
        stroke-dasharray: 4 6;
    }

    .history-chart .line {
        fill: none;
        stroke-width: 2.5;
        vector-effect: non-scaling-stroke;
        stroke-linejoin: round;
    }

    .history-chart .atmosphere {
        stroke: #c4b5fd;
    }

    .history-chart .hydrosphere {
        stroke: #38bdf8;
    }

    .history-chart .biosphere {
        stroke: #4ade80;
    }

.planet-soon {
    text-align: center;
    padding: 28px;
}

@keyframes meter-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes meter-shine {
    0%, 60% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes eroding {
    50% {
        box-shadow: 0 0 22px rgba(248, 113, 113, .55);
    }
}

@media (max-width: 640px) {
    .planet-hero {
        flex-direction: column;
        text-align: center;
    }

    .physical {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .meter-card,
    .meter-fill::after,
    .meter-card.eroding,
    .band-unstable .band-chip {
        animation: none;
    }
}


/* ---------- Pálya fül ---------- */

.orbit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

    .orbit-grid .panel,
    .megastructures,
    .payload-grid {
        margin: 0;
    }

.launch-card h2,
.comet-card h2,
.megastructures h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.rocket-stage svg {
    width: 120px;
    height: 120px;
    display: block;
    margin: 0 auto;
}

.launch-card.busy .rocket {
    animation: rocket-shake .18s ease-in-out infinite alternate;
}

.launch-card.busy .vent {
    animation: planet-vent 1.6s ease-out infinite;
}

.launch-bar,
.sat-life {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
}

    .launch-bar div {
        height: 100%;
        background: linear-gradient(90deg, #f97316, #fde68a);
        transition: width 1s linear;
    }

    .sat-life div {
        height: 100%;
        background: linear-gradient(90deg, #38e8ff, #a78bfa);
    }

    .sat-life.low div {
        background: linear-gradient(90deg, #f87171, #fbbf24);
    }

.comet-sky {
    position: relative;
    height: 70px;
    border-radius: 10px;
    background: radial-gradient(circle at 80% 30%, rgba(56, 232, 255, .15), transparent 50%), #060a14;
    overflow: hidden;
    margin-bottom: 8px;
}

.comet-body {
    position: absolute;
    top: 30%;
    left: -20%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0f2fe;
    box-shadow: 0 0 12px 4px rgba(186, 230, 253, .8);
    animation: comet-fly 6s linear infinite;
}

    .comet-body::after {
        content: "";
        position: absolute;
        right: 8px;
        top: 3px;
        width: 90px;
        height: 4px;
        border-radius: 2px;
        background: linear-gradient(270deg, rgba(186, 230, 253, .9), transparent);
    }

.comet-card.captured {
    border-color: rgba(251, 191, 36, .6);
    box-shadow: 0 0 22px rgba(251, 191, 36, .18);
}

.comet-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0;
}

.impact-pick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ice-moon {
    color: #bae6fd;
}

.satellite-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

    .satellite-list li {
        display: grid;
        grid-template-columns: auto 1fr auto auto;
        align-items: center;
        gap: 10px;
    }

.sat-icon {
    font-size: 1.4rem;
    animation: orbit-bob 4s ease-in-out infinite;
}

.mega-row {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
}

.segments {
    display: flex;
    gap: 4px;
}

.seg {
    flex: 1;
    height: 12px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .07);
    transition: background .4s ease;
}

    .seg.on.mirror {
        background: linear-gradient(180deg, #fde68a, #f59e0b);
        box-shadow: 0 0 8px rgba(251, 191, 36, .6);
    }

    .seg.on.shade {
        background: linear-gradient(180deg, #64748b, #1e293b);
        box-shadow: 0 0 6px rgba(148, 163, 184, .5);
    }

.payload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.payload {
    display: grid;
    gap: 6px;
    align-content: start;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(138, 160, 194, .22);
    background: rgba(255, 255, 255, .03);
}

    .payload.locked {
        opacity: .55;
    }

    .payload .hint {
        margin: 0;
    }

@keyframes rocket-shake {
    to {
        transform: translateX(.6px);
    }
}

@keyframes planet-vent {
    from {
        transform: translateY(0) scale(.8);
        opacity: .6;
    }

    to {
        transform: translateY(-6px) scale(1.6);
        opacity: 0;
    }
}

@keyframes comet-fly {
    to {
        left: 120%;
        top: 55%;
    }
}

@keyframes orbit-bob {
    50% {
        transform: translateY(-3px) rotate(8deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .launch-card.busy .rocket,
    .launch-card.busy .vent,
    .comet-body,
    .sat-icon {
        animation: none;
    }
}


/* ---------- Élet fül ---------- */

.life-head h2 {
    margin: 0 0 6px;
}

.life-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .life-progress .meter-bar {
        flex: 1;
        margin: 0;
    }

.life-fill {
    --meter: #4ade80;
}

.species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.species-card {
    display: grid;
    gap: 6px;
    align-content: start;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(138, 160, 194, .2);
    background: linear-gradient(180deg, rgba(20, 32, 57, .9), rgba(10, 16, 30, .95));
    transition: transform .25s ease, box-shadow .25s ease;
}

    .species-card h3 {
        margin: 0;
        font-size: 1rem;
    }

    .species-card.unknown .species-icon {
        filter: grayscale(1) brightness(.5);
    }

    .species-card.found {
        border-color: rgba(74, 222, 128, .45);
        box-shadow: 0 0 18px rgba(74, 222, 128, .15);
        animation: species-found 2.4s ease-in-out infinite;
    }

    .species-card.studied {
        border-color: rgba(253, 230, 138, .5);
    }

    .species-card:hover {
        transform: translateY(-2px);
    }

.species-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.species-bonus {
    margin: 0;
    color: #bbf7d0;
    font-size: .85rem;
}

.watching-text {
    color: #67e8f9;
}

/* ---------- Fejezet-kártya (25/50/75/100%) ---------- */

.milestone-backdrop {
    animation: ms-fade .6s ease-out both;
}

.milestone-card {
    width: min(720px, calc(100% - 32px));
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(253, 230, 138, .45);
    background: #0b1120;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(253, 230, 138, .15);
    animation: ms-rise .9s cubic-bezier(.2, .8, .2, 1) both;
}

.milestone-art svg {
    display: block;
    width: 100%;
    height: 240px;
}

.milestone-text {
    padding: 18px 22px 22px;
}

    .milestone-text h2 {
        margin: 2px 0 8px;
        font-size: 1.7rem;
        background: linear-gradient(90deg, #fde68a, #67e8f9, #86efac);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    .milestone-text .eyebrow {
        margin: 0;
        color: var(--muted);
        letter-spacing: .08em;
        text-transform: uppercase;
        font-size: .75rem;
    }

.ms-clouds {
    animation: ms-drift 26s linear infinite alternate;
}

.ms-rain line {
    animation: ms-rain 1.1s linear infinite;
}

.ms-far {
    animation: ms-parallax 18s ease-in-out infinite alternate;
}

.ms-sun {
    animation: ms-glow 5s ease-in-out infinite alternate;
}

.ms-tree {
    transform-origin: bottom;
    transform-box: fill-box;
    animation: ms-sway 4s ease-in-out infinite alternate;
}

.ms-lake {
    animation: ms-shimmer 3s ease-in-out infinite alternate;
}

@keyframes ms-fade {
    from {
        opacity: 0;
    }
}

@keyframes ms-rise {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.96);
    }
}

@keyframes ms-drift {
    to {
        transform: translateX(60px);
    }
}

@keyframes ms-rain {
    to {
        transform: translate(-6px, 28px);
        opacity: 0;
    }
}

@keyframes ms-parallax {
    to {
        transform: translateX(-18px);
    }
}

@keyframes ms-glow {
    to {
        opacity: 1;
        r: 30;
    }
}

@keyframes ms-sway {
    to {
        transform: rotate(4deg);
    }
}

@keyframes ms-shimmer {
    to {
        opacity: .6;
    }
}

@keyframes species-found {
    50% {
        box-shadow: 0 0 26px rgba(74, 222, 128, .35);
    }
}

@media (prefers-reduced-motion: reduce) {
    .milestone-backdrop,
    .milestone-card,
    .ms-clouds,
    .ms-rain line,
    .ms-far,
    .ms-sun,
    .ms-tree,
    .ms-lake,
    .species-card.found {
        animation: none;
    }
}


/* ---------- Haladás fül és világkártya ---------- */

.acts-timeline ol {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    counter-reset: none;
}

.acts-timeline li {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    text-align: center;
    font-size: .85rem;
    color: var(--muted);
}

    .acts-timeline li::before {
        content: "";
        position: absolute;
        top: 17px;
        left: -50%;
        width: 100%;
        height: 3px;
        background: rgba(138, 160, 194, .2);
        z-index: 0;
    }

    .acts-timeline li:first-child::before {
        display: none;
    }

    .acts-timeline li.done::before,
    .acts-timeline li.current::before {
        background: linear-gradient(90deg, #22c55e, #38e8ff);
    }

.act-dot {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1b2742;
    border: 2px solid rgba(138, 160, 194, .35);
    font-weight: 700;
}

.acts-timeline li.done .act-dot {
    background: #14532d;
    border-color: #22c55e;
    color: #bbf7d0;
}

.acts-timeline li.current {
    color: var(--text);
}

    .acts-timeline li.current .act-dot {
        border-color: #38e8ff;
        box-shadow: 0 0 14px rgba(56, 232, 255, .6);
        animation: act-pulse 2.4s ease-in-out infinite;
    }

.milestone-list,
.todo-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

    .milestone-list li {
        display: grid;
        grid-template-columns: 52px 1fr auto;
        align-items: center;
        gap: 10px;
    }

        .milestone-list li.done {
            color: #bbf7d0;
        }

        .milestone-list li.next {
            color: #fde68a;
        }

.ms-badge {
    text-align: center;
    padding: 2px 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.milestone-list li.done .ms-badge {
    background: rgba(34, 197, 94, .25);
}

.todo-list li {
    padding-left: 22px;
    position: relative;
}

    .todo-list li::before {
        content: "›";
        position: absolute;
        left: 6px;
        color: #38e8ff;
    }

.crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.crew {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    text-align: center;
}

    .crew.absent {
        opacity: .45;
    }

.crew-icon {
    font-size: 1.6rem;
}

.crew-name {
    font-weight: 600;
    font-size: .9rem;
}

.crew-level {
    font-size: .8rem;
    color: #67e8f9;
}

.world-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-bottom: 4px;
    font-size: .82rem;
}

.world-act {
    color: #fde68a;
    font-weight: 600;
}

.mini-meters {
    display: grid;
    gap: 3px;
    width: 90px;
}

.mm {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

    .mm i {
        display: block;
        height: 100%;
    }

    .mm.a i {
        background: #c4b5fd;
    }

    .mm.h i {
        background: #38bdf8;
    }

    .mm.b i {
        background: #4ade80;
    }

.band-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
}

    .band-dot.band-tense {
        background: #fbbf24;
    }

    .band-dot.band-unstable {
        background: #ef4444;
        animation: act-pulse 1.4s ease-in-out infinite;
    }

.power-bal {
    color: #86efac;
}

    .power-bal.neg {
        color: #fca5a5;
    }

@keyframes act-pulse {
    50% {
        box-shadow: 0 0 22px rgba(56, 232, 255, .9);
    }
}

@media (max-width: 640px) {
    .acts-timeline li span:last-child {
        font-size: .7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acts-timeline li.current .act-dot,
    .band-dot.band-unstable {
        animation: none;
    }
}


/* ---------- Névadó ---------- */

.name-btn {
    width: 28px;
    height: 28px;
    font-size: .85rem;
    vertical-align: middle;
    opacity: .7;
}

    .name-btn:hover {
        opacity: 1;
    }

.name-editor {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    vertical-align: middle;
}

.namer-offer {
    width: min(440px, calc(100% - 32px));
    text-align: center;
}

.namer-price {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 6px 0;
    background: linear-gradient(90deg, #fde68a, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.paypal-btn {
    background: linear-gradient(180deg, #ffc439, #f5a623);
    color: #111827;
    border-color: #f5a623;
}
