* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #06070d;
    --card: rgba(255, 255, 255, 0.055);
    --border: rgba(255, 255, 255, 0.12);
    --text: #f7f7fb;
    --muted: #9a9cac;
    --purple: #9b7cff;
    --pink: #ff6ec7;
    --cyan: #65e8ff;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(139, 92, 246, 0.15), transparent 30%),
        radial-gradient(circle at 90% 20%, rgba(236, 72, 153, 0.13), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(34, 211, 238, 0.08), transparent 30%),
        var(--bg);

    color: var(--text);
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
}


/* ================= BACKGROUND ================= */

.aurora {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.16;
    pointer-events: none;
    animation: floatAurora 10s ease-in-out infinite alternate;
}

.aurora-one {
    background: #8b5cf6;
    top: -160px;
    left: -120px;
}

.aurora-two {
    background: #ec4899;
    right: -150px;
    top: 25%;
    animation-delay: 2s;
}

.aurora-three {
    background: #22d3ee;
    bottom: -180px;
    left: 40%;
    animation-delay: 4s;
}

@keyframes floatAurora {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(80px, 50px) scale(1.2);
    }
}


/* ================= PARTICLES ================= */

.particles span {
    position: fixed;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: white;
    opacity: 0.25;
    animation: particleFloat 8s linear infinite;
}

.particles span:nth-child(1) {
    left: 10%;
    top: 20%;
}

.particles span:nth-child(2) {
    left: 25%;
    top: 70%;
    animation-delay: 2s;
}

.particles span:nth-child(3) {
    left: 50%;
    top: 30%;
    animation-delay: 4s;
}

.particles span:nth-child(4) {
    left: 70%;
    top: 65%;
    animation-delay: 1s;
}

.particles span:nth-child(5) {
    left: 85%;
    top: 25%;
    animation-delay: 3s;
}

.particles span:nth-child(6) {
    left: 40%;
    top: 85%;
    animation-delay: 5s;
}

.particles span:nth-child(7) {
    left: 15%;
    top: 50%;
    animation-delay: 1.5s;
}

.particles span:nth-child(8) {
    left: 92%;
    top: 80%;
    animation-delay: 3.5s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-35px);
    }

    100% {
        transform: translateY(0);
    }
}


/* ================= CONTAINER ================= */

.container {
    width: min(1180px, 92%);
    margin: auto;
    position: relative;
    z-index: 2;
}


/* ================= HEADER ================= */

.header {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    font-size: 25px;
    font-weight: 700;

    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            rgba(155,124,255,0.35),
            rgba(255,110,199,0.15)
        );

    box-shadow:
        0 0 30px rgba(155,124,255,0.18);

    transform: rotate(-5deg);
}

.brand h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
}

.brand h1 span {
    color: var(--purple);
}

.brand p {
    color: var(--muted);
    font-size: 11px;
    margin-top: 4px;
}

.badge {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    padding: 9px 14px;
    border-radius: 50px;

    font-size: 10px;
    letter-spacing: 1.5px;

    backdrop-filter: blur(15px);
}

.live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #69f6b0;
    margin-right: 7px;
    box-shadow: 0 0 10px #69f6b0;
}


/* ================= HERO ================= */

.hero {
    min-height: 440px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 50px;
}

.hero-text {
    max-width: 680px;
}

.eyebrow,
.mini-label {
    color: var(--purple);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
}

.hero h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(45px, 7vw, 82px);
    line-height: 0.98;
    margin: 20px 0;
    letter-spacing: -4px;
}

.hero h2 span {
    display: block;

    background:
        linear-gradient(
            90deg,
            #ffffff,
            #b79aff,
            #ff91d5,
            #72eaff
        );

    background-size: 300%;
    -webkit-background-clip: text;
    color: transparent;

    animation: gradientText 7s ease infinite;
}

@keyframes gradientText {
    0% {
        background-position: 0%;
    }

    50% {
        background-position: 100%;
    }

    100% {
        background-position: 0%;
    }
}

.hero-description {
    max-width: 580px;
    color: var(--muted);
    line-height: 1.8;
    font-size: 15px;
}


/* ================= MATH ORBIT ================= */

.math-orbit {
    width: 270px;
    height: 270px;

    position: relative;

    display: grid;
    place-items: center;
}

.math-symbol {
    width: 100px;
    height: 100px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    font-family: "Space Grotesk";
    font-size: 50px;

    background: rgba(255,255,255,0.06);

    border: 1px solid rgba(255,255,255,0.2);

    box-shadow:
        inset 0 0 30px rgba(255,255,255,0.04),
        0 0 70px rgba(155,124,255,0.2);

    backdrop-filter: blur(20px);

    z-index: 3;

    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    50% {
        transform: scale(1.06);
    }
}

.orbit {
    position: absolute;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 50%;
}

.orbit-one {
    width: 220px;
    height: 220px;
    animation: rotate 15s linear infinite;
}

.orbit-two {
    width: 270px;
    height: 150px;
    transform: rotate(60deg);
    animation: rotateReverse 12s linear infinite;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateReverse {
    to {
        transform: rotate(-300deg);
    }
}

.floating-symbol {
    position: absolute;
    font-family: "Space Grotesk";
    color: var(--muted);
    font-size: 13px;
}

.symbol-one {
    top: 15px;
    left: 90px;
}

.symbol-two {
    right: 10px;
    bottom: 65px;
}

.symbol-three {
    left: 15px;
    bottom: 55px;
}


/* ================= CALCULATOR ================= */

.calculator-card,
.formula-library {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.045);
    backdrop-filter: blur(25px);

    border-radius: 30px;

    padding: 35px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 30px 100px rgba(0,0,0,0.25);
}

.section-heading,
.results-title,
.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-heading h3,
.results-title h3,
.library-header h3 {
    font-family: "Space Grotesk";
    font-size: 26px;
    margin-top: 8px;
}

.degree-symbol {
    width: 50px;
    height: 50px;

    border-radius: 15px;

    display: grid;
    place-items: center;

    font-size: 20px;

    border: 1px solid var(--border);

    background: rgba(255,255,255,0.04);
}


/* ================= INPUTS ================= */

.inputs {
    display: grid;
    grid-template-columns: 1fr 50px 1fr;
    align-items: end;

    gap: 20px;

    margin-top: 35px;
}

.input-group label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 10px;
}

.input-group label span {
    display: inline-grid;
    place-items: center;

    width: 25px;
    height: 25px;

    margin-right: 7px;

    border-radius: 7px;

    color: white;

    background: rgba(155,124,255,0.2);
}

.input-wrapper {
    display: flex;
    align-items: center;

    height: 65px;

    border-radius: 17px;

    border: 1px solid var(--border);

    background: rgba(0,0,0,0.18);

    transition: 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--purple);
    box-shadow: 0 0 30px rgba(155,124,255,0.12);
}

.input-wrapper input {
    width: 100%;

    height: 100%;

    border: none;
    outline: none;

    background: transparent;

    padding: 0 20px;

    color: white;

    font-size: 20px;

    font-family: "Space Grotesk";
}

.input-wrapper span {
    color: var(--muted);
    padding-right: 20px;
}

.plus-symbol {
    text-align: center;
    font-size: 25px;
    color: var(--purple);
    padding-bottom: 18px;
}


/* ================= BUTTONS ================= */

.buttons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.calculate-btn,
.reset-btn {
    border: none;
    cursor: pointer;
    font-family: "Inter";
    transition: 0.3s;
}

.calculate-btn {
    flex: 1;

    min-height: 55px;

    border-radius: 15px;

    color: white;

    font-weight: 700;

    background:
        linear-gradient(
            100deg,
            #7658e8,
            #b56bff,
            #ec62b8
        );

    box-shadow:
        0 10px 35px rgba(155,124,255,0.25);
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 15px 45px rgba(155,124,255,0.4);
}

.arrow {
    margin-left: 10px;
    font-size: 20px;
}

.reset-btn {
    padding: 0 25px;

    border-radius: 15px;

    color: var(--muted);

    border: 1px solid var(--border);

    background: rgba(255,255,255,0.04);
}

.reset-btn:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}


/* ================= RESULTS ================= */

.results-section {
    margin-top: 100px;
}

.result-count {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 2px;
}

.results-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 16px;

    margin-top: 30px;
}

.result-card {
    position: relative;

    min-height: 260px;

    overflow: hidden;

    padding: 25px;

    border-radius: 24px;

    border: 1px solid var(--border);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.075),
            rgba(255,255,255,0.025)
        );

    transition: 0.4s;
}

.result-card:hover {
    transform: translateY(-8px);

    border-color: rgba(155,124,255,0.45);

    box-shadow:
        0 20px 60px rgba(0,0,0,0.3),
        0 0 40px rgba(155,124,255,0.08);
}

.card-top {
    display: flex;
    justify-content: space-between;
}

.function-name {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--purple);
    font-weight: 800;
}

.identity {
    color: var(--muted);
    font-size: 11px;
}

.result-card h4 {
    font-family: "Space Grotesk";
    font-size: 22px;
    margin-top: 30px;
}

.formula {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
    margin-top: 8px;
    min-height: 38px;
}

.result-value {
    font-family: "Space Grotesk";
    font-size: 34px;
    font-weight: 700;

    margin-top: 20px;

    background:
        linear-gradient(
            90deg,
            white,
            #bda7ff
        );

    -webkit-background-clip: text;
    color: transparent;
}

.card-glow {
    position: absolute;

    width: 100px;
    height: 100px;

    right: -50px;
    bottom: -50px;

    background: var(--purple);

    filter: blur(60px);

    opacity: 0.15;
}


/* ================= FORMULA LIBRARY ================= */

.formula-library {
    margin-top: 100px;
}

.library-header > span {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 2px;
}

.formula-list {
    margin-top: 30px;
}

.formula-row {
    display: grid;

    grid-template-columns: 50px 180px 1fr;

    align-items: center;

    padding: 18px 0;

    border-bottom: 1px solid rgba(255,255,255,0.07);

    transition: 0.3s;
}

.formula-row:hover {
    padding-left: 10px;
    color: white;
}

.formula-row > span {
    color: var(--purple);
    font-size: 11px;
}

.formula-row strong {
    font-family: "Space Grotesk";
}

.formula-row p {
    color: var(--muted);
    font-size: 13px;
}


/* ================= FOOTER ================= */

footer {
    padding: 60px 0;

    display: flex;
    justify-content: space-between;
    align-items: center;

    color: var(--muted);

    font-size: 11px;
}

footer strong {
    display: block;

    color: white;

    letter-spacing: 2px;

    margin-bottom: 6px;
}

footer p {
    letter-spacing: 1px;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 850px) {

    .hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 0;
    }

    .math-orbit {
        align-self: center;
    }

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

@media (max-width: 600px) {

    .header {
        padding: 20px 0;
    }

    .badge {
        display: none;
    }

    .hero h2 {
        font-size: 48px;
    }

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

    .plus-symbol {
        display: none;
    }

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

    .calculator-card,
    .formula-library {
        padding: 23px;
        border-radius: 22px;
    }

    .formula-row {
        grid-template-columns: 35px 110px 1fr;
        gap: 8px;
    }

    .formula-row p {
        font-size: 10px;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}
