:root {
    --bg: #f4f3ef;
    --surface: #ffffff;
    --text: #151515;
    --muted: #696969;

    --blue: #b9dcff;
    --yellow: #ffe58a;
    --purple: #d9c4ff;
    --green: #bdeccf;
    --pink: #ffc8dc;

    --border: #171717;

    --shadow: 6px 6px 0 #171717;

    --radius: 24px;
}


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


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(185, 220, 255, .35), transparent 25%),
        radial-gradient(circle at 90% 20%, rgba(217, 196, 255, .3), transparent 25%),
        var(--bg);

    color: var(--text);

    font-family: "DM Sans", sans-serif;

    overflow-x: hidden;
}


button,
textarea {
    font: inherit;
}


button {
    cursor: pointer;
}


#app {
    width: 100%;
    max-width: 900px;
    margin: auto;
    padding: 25px 18px 120px;
}


.page {
    display: none;
    min-height: calc(100vh - 145px);
}


.page.active {
    display: block;
    animation: pageFade .4s ease;
}


@keyframes pageFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ================= LOADER ================= */

#loader {
    position: fixed;
    inset: 0;

    z-index: 9999;

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

    background: var(--bg);

    transition:
        opacity .5s ease,
        visibility .5s ease;
}


#loader.hide {
    opacity: 0;
    visibility: hidden;
}


.loader-box {
    width: min(330px, 85%);
    text-align: center;
}


.loader-logo {
    width: 65px;
    height: 65px;

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

    margin: auto auto 16px;

    background: var(--blue);

    border: 3px solid var(--border);
    border-radius: 18px;

    box-shadow: var(--shadow);
}


.loader-logo svg {
    width: 30px;
}


.loader-title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 800;
    font-size: 28px;
}


.loader-box p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}


.loader-bar {
    height: 9px;

    margin-top: 20px;

    border: 2px solid var(--border);
    border-radius: 20px;

    overflow: hidden;
}


.loader-progress {
    width: 0%;
    height: 100%;
    background: var(--text);

    animation: loading 1.5s ease forwards;
}


@keyframes loading {
    to {
        width: 100%;
    }
}


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

.hero {
    text-align: center;

    padding:
        clamp(55px, 12vw, 100px)
        5px
        60px;
}


.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 13px;

    background: var(--surface);

    border: 2px solid var(--border);
    border-radius: 100px;

    box-shadow: 3px 3px 0 var(--border);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
}


.status-dot {
    width: 8px;
    height: 8px;

    background: #28c76f;

    border-radius: 50%;
}


.hero h1 {
    margin-top: 25px;

    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(45px, 12vw, 85px);

    line-height: .95;
    letter-spacing: -4px;
    font-weight: 800;
}


.hero h1 span {
    display: block;

    margin-top: 8px;

    color: #5e72e4;
}


.hero-description {
    max-width: 620px;

    margin: 28px auto 0;

    color: var(--muted);

    font-size: 16px;
    line-height: 1.7;
}


.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;

    flex-wrap: wrap;

    margin-top: 30px;
}


.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 52px;

    padding: 0 20px;

    border: 2px solid var(--border);
    border-radius: 15px;

    font-weight: 800;

    transition: .2s ease;
}


.primary-btn {
    background: var(--text);
    color: white;

    box-shadow: 5px 5px 0 #7b8cff;
}


.secondary-btn {
    background: white;
    color: var(--text);

    box-shadow: 5px 5px 0 var(--border);
}


.primary-btn:hover,
.secondary-btn:hover {
    transform: translate(-2px, -2px);
}


.primary-btn:active,
.secondary-btn:active {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 var(--border);
}


/* ================= SECTION ================= */

.section-heading {
    margin-bottom: 18px;
}


.mini-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    color: #666;
}


.section-heading h2 {
    margin-top: 5px;

    font-family: "Space Grotesk", sans-serif;

    font-size: 25px;
}


/* ================= QUICK CARDS ================= */

.quick-grid {
    display: grid;
    gap: 16px;
}


.quick-card {
    position: relative;

    display: grid;
    grid-template-columns: auto 1fr auto;

    align-items: center;
    gap: 15px;

    width: 100%;

    padding: 20px;

    border: 3px solid var(--border);
    border-radius: var(--radius);

    text-align: left;

    box-shadow: var(--shadow);

    transition: .25s ease;
}


.quick-card:hover {
    transform: translateY(-5px);
}


.card-blue {
    background: var(--blue);
}


.card-yellow {
    background: var(--yellow);
}


.card-purple {
    background: var(--purple);
}


.card-icon,
.feature-icon,
.info-icon,
.header-icon {
    width: 50px;
    height: 50px;

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

    flex-shrink: 0;

    background: white;

    border: 2px solid var(--border);
    border-radius: 15px;

    box-shadow: 3px 3px 0 var(--border);
}


.card-icon svg,
.feature-icon svg,
.info-icon svg {
    width: 24px;
}


.quick-card h3 {
    font-size: 17px;
    font-weight: 800;
}


.quick-card p {
    margin-top: 5px;

    color: #444;

    font-size: 13px;
    line-height: 1.5;
}


.arrow-icon {
    width: 20px;
}


/* ================= INFO ================= */

.info-card {
    display: flex;
    gap: 18px;

    margin-top: 35px;
    padding: 24px;

    background: var(--purple);

    border: 3px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
}


.info-card h2 {
    margin-top: 6px;

    font-family: "Space Grotesk", sans-serif;

    font-size: 25px;
}


.info-card h2 span {
    color: #6a4ed8;
}


.info-card p {
    margin-top: 12px;

    color: #444;

    font-size: 14px;
    line-height: 1.7;
}


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

.page-header {
    padding: 35px 4px 30px;
}


.header-icon {
    margin-bottom: 20px;

    background: var(--blue);
}


.header-icon.purple {
    background: var(--purple);
}


.page-header h1 {
    margin-top: 8px;

    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(40px, 10vw, 70px);

    line-height: .95;
    letter-spacing: -3px;
}


.page-header h1 span {
    color: #6677dd;
}


.page-header p {
    max-width: 650px;

    margin-top: 18px;

    color: var(--muted);

    line-height: 1.7;
}


/* ================= FEATURES ================= */

.feature-list {
    display: grid;
    gap: 18px;
}


.feature-card {
    padding: 22px;

    border: 3px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
}


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


.feature-status {
    padding: 7px 10px;

    background: var(--green);

    border: 2px solid var(--border);
    border-radius: 100px;

    font-size: 9px;
    font-weight: 800;
}


.feature-status.coming {
    background: #eee;
}


.feature-card h2 {
    margin-top: 20px;

    font-family: "Space Grotesk", sans-serif;

    font-size: 27px;
}


.feature-card p {
    margin-top: 9px;

    color: #444;

    line-height: 1.7;
}


.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin-top: 17px;
}


.feature-tags span {
    padding: 6px 10px;

    background: rgba(255,255,255,.7);

    border: 1.5px solid var(--border);
    border-radius: 8px;

    font-size: 11px;
    font-weight: 700;
}


.feature-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;

    margin-top: 22px;
    padding: 13px;

    background: var(--text);
    color: white;

    border: 2px solid var(--border);
    border-radius: 12px;

    font-weight: 800;

    transition: .2s ease;
}


.feature-btn:hover {
    transform: translateY(-2px);
}


.future-card {
    background: white;
}


.muted-icon {
    opacity: .65;
}


/* ================= ASSISTANT ================= */

.assistant-card {
    margin-bottom: 18px;
    padding: 20px;

    background: var(--surface);

    border: 3px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
}


.input-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 16px;
}


.input-header svg {
    width: 21px;
}


.input-label {
    display: block;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;

    color: #777;
}


.input-header h3 {
    margin-top: 4px;

    font-family: "Space Grotesk", sans-serif;

    font-size: 18px;
}


.mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}


.mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 48px;

    background: #f5f5f5;

    border: 2px solid var(--border);
    border-radius: 12px;

    font-size: 12px;
    font-weight: 800;

    transition: .2s ease;
}


.mode-btn.active {
    background: var(--blue);
    box-shadow: 3px 3px 0 var(--border);
}


.mode-btn svg {
    width: 17px;
}


/* ================= TEXTAREA ================= */

#promptInput {
    width: 100%;
    min-height: 180px;

    padding: 17px;

    resize: vertical;

    background: #f7f7f7;

    border: 2px solid var(--border);
    border-radius: 15px;

    outline: none;

    font-size: 14px;
    line-height: 1.6;

    transition: .2s ease;
}


#promptInput:focus {
    background: white;
    box-shadow: 4px 4px 0 var(--purple);
}


.prompt-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-top: 12px;
}


#charCount {
    color: #777;

    font-size: 11px;
    font-weight: 700;
}


.generate-btn {
    min-height: 46px;

    padding: 0 17px;

    background: var(--text);
    color: white;

    border: 2px solid var(--border);
    border-radius: 12px;

    box-shadow: 4px 4px 0 #9c87ff;

    font-size: 12px;
    font-weight: 800;

    transition: .2s ease;
}


.generate-btn:hover {
    transform: translateY(-2px);
}


.generate-text,
.generate-loading {
    display: flex;
    align-items: center;
    gap: 7px;
}


.generate-loading {
    display: none;
}


.generate-btn.loading .generate-text {
    display: none;
}


.generate-btn.loading .generate-loading {
    display: flex;
}


.spinner {
    width: 14px;
    height: 14px;

    border: 2px solid rgba(255,255,255,.35);
    border-top-color: white;

    border-radius: 50%;

    animation: spin .7s linear infinite;
}


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


/* ================= RESULT ================= */

.result-card {
    min-height: 300px;
}


.result-empty {
    min-height: 260px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}


.empty-icon {
    width: 62px;
    height: 62px;

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

    margin-bottom: 15px;

    background: var(--yellow);

    border: 2px solid var(--border);
    border-radius: 18px;

    box-shadow: 4px 4px 0 var(--border);
}


.empty-icon svg {
    width: 28px;
}


.result-empty h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 21px;
}


.result-empty p {
    margin-top: 5px;

    color: var(--muted);

    font-size: 13px;
}


.result-content {
    display: none;
}


.result-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    margin-bottom: 15px;
}


.result-meta > div {
    padding: 13px;

    background: var(--blue);

    border: 2px solid var(--border);
    border-radius: 12px;
}


.result-meta span {
    display: block;

    font-size: 8px;
    font-weight: 800;
    color: #555;
}


.result-meta strong {
    display: block;

    margin-top: 4px;

    font-size: 12px;
}


.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 11px 13px;

    background: #191919;
    color: white;

    border-radius: 12px 12px 0 0;
}


.code-header > span {
    display: flex;
    align-items: center;
    gap: 7px;

    font-size: 11px;
    font-weight: 800;
}


.code-header svg {
    width: 15px;
}


#copyBtn {
    display: flex;
    align-items: center;
    gap: 6px;

    padding: 7px 10px;

    background: white;
    color: #111;

    border: none;
    border-radius: 7px;

    font-size: 10px;
    font-weight: 800;
}


#codeOutput {
    display: block;

    max-height: 500px;

    overflow: auto;

    padding: 18px;

    background: #111;
    color: #eee;

    font-family: "Space Grotesk", monospace;

    font-size: 12px;
    line-height: 1.7;

    white-space: pre-wrap;
    word-break: break-word;
}


.install-box {
    margin-top: 14px;
    padding: 16px;

    background: var(--green);

    border: 2px solid var(--border);
    border-radius: 13px;
}


.install-title {
    display: flex;
    align-items: center;
    gap: 7px;

    font-size: 12px;
    font-weight: 800;
}


.install-title svg {
    width: 16px;
}


.install-box p {
    margin-top: 8px;

    color: #333;

    font-size: 12px;
    line-height: 1.6;
}


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

.footer {
    padding: 35px 4px 10px;
}


.footer-line {
    width: 100%;
    height: 2px;

    margin-bottom: 25px;

    background: var(--border);
}


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


.credits div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}


.credits span {
    color: #777;

    font-size: 9px;
    font-weight: 700;
}


.credits strong {
    font-family: "Space Grotesk", sans-serif;

    font-size: 13px;
}


.copyright {
    margin-top: 25px;

    color: #888;

    text-align: center;

    font-size: 10px;
}


/* ================= BOTTOM NAV ================= */

.bottom-nav {
    position: fixed;

    z-index: 1000;

    left: 50%;
    bottom: 15px;

    transform: translateX(-50%);

    width: min(430px, calc(100% - 25px));

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

    padding: 7px;

    background: rgba(255,255,255,.94);

    border: 3px solid var(--border);
    border-radius: 20px;

    box-shadow: 7px 7px 0 var(--border);

    backdrop-filter: blur(15px);
}


.nav-item {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;

    min-height: 57px;

    background: transparent;

    border: none;
    border-radius: 13px;

    color: #777;

    font-size: 9px;
    font-weight: 800;

    transition: .2s ease;
}


.nav-item svg {
    width: 20px;
}


.nav-item.active {
    background: var(--text);
    color: white;
}


.nav-item:hover {
    transform: translateY(-2px);
}


/* ================= TOAST ================= */

#toast {
    position: fixed;

    z-index: 3000;

    left: 50%;
    bottom: 95px;

    transform: translate(-50%, 20px);

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 11px 15px;

    background: var(--text);
    color: white;

    border: 2px solid var(--border);
    border-radius: 12px;

    opacity: 0;
    pointer-events: none;

    font-size: 11px;
    font-weight: 800;

    transition: .3s ease;
}


#toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}


#toast svg {
    width: 15px;
}


/* ================= REVEAL ================= */

.reveal {
    opacity: 0;
    transform: translateY(18px);

    transition:
        opacity .6s ease,
        transform .6s ease;
}


.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ================= DESKTOP ================= */

@media (min-width: 700px) {

    #app {
        padding-left: 30px;
        padding-right: 30px;
    }


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


    .feature-list {
        grid-template-columns: 1fr 1fr;
    }


    .hero {
        padding-top: 90px;
    }

}


@media (max-width: 420px) {

    .credits {
        grid-template-columns: 1fr;
        gap: 15px;
    }


    .hero h1 {
        letter-spacing: -3px;
    }


    .hero-actions {
        flex-direction: column;
    }


    .primary-btn,
    .secondary-btn {
        width: 100%;
    }


    .prompt-bottom {
        align-items: stretch;
        flex-direction: column;
    }


    .generate-btn {
        width: 100%;
    }

}