/* =========================================================
   FUTUREVERSE — COSMOS LAB
   Premium Space Education Experience
========================================================= */

:root {
    --space-black: #03050d;
    --space-deep: #060914;
    --space-blue: #0b1224;
    --space-card: rgba(14, 22, 42, 0.78);

    --text-main: #f4f7ff;
    --text-soft: #aeb9d2;
    --text-muted: #77839d;

    --cyan: #57d9ff;
    --blue: #5d7cff;
    --purple: #a878ff;
    --violet: #cf72ff;

    --border: rgba(255, 255, 255, 0.09);
    --border-bright: rgba(87, 217, 255, 0.25);

    --shadow:
        0 25px 80px rgba(0, 0, 0, 0.45);

    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 12px;

    --max-width: 1200px;
}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        "Inter",
        "Segoe UI",
        Arial,
        sans-serif;

    background:
        radial-gradient(
            circle at 20% 10%,
            rgba(91, 111, 255, 0.12),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 35%,
            rgba(176, 91, 255, 0.10),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            #02040b 0%,
            #050812 45%,
            #03050c 100%
        );

    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;

    background-image:
        radial-gradient(circle, rgba(255,255,255,.65) 1px, transparent 1px);

    background-size: 95px 95px;
    opacity: 0.09;

    pointer-events: none;
    z-index: -1;
}

button {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   HEADER
========================================================= */

.cosmos-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    min-height: 76px;
    padding: 14px 5%;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    background: rgba(3, 5, 13, 0.82);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cosmos-logo {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    color: var(--cyan);

    background:
        linear-gradient(
            145deg,
            rgba(87, 217, 255, 0.18),
            rgba(137, 91, 255, 0.16)
        );

    border: 1px solid var(--border-bright);

    box-shadow:
        0 0 30px rgba(87, 217, 255, 0.12);
}

.cosmos-logo i {
    font-size: 22px;
}

.header-brand h1 {
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -0.4px;
}

.header-brand p {
    margin-top: 2px;

    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 0.4px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 16px;

    color: var(--text-soft);

    background: rgba(255,255,255,0.04);

    border: 1px solid var(--border);
    border-radius: 12px;

    cursor: pointer;

    transition:
        transform .25s ease,
        border-color .25s ease,
        background .25s ease,
        color .25s ease;
}

.back-btn:hover {
    color: var(--text-main);

    background: rgba(87,217,255,0.08);
    border-color: var(--border-bright);

    transform: translateX(-3px);
}


/* =========================================================
   MAIN
========================================================= */

.cosmos-main {
    width: min(var(--max-width), 92%);
    margin: auto;
}


/* =========================================================
   HERO
========================================================= */

.cosmos-hero {
    min-height: 650px;

    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 60px;

    padding: 90px 0 80px;

    position: relative;
}

.hero-content {
    max-width: 650px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 13px;

    margin-bottom: 24px;

    color: var(--cyan);

    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1.4px;

    background: rgba(87,217,255,0.07);
    border: 1px solid var(--border-bright);
    border-radius: 999px;
}

.hero-badge::before {
    content: "";
    width: 6px;
    height: 6px;

    border-radius: 50%;
    background: var(--cyan);

    box-shadow: 0 0 12px var(--cyan);
}

.cosmos-hero h2 {
    font-size: clamp(48px, 7vw, 82px);
    line-height: 0.98;

    letter-spacing: -3px;

    margin-bottom: 28px;

    background:
        linear-gradient(
            120deg,
            #ffffff 20%,
            #9eeaff 52%,
            #b68aff 90%
        );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cosmos-hero p {
    max-width: 650px;

    color: var(--text-soft);

    font-size: 17px;
    line-height: 1.8;

    margin-bottom: 16px;
}


/* =========================================================
   HERO VISUAL
========================================================= */

.hero-visual {
    min-height: 440px;

    display: grid;
    place-items: center;

    position: relative;
}

.cosmos-core {
    width: 130px;
    height: 130px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            #ffffff,
            #86e9ff 12%,
            #596dff 35%,
            #26165b 68%,
            #080914 100%
        );

    box-shadow:
        0 0 45px rgba(87,217,255,.45),
        0 0 110px rgba(121,83,255,.25);

    position: relative;
    z-index: 4;
}

.cosmos-core i {
    font-size: 38px;
    color: white;
}

.orbit {
    position: absolute;

    border: 1px solid rgba(110, 204, 255, .25);

    border-radius: 50%;

    transform: rotate(-20deg);
}

.orbit-1 {
    width: 260px;
    height: 120px;
}

.orbit-2 {
    width: 390px;
    height: 180px;

    transform: rotate(35deg);
}

.orbit-3 {
    width: 500px;
    height: 250px;

    transform: rotate(-55deg);
}

.orbit::after {
    content: "";

    position: absolute;

    width: 7px;
    height: 7px;

    top: 50%;
    right: -4px;

    border-radius: 50%;

    background: var(--cyan);

    box-shadow:
        0 0 15px var(--cyan);
}


/* =========================================================
   SECTION COMMON
========================================================= */

.section-heading {
    margin-bottom: 38px;
}

.section-heading span {
    display: block;

    color: var(--cyan);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 2px;

    margin-bottom: 10px;
}

.section-heading h2 {
    font-size: clamp(30px, 5vw, 48px);

    line-height: 1.1;
    letter-spacing: -1.5px;
}

.section-heading p {
    max-width: 700px;

    color: var(--text-muted);

    line-height: 1.7;

    margin-top: 12px;
}


/* =========================================================
   COSMOS MAP
========================================================= */

.cosmos-map {
    padding: 65px 0 90px;
}

.cosmos-map-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.map-item {
    min-height: 150px;

    padding: 25px;

    position: relative;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.015)
        );

    border: 1px solid var(--border);

    transition:
        transform .25s ease,
        border-color .25s ease;
}

.map-item:first-child {
    border-radius: 18px 0 0 18px;
}

.map-item:last-child {
    border-radius: 0 18px 18px 0;
}

.map-item:hover {
    transform: translateY(-5px);
    border-color: var(--border-bright);
}

.map-item span {
    color: var(--cyan);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1px;
}

.map-item h3 {
    margin-top: 14px;

    font-size: 19px;
}

.map-item p {
    margin-top: 8px;

    color: var(--text-muted);

    font-size: 13px;
    line-height: 1.5;
}

.map-line {
    position: absolute;

    width: 25px;
    height: 1px;

    top: 50%;
    right: -25px;

    background: rgba(87,217,255,.35);

    z-index: 2;
}


/* =========================================================
   TOPIC SECTIONS
========================================================= */

.cosmos-topic {
    padding: 90px 0;

    border-top: 1px solid rgba(255,255,255,.055);
}

.topic-heading {
    display: flex;
    align-items: flex-start;
    gap: 18px;

    margin-bottom: 22px;
}

.topic-number {
    min-width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    color: var(--cyan);

    background: rgba(87,217,255,.08);
    border: 1px solid var(--border-bright);

    font-size: 12px;
    font-weight: 800;
}

.topic-heading h2 {
    font-size: clamp(27px, 4vw, 42px);

    letter-spacing: -1px;
}

.topic-intro {
    max-width: 850px;

    color: var(--text-soft);

    font-size: 16px;
    line-height: 1.85;

    margin-bottom: 35px;
}


/* =========================================================
   INFO GRID
========================================================= */

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.info-card {
    padding: 26px;

    background:
        linear-gradient(
            145deg,
            rgba(18, 28, 51, .82),
            rgba(8, 13, 27, .78)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    box-shadow: var(--shadow);

    transition:
        transform .25s ease,
        border-color .25s ease;
}

.info-card:hover {
    transform: translateY(-6px);

    border-color: var(--border-bright);
}

.info-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.info-card p {
    color: var(--text-soft);

    font-size: 14px;
    line-height: 1.7;
}

.topic-fact {
    margin-top: 22px;

    padding: 22px 25px;

    border-left: 3px solid var(--cyan);

    background:
        linear-gradient(
            90deg,
            rgba(87,217,255,.08),
            rgba(87,217,255,.015)
        );

    border-radius: 0 14px 14px 0;

    color: var(--text-soft);

    line-height: 1.7;
}

.topic-fact strong {
    color: var(--cyan);
}


/* =========================================================
   STELLAR EVOLUTION
========================================================= */

.evolution-flow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 14px;

    margin-top: 30px;
}

.evolution-step {
    padding: 25px 18px;

    text-align: center;

    background: rgba(255,255,255,.035);

    border: 1px solid var(--border);
    border-radius: 16px;

    position: relative;
}

.evolution-step:not(:last-child)::after {
    content: "→";

    position: absolute;

    right: -19px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--cyan);

    font-size: 20px;

    z-index: 2;
}

.evolution-step span {
    display: block;

    color: var(--cyan);

    font-size: 11px;
    font-weight: 800;

    margin-bottom: 10px;
}

.evolution-step h3 {
    font-size: 16px;
}

.evolution-step p {
    color: var(--text-muted);

    font-size: 12px;
    line-height: 1.5;

    margin-top: 8px;
}


/* =========================================================
   BLACK HOLES
========================================================= */

.dark-topic {
    position: relative;
}

.blackhole-parts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 18px;

    margin-top: 30px;
}

.blackhole-parts .info-card {
    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(139,80,255,.10),
            transparent 60%
        ),
        rgba(9,13,27,.85);
}


/* =========================================================
   GALAXIES
========================================================= */

.galaxy-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 20px;

    margin-top: 30px;
}

.galaxy-icon {
    width: 70px;
    height: 70px;

    display: grid;
    place-items: center;

    margin-bottom: 18px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255,255,255,.75) 0 3%,
            rgba(132,210,255,.3) 5%,
            rgba(94,92,255,.18) 35%,
            transparent 70%
        );

    border: 1px solid var(--border-bright);
}

.galaxy-icon i {
    font-size: 27px;
    color: var(--cyan);
}


/* =========================================================
   DARK MATTER / DARK ENERGY
========================================================= */

.dual-info {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 20px;

    margin-top: 30px;
}

.dual-info .info-card:first-child {
    border-top: 2px solid var(--blue);
}

.dual-info .info-card:last-child {
    border-top: 2px solid var(--purple);
}


/* =========================================================
   DEEP SPACE
========================================================= */

.deep-space-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 18px;

    margin-top: 30px;
}


/* =========================================================
   SPACE MISSIONS
========================================================= */

.mission-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 18px;

    margin-top: 30px;
}

.mission-grid .info-card {
    min-height: 190px;
}


/* =========================================================
   COSMIC LAB
========================================================= */

.lab-topic {
    padding-bottom: 100px;
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 20px;

    margin-top: 30px;
}

.lab-topic-card {
    position: relative;

    padding: 30px;

    overflow: hidden;

    border-radius: var(--radius-lg);

    background:
        linear-gradient(
            145deg,
            rgba(17,28,53,.9),
            rgba(7,11,24,.92)
        );

    border: 1px solid var(--border);

    box-shadow: var(--shadow);
}

.lab-topic-card::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    top: -90px;
    right: -90px;

    border-radius: 50%;

    background: rgba(87,217,255,.08);

    filter: blur(20px);
}

.lab-icon {
    width: 50px;
    height: 50px;

    display: grid;
    place-items: center;

    margin-bottom: 20px;

    border-radius: 14px;

    color: var(--cyan);

    background: rgba(87,217,255,.08);

    border: 1px solid var(--border-bright);
}

.lab-icon i {
    font-size: 21px;
}

.lab-topic-card h3 {
    font-size: 20px;
}

.lab-topic-card p {
    color: var(--text-soft);

    font-size: 14px;
    line-height: 1.7;

    margin: 10px 0 22px;
}

.lab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 15px;

    color: white;

    background:
        linear-gradient(
            135deg,
            rgba(87,217,255,.15),
            rgba(132,95,255,.15)
        );

    border: 1px solid var(--border-bright);
    border-radius: 10px;

    cursor: pointer;

    transition:
        background .25s ease,
        transform .25s ease;
}

.lab-btn:hover {
    background:
        linear-gradient(
            135deg,
            rgba(87,217,255,.24),
            rgba(132,95,255,.24)
        );

    transform: translateY(-2px);
}


/* =========================================================
   GLOSSARY
========================================================= */

.cosmic-glossary {
    padding: 80px 0;

    border-top: 1px solid rgba(255,255,255,.055);
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 15px;
}

.glossary-item {
    padding: 22px;

    background: rgba(255,255,255,.035);

    border: 1px solid var(--border);

    border-radius: 14px;
}

.glossary-item h3 {
    color: var(--cyan);

    font-size: 16px;

    margin-bottom: 8px;
}

.glossary-item p {
    color: var(--text-muted);

    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   ENDING
========================================================= */

.cosmos-ending {
    padding: 120px 20px;

    text-align: center;

    position: relative;
}

.ending-icon {
    width: 80px;
    height: 80px;

    display: grid;
    place-items: center;

    margin: 0 auto 28px;

    border-radius: 50%;

    color: var(--cyan);

    background:
        radial-gradient(
            circle,
            rgba(87,217,255,.18),
            rgba(120,85,255,.08),
            transparent 70%
        );

    border: 1px solid var(--border-bright);

    box-shadow:
        0 0 50px rgba(87,217,255,.12);
}

.ending-icon i {
    font-size: 30px;
}

.cosmos-ending h2 {
    font-size: clamp(30px, 5vw, 52px);

    letter-spacing: -1.5px;

    margin-bottom: 15px;
}

.cosmos-ending p {
    color: var(--text-muted);

    max-width: 600px;

    margin: auto;

    line-height: 1.7;
}


/* =========================================================
   FOOTER
========================================================= */

.cosmos-footer {
    padding: 28px 5%;

    text-align: center;

    border-top: 1px solid var(--border);

    color: var(--text-muted);

    font-size: 12px;
}

.cosmos-footer p + p {
    margin-top: 5px;

    color: #5f6a82;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .cosmos-hero {
        grid-template-columns: 1fr;

        text-align: center;

        padding-top: 70px;
    }

    .hero-content {
        margin: auto;
    }

    .cosmos-hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual {
        min-height: 350px;
    }

    .cosmos-map-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .map-item,
    .map-item:first-child,
    .map-item:last-child {
        border-radius: 16px;
    }

    .map-line {
        display: none;
    }

    .info-grid,
    .mission-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .galaxy-types,
    .blackhole-parts {
        grid-template-columns: 1fr;
    }

    .evolution-flow {
        grid-template-columns: repeat(2, 1fr);
    }

    .evolution-step:not(:last-child)::after {
        display: none;
    }

    .glossary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .cosmos-header {
        min-height: 68px;

        padding: 10px 4%;

        gap: 10px;
    }

    .cosmos-logo {
        width: 40px;
        height: 40px;

        border-radius: 11px;
    }

    .header-brand {
        gap: 10px;
    }

    .header-brand h1 {
        font-size: 17px;
    }

    .header-brand p {
        font-size: 9px;
    }

    .back-btn {
        padding: 9px 11px;

        font-size: 12px;
    }

    .back-btn span {
        display: none;
    }

    .cosmos-main {
        width: 91%;
    }

    .cosmos-hero {
        min-height: auto;

        padding: 65px 0 55px;

        gap: 25px;
    }

    .hero-badge {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .cosmos-hero h2 {
        font-size: 48px;

        letter-spacing: -2px;

        margin-bottom: 22px;
    }

    .cosmos-hero p {
        font-size: 14px;

        line-height: 1.75;
    }

    .hero-visual {
        min-height: 270px;
    }

    .cosmos-core {
        width: 90px;
        height: 90px;
    }

    .cosmos-core i {
        font-size: 28px;
    }

    .orbit-1 {
        width: 190px;
        height: 90px;
    }

    .orbit-2 {
        width: 270px;
        height: 125px;
    }

    .orbit-3 {
        width: 340px;
        height: 170px;
    }

    .section-heading {
        margin-bottom: 27px;
    }

    .section-heading h2 {
        font-size: 30px;
    }

    .cosmos-map {
        padding: 50px 0 65px;
    }

    .cosmos-map-grid {
        grid-template-columns: 1fr;
    }

    .map-item {
        min-height: 125px;
    }

    .cosmos-topic {
        padding: 65px 0;
    }

    .topic-heading {
        gap: 12px;
    }

    .topic-number {
        min-width: 36px;
        height: 36px;

        font-size: 10px;
    }

    .topic-heading h2 {
        font-size: 27px;
    }

    .topic-intro {
        font-size: 14px;
        line-height: 1.75;
    }

    .info-grid,
    .dual-info,
    .deep-space-grid,
    .mission-grid,
    .lab-grid {
        grid-template-columns: 1fr;
    }

    .info-card {
        padding: 22px;
    }

    .evolution-flow {
        grid-template-columns: 1fr;
    }

    .evolution-step {
        text-align: left;
    }

    .glossary-grid {
        grid-template-columns: 1fr;
    }

    .cosmic-glossary {
        padding: 60px 0;
    }

    .cosmos-ending {
        padding: 85px 10px;
    }

    .cosmos-ending h2 {
        font-size: 32px;
    }

    .cosmos-footer {
        padding: 25px 15px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .cosmos-hero h2 {
        font-size: 42px;
    }

    .header-brand p {
        display: none;
    }

    .hero-visual {
        min-height: 230px;
    }

    .orbit-3 {
        width: 290px;
        height: 145px;
    }
}