/* =========================================================
   FRELO AI
   CINEMATIC UI SYSTEM
   ========================================================= */

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

:root {
    --bg: #000000;
    --bg-soft: #050505;
    --panel: #090909;
    --panel-light: #101010;

    --border: rgba(255, 255, 255, 0.07);
    --border-light: rgba(255, 255, 255, 0.12);

    --text: #f5f5f5;
    --text-soft: #a0a0a0;
    --text-muted: #5d5d5d;

    --white: #ffffff;

    --green: #4ee58a;

    --sidebar-width: 280px;
    --topbar-height: 68px;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --fast: 160ms ease;
}

html {
    width: 100%;
    height: 100%;

    background: #000;

    color-scheme: dark;

    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100%;

    background: #000;

    color: var(--text);

    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    overflow: hidden;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
textarea {
    font: inherit;
}

button {
    border: 0;
    outline: 0;
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.45);
    outline-offset: 2px;
}

input,
textarea {
    outline: none;
}

.hidden {
    display: none !important;
}


/* =========================================================
   CINEMATIC STARTUP
   ========================================================= */

.startup-screen {
    position: fixed;

    inset: 0;

    z-index: 99999;

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

    background: #000;

    overflow: hidden;
}


/* subtle cinematic light */

.startup-screen::before {
    content: "";

    position: absolute;

    width: 70vw;
    height: 70vw;

    max-width: 900px;
    max-height: 900px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.035) 0%,
            rgba(255, 255, 255, 0.012) 28%,
            transparent 68%
        );

    pointer-events: none;
}


/* fine grain */

.startup-screen::after {
    content: "";

    position: absolute;

    inset: 0;

    opacity: 0.035;

    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");

    pointer-events: none;
}

.startup-stage {
    position: relative;

    z-index: 2;

    width: 100%;
    height: 100%;

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


/* =========================================================
   FRELO LOGO
   ========================================================= */

.frelo-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    white-space: nowrap;

    font-size: clamp(
        48px,
        9vw,
        105px
    );

    line-height: 0.9;

    font-weight: 900;

    letter-spacing: -0.085em;

    color: #fff;

    filter: blur(0);

    transform: scale(1);

    transform-origin: center;

    transition:
        filter 900ms var(--ease),
        transform 900ms var(--ease),
        opacity 900ms var(--ease);
}


/* every individual letter */

.logo-letter {
    display: inline-block;

    opacity: 0;

    will-change:
        transform,
        opacity,
        filter;

    text-shadow:
        0 0 35px rgba(255, 255, 255, 0.08);
}


/*
    Letters arrive from DIFFERENT directions.
    This is the core FRELO animation.
*/

.letter-f {
    transform:
        translate3d(-180vw, -90vh, 0)
        rotate(-42deg)
        scale(0.35);

    filter: blur(20px);
}

.letter-r {
    transform:
        translate3d(120vw, -80vh, 0)
        rotate(55deg)
        scale(0.45);

    filter: blur(18px);
}

.letter-e {
    transform:
        translate3d(-100vw, 75vh, 0)
        rotate(65deg)
        scale(0.3);

    filter: blur(22px);
}

.letter-l {
    transform:
        translate3d(95vw, 85vh, 0)
        rotate(-58deg)
        scale(0.4);

    filter: blur(20px);
}

.letter-o {
    transform:
        translate3d(140vw, 0, 0)
        rotate(80deg)
        scale(0.32);

    filter: blur(18px);
}

.letter-a {
    transform:
        translate3d(-130vw, -20vh, 0)
        rotate(-72deg)
        scale(0.38);

    filter: blur(20px);
}

.letter-i {
    transform:
        translate3d(110vw, 35vh, 0)
        rotate(45deg)
        scale(0.32);

    filter: blur(19px);
}


.logo-space {
    width: 0.22em;
}


/*
   JS will add .assemble.
*/

.frelo-logo.assemble .logo-letter {
    opacity: 1;

    transform:
        translate3d(0, 0, 0)
        rotate(0deg)
        scale(1);

    filter: blur(0);

    transition:
        transform 1050ms var(--ease),
        opacity 700ms ease,
        filter 850ms var(--ease);
}


/*
   Slightly different timing makes
   the letters feel organic rather
   than robotic.
*/

.frelo-logo.assemble .letter-f {
    transition-delay: 50ms;
}

.frelo-logo.assemble .letter-r {
    transition-delay: 120ms;
}

.frelo-logo.assemble .letter-e {
    transition-delay: 190ms;
}

.frelo-logo.assemble .letter-l {
    transition-delay: 260ms;
}

.frelo-logo.assemble .letter-o {
    transition-delay: 330ms;
}

.frelo-logo.assemble .letter-a {
    transition-delay: 420ms;
}

.frelo-logo.assemble .letter-i {
    transition-delay: 490ms;
}


/*
   Tiny final logo breathing.
*/

.frelo-logo.assembled {
    animation:
        logoBreath 2.2s
        ease-in-out
        1;
}

@keyframes logoBreath {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.018);
    }

    100% {
        transform: scale(1);
    }
}


/* =========================================================
   LOGO BLUR EXIT
   ========================================================= */

.frelo-logo.blur-out {
    opacity: 0;

    transform:
        scale(1.08);

    filter:
        blur(24px);

    transition:
        opacity 850ms var(--ease),
        transform 1000ms var(--ease),
        filter 850ms var(--ease);
}


/* =========================================================
   WEBSITE LOADING
   ========================================================= */

.website-loading {
    position: absolute;

    left: 50%;

    top: calc(50% + 72px);

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

    opacity: 0;

    color: #6d6d6d;

    font-size: 9px;

    font-weight: 600;

    letter-spacing: 0.34em;

    white-space: nowrap;

    transition:
        opacity 600ms ease,
        transform 700ms var(--ease);
}

.website-loading.show {
    opacity: 1;

    transform:
        translate(-50%, 0);
}


/* =========================================================
   LOADING LINE
   ========================================================= */

.loading-track {
    position: absolute;

    left: 50%;

    top: calc(50% + 105px);

    transform: translateX(-50%);

    width: min(280px, 55vw);

    height: 1px;

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

    opacity: 0;

    overflow: hidden;

    transition:
        opacity 400ms ease;
}

.loading-track.show {
    opacity: 1;
}

.loading-progress {
    position: absolute;

    left: 0;
    top: 0;

    width: 0%;
    height: 100%;

    background: #fff;

    box-shadow:
        0 0 8px rgba(255, 255, 255, 0.7),
        0 0 22px rgba(255, 255, 255, 0.25);
}

.loading-track.show .loading-progress {
    animation:
        loadingRun 1.55s
        cubic-bezier(0.65, 0, 0.15, 1)
        forwards;
}

@keyframes loadingRun {
    0% {
        width: 0%;
    }

    15% {
        width: 19%;
    }

    42% {
        width: 53%;
    }

    72% {
        width: 79%;
    }

    92% {
        width: 94%;
    }

    100% {
        width: 100%;
    }
}


/* =========================================================
   STARTUP COMPLETE
   ========================================================= */

.startup-screen.exit {
    animation:
        startupExit 850ms
        cubic-bezier(0.76, 0, 0.24, 1)
        forwards;
}

@keyframes startupExit {

    0% {
        opacity: 1;

        transform:
            scale(1);

        filter:
            blur(0);
    }

    45% {
        opacity: 1;

        transform:
            scale(1.025);

        filter:
            blur(2px);
    }

    100% {
        opacity: 0;

        transform:
            scale(1.08);

        filter:
            blur(18px);

        visibility: hidden;
    }
}


/* =========================================================
   MAIN APP
   IMPORTANT:
   App is NOT hidden.
   This prevents the main website from getting stuck.
   ========================================================= */

.app {
    position: fixed;

    inset: 0;

    display: flex;

    background: #050505;

    opacity: 1;

    visibility: visible;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    position: relative;

    z-index: 30;

    width: var(--sidebar-width);

    height: 100vh;

    flex:
        0 0 var(--sidebar-width);

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            180deg,
            #0a0a0a,
            #070707
        );

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

.sidebar-top {
    padding:
        20px
        16px
        0;
}

.brand {
    display: flex;
    align-items: center;

    gap: 10px;

    height: 36px;
}

.brand-mark {
    width: 28px;
    height: 28px;

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

    border-radius: 8px;

    background: #fff;

    color: #000;

    font-size: 14px;

    font-weight: 900;
}

.brand-text {
    color: #eee;

    font-size: 16px;

    font-weight: 800;

    letter-spacing: -0.05em;
}

.brand-text span {
    color: #666;

    margin-left: 2px;
}

.new-chat-button {
    width: 100%;
    height: 44px;

    display: flex;
    align-items: center;

    gap: 10px;

    margin-top: 22px;

    padding:
        0
        14px;

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

    border-radius: 12px;

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

    color: #eee;

    font-size: 13px;

    font-weight: 600;

    transition:
        background var(--fast),
        transform var(--fast);
}

.new-chat-button:hover {
    background:
        rgba(255, 255, 255, 0.08);

    transform:
        translateY(-1px);
}

.button-icon {
    font-size: 20px;
    line-height: 1;
}


/* =========================================================
   SIDEBAR SEARCH
   ========================================================= */

.sidebar-search {
    padding:
        20px
        16px
        10px;
}

.search-wrapper {
    height: 38px;

    display: flex;
    align-items: center;

    padding:
        0
        10px;

    border-radius: 9px;

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

    border:
        1px solid transparent;

    transition:
        border-color var(--fast),
        background var(--fast);
}

.search-wrapper:focus-within {
    border-color:
        rgba(255, 255, 255, 0.13);

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

.search-icon {
    margin-right: 7px;

    color: #666;

    font-size: 17px;
}

.search-wrapper input {
    flex: 1;

    min-width: 0;

    border: 0;

    background: transparent;

    color: #ddd;

    font-size: 12px;
}

.search-wrapper input::placeholder {
    color: #555;
}

.search-shortcut {
    width: 19px;
    height: 19px;

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

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

    border-radius: 5px;

    color: #555;

    font-size: 10px;
}


/* =========================================================
   CONVERSATIONS
   ========================================================= */

.conversation-section {
    flex: 1;

    padding:
        12px
        10px;

    overflow-y: auto;

    scrollbar-width: thin;

    scrollbar-color:
        #222
        transparent;
}

.section-label {
    padding:
        0
        8px
        8px;

    color: #555;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}

.conversation-list {
    display: flex;
    flex-direction: column;

    gap: 2px;
}

.conversation-item {
    width: 100%;

    min-height: 42px;

    display: flex;
    align-items: center;

    padding:
        0
        8px
        0
        10px;

    border-radius: 9px;

    background: transparent;

    color: #999;

    text-align: left;

    transition:
        background var(--fast),
        color var(--fast);
}

.conversation-item:hover {
    background:
        rgba(255, 255, 255, 0.045);

    color: #ddd;
}

.conversation-item.active {
    background:
        rgba(255, 255, 255, 0.065);

    color: #f0f0f0;
}

.conversation-title {
    flex: 1;

    min-width: 0;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    font-size: 12px;
}

.conversation-delete {
    width: 26px;
    height: 26px;

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

    border-radius: 7px;

    background: transparent;

    color: #555;

    opacity: 0;

    transition:
        opacity var(--fast),
        background var(--fast),
        color var(--fast);
}

.conversation-item:hover .conversation-delete {
    opacity: 1;
}

.conversation-delete:hover {
    background:
        rgba(255, 70, 70, 0.1);

    color: #ff7777;
}


/* =========================================================
   SIDEBAR BOTTOM
   ========================================================= */

.sidebar-bottom {
    padding: 10px;

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

.sidebar-menu-button {
    width: 100%;
    height: 38px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding:
        0
        9px;

    border-radius: 8px;

    background: transparent;

    color: #888;

    text-align: left;

    font-size: 12px;

    transition:
        background var(--fast),
        color var(--fast);
}

.sidebar-menu-button:hover {
    background:
        rgba(255, 255, 255, 0.045);

    color: #eee;
}

.menu-icon {
    width: 20px;

    display: flex;
    justify-content: center;

    color: #777;
}

.user-area {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-top: 8px;

    padding:
        10px
        8px;

    border-top:
        1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

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

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #333,
            #151515
        );

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

    color: #ddd;

    font-size: 11px;

    font-weight: 700;
}

.user-details {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 2px;
}

.user-details strong {
    color: #ccc;

    font-size: 11px;
}

.user-details span {
    color: #555;

    font-size: 9px;
}

.user-menu-button {
    margin-left: auto;

    width: 28px;
    height: 28px;

    border-radius: 7px;

    background: transparent;

    color: #555;

    font-size: 18px;
}

.user-menu-button:hover {
    background:
        rgba(255, 255, 255, 0.06);

    color: #aaa;
}


/* =========================================================
   MAIN AREA
   ========================================================= */

.main-area {
    position: relative;

    min-width: 0;

    height: 100vh;

    flex: 1;

    display: flex;
    flex-direction: column;

    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(255, 255, 255, 0.018),
            transparent 35%
        ),
        #050505;
}


/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
    width: 100%;
    height: var(--topbar-height);

    flex: 0 0 var(--topbar-height);

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

    padding:
        0
        20px;

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

    background:
        rgba(5, 5, 5, 0.78);

    backdrop-filter: blur(18px);

    z-index: 20;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;

    gap: 8px;
}

.model-selector-button {
    display: flex;
    align-items: center;

    gap: 7px;

    padding:
        8px
        10px;

    border-radius: 9px;

    background: transparent;

    color: #ddd;

    font-size: 12px;

    font-weight: 600;
}

.model-selector-button:hover {
    background:
        rgba(255, 255, 255, 0.05);
}

.model-status {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 0 3px rgba(78, 229, 138, 0.08),
        0 0 10px rgba(78, 229, 138, 0.45);
}

.model-version {
    padding:
        2px
        5px;

    border-radius: 5px;

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

    color: #666;

    font-size: 9px;
}

.chevron {
    color: #555;
}

.topbar-button {
    width: 34px;
    height: 34px;

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

    border-radius: 8px;

    background: transparent;

    color: #777;

    font-size: 16px;
}

.topbar-button:hover {
    background:
        rgba(255, 255, 255, 0.05);

    color: #ddd;
}

.login-button {
    height: 34px;

    padding:
        0
        12px;

    border-radius: 8px;

    background: transparent;

    color: #aaa;

    font-size: 11px;

    font-weight: 600;
}

.login-button:hover {
    background:
        rgba(255, 255, 255, 0.05);

    color: #fff;
}

.signup-button {
    height: 34px;

    padding:
        0
        13px;

    border-radius: 8px;

    background: #fff;

    color: #000;

    font-size: 11px;

    font-weight: 700;

    transition:
        transform var(--fast),
        box-shadow var(--fast);
}

.signup-button:hover {
    transform:
        translateY(-1px);

    box-shadow:
        0 10px 25px rgba(255, 255, 255, 0.1);
}


/* =========================================================
   CHAT
   ========================================================= */

.chat-container {
    position: relative;

    flex: 1;

    min-height: 0;

    overflow-y: auto;

    scrollbar-width: thin;

    scrollbar-color:
        #222
        transparent;

    scroll-behavior: smooth;
}

.chat-container::-webkit-scrollbar,
.conversation-section::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track,
.conversation-section::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb,
.conversation-section::-webkit-scrollbar-thumb {
    background: #222;

    border-radius: 20px;
}


/* =========================================================
   WELCOME
   ========================================================= */

.welcome-screen {
    min-height: 100%;

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

    padding:
        70px
        24px
        150px;

    text-align: center;
}

.welcome-orb {
    width: 64px;
    height: 64px;

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

    margin-bottom: 24px;

    border-radius: 20px;

    background:
        radial-gradient(
            circle at 35% 30%,
            #333,
            #111 55%,
            #070707
        );

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

    box-shadow:
        0 0 45px rgba(255, 255, 255, 0.035),
        inset 0 1px rgba(255, 255, 255, 0.1);

    animation:
        welcomeOrbFloat 5s ease-in-out infinite;
}

.orb-inner {
    width: 32px;
    height: 32px;

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

    border-radius: 10px;

    background: #fff;

    color: #000;

    font-size: 16px;

    font-weight: 900;
}

@keyframes welcomeOrbFloat {
    0%,
    100% {
        transform: translateY(0);
    }

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

.welcome-screen h1 {
    color: #f5f5f5;

    font-size:
        clamp(
            28px,
            4vw,
            43px
        );

    line-height: 1.1;

    letter-spacing: -0.055em;

    font-weight: 700;
}

.welcome-screen > p {
    max-width: 520px;

    margin-top: 13px;

    color: #656565;

    font-size: 13px;

    line-height: 1.7;
}


/* =========================================================
   SUGGESTIONS
   ========================================================= */

.suggestion-grid {
    width: min(620px, 100%);

    display: grid;

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

    gap: 9px;

    margin-top: 36px;
}

.suggestion-card {
    min-height: 62px;

    display: flex;
    align-items: center;

    gap: 11px;

    padding:
        12px
        14px;

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

    border-radius: 12px;

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

    color: #999;

    text-align: left;

    font-size: 11px;

    transition:
        transform var(--fast),
        background var(--fast),
        border-color var(--fast),
        color var(--fast);
}

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

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

    border-color:
        rgba(255, 255, 255, 0.13);

    color: #eee;
}

.suggestion-icon {
    width: 28px;
    height: 28px;

    flex: 0 0 28px;

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

    border-radius: 8px;

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

    color: #aaa;
}


/* =========================================================
   MESSAGE LIST
   ========================================================= */

.message-list {
    width: min(850px, 100%);

    margin:
        0
        auto;

    padding:
        35px
        22px
        180px;
}

.message {
    display: flex;

    gap: 13px;

    margin-bottom: 28px;

    animation:
        messageAppear
        350ms
        var(--ease)
        forwards;
}

@keyframes messageAppear {
    from {
        opacity: 0;

        transform:
            translateY(8px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}

.message.user {
    justify-content: flex-end;
}

.message-avatar {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

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

    border-radius: 9px;

    font-size: 10px;

    font-weight: 800;
}

.message.ai .message-avatar {
    background: #fff;
    color: #000;
}

.message.user .message-avatar {
    order: 2;

    background: #181818;

    border:
        1px solid #282828;

    color: #aaa;
}

.message-body {
    max-width:
        min(
            700px,
            calc(100% - 50px)
        );

    color: #d4d4d4;

    font-size: 14px;

    line-height: 1.75;
}

.message.user .message-body {
    order: 1;

    padding:
        11px
        14px;

    border-radius:
        15px
        15px
        4px
        15px;

    background: #151515;
}

.message-body strong {
    color: #fff;
}

.message-body code {
    padding:
        2px
        5px;

    border-radius: 5px;

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

    font-size: 12px;
}

.message-body pre {
    margin:
        14px
        0;

    padding: 16px;

    overflow-x: auto;

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

    border-radius: 10px;

    background: #090909;
}


/* =========================================================
   COMPOSER
   ========================================================= */

.composer-area {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 15;

    padding:
        20px
        max(
            20px,
            calc((100% - 900px) / 2)
        )
        16px;

    background:
        linear-gradient(
            to top,
            #050505 55%,
            rgba(5, 5, 5, 0.88) 75%,
            transparent
        );

    pointer-events: none;
}

.composer-wrapper {
    width: min(820px, 100%);

    margin: 0 auto;

    pointer-events: auto;
}

.composer {
    min-height: 58px;

    display: flex;
    align-items: flex-end;

    gap: 5px;

    padding: 9px;

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

    border-radius: 17px;

    background:
        linear-gradient(
            180deg,
            rgba(23, 23, 23, 0.98),
            rgba(12, 12, 12, 0.98)
        );

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px rgba(255, 255, 255, 0.035);
}

.composer:focus-within {
    border-color:
        rgba(255, 255, 255, 0.18);
}

.composer textarea {
    flex: 1;

    min-width: 0;
    min-height: 38px;

    max-height: 180px;

    resize: none;

    padding:
        9px
        5px;

    border: 0;

    background: transparent;

    color: #eee;

    font-size: 13px;

    line-height: 20px;
}

.composer textarea::placeholder {
    color: #555;
}

.composer-button,
.send-button {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

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

    border-radius: 10px;

    background: transparent;

    color: #777;

    font-size: 17px;

    transition:
        background var(--fast),
        color var(--fast),
        transform var(--fast);
}

.composer-button:hover {
    background:
        rgba(255, 255, 255, 0.06);

    color: #ddd;
}

.voice-button.recording {
    color: #ff6767;

    background:
        rgba(255, 80, 80, 0.08);

    animation:
        voicePulse
        1s
        infinite;
}

@keyframes voicePulse {
    50% {
        box-shadow:
            0 0 0 5px
            rgba(255, 80, 80, 0.08);
    }
}

.send-button {
    background: #f5f5f5;

    color: #000;

    font-size: 19px;

    font-weight: 700;
}

.send-button:hover {
    background: #fff;

    transform:
        translateY(-1px);

    box-shadow:
        0 7px 20px
        rgba(255, 255, 255, 0.1);
}

.send-button:disabled {
    background: #262626;

    color: #555;

    cursor: not-allowed;
}


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

.composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
        8px
        5px
        0;

    color: #484848;

    font-size: 9px;
}


/* =========================================================
   LAUNCH BANNER
   ========================================================= */

.launch-banner {
    position: absolute;

    right: 20px;
    bottom: 20px;

    z-index: 16;

    display: flex;
    align-items: center;

    gap: 7px;

    padding:
        7px
        10px;

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

    border-radius: 8px;

    background:
        rgba(10, 10, 10, 0.72);

    color: #555;

    font-size: 9px;

    backdrop-filter: blur(12px);

    pointer-events: none;
}

.launch-dot {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #777;

    box-shadow:
        0 0 8px
        rgba(255, 255, 255, 0.25);
}

.launch-divider {
    color: #333;
}

.launch-text {
    color: #666;
}


/* =========================================================
   MODALS
   ========================================================= */

.modal {
    position: fixed;

    inset: 0;

    z-index: 100;

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

    padding: 20px;
}

.modal-backdrop {
    position: absolute;

    inset: 0;

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

    backdrop-filter: blur(12px);
}

.modal-card {
    position: relative;

    z-index: 2;

    width: min(420px, 100%);

    padding: 30px;

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

    border-radius: 20px;

    background:
        linear-gradient(
            180deg,
            #141414,
            #0b0b0b
        );

    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.65);

    animation:
        modalAppear
        280ms
        var(--ease)
        forwards;
}

@keyframes modalAppear {
    from {
        opacity: 0;

        transform:
            translateY(10px)
            scale(0.97);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

.modal-close {
    position: absolute;

    top: 13px;
    right: 13px;

    width: 30px;
    height: 30px;

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

    border-radius: 8px;

    background: transparent;

    color: #666;

    font-size: 20px;
}

.modal-close:hover {
    background:
        rgba(255, 255, 255, 0.06);

    color: #ddd;
}

.modal-logo {
    width: 42px;
    height: 42px;

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

    margin-bottom: 18px;

    border-radius: 12px;

    background: #fff;

    color: #000;

    font-size: 18px;

    font-weight: 900;
}

.modal-card h2 {
    color: #f3f3f3;

    font-size: 22px;

    letter-spacing: -0.035em;
}

.modal-card > p {
    margin-top: 7px;

    color: #666;

    font-size: 12px;

    line-height: 1.6;
}

.modal-card form {
    display: flex;
    flex-direction: column;

    margin-top: 24px;
}

.modal-card label {
    margin-bottom: 7px;

    color: #999;

    font-size: 10px;

    font-weight: 600;
}

.modal-card input {
    height: 42px;

    margin-bottom: 15px;

    padding:
        0
        12px;

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

    border-radius: 9px;

    background: #090909;

    color: #eee;

    font-size: 12px;
}

.modal-primary-button {
    height: 43px;

    margin-top: 5px;

    border-radius: 9px;

    background: #fff;

    color: #000;

    font-size: 11px;

    font-weight: 700;
}

.modal-divider {
    display: flex;
    align-items: center;

    gap: 10px;

    margin: 20px 0;

    color: #444;

    font-size: 10px;
}

.modal-divider::before,
.modal-divider::after {
    content: "";

    flex: 1;

    height: 1px;

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

.social-login-button {
    width: 100%;
    height: 42px;

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

    border-radius: 9px;

    background: #111;

    color: #bbb;

    font-size: 11px;

    font-weight: 600;
}

.social-login-button:hover {
    background: #171717;

    color: #eee;
}

.modal-footer-text {
    text-align: center;
}

.modal-footer-text button {
    background: transparent;

    color: #ddd;

    font-weight: 600;
}


/* =========================================================
   SETTINGS
   ========================================================= */

.settings-card {
    width: min(520px, 100%);
}

.settings-list {
    display: flex;
    flex-direction: column;

    margin-top: 25px;

    border-top:
        1px solid rgba(255, 255, 255, 0.06);
}

.setting-row {
    min-height: 70px;

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

    gap: 20px;

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

.setting-row > div {
    display: flex;
    flex-direction: column;

    gap: 4px;
}

.setting-row strong {
    color: #ddd;

    font-size: 12px;
}

.setting-row span {
    color: #555;

    font-size: 10px;
}

.setting-toggle {
    min-width: 46px;

    height: 25px;

    padding:
        0
        8px;

    border-radius: 20px;

    background: #1b1b1b;

    color: #555;

    font-size: 8px;

    font-weight: 700;
}

.setting-toggle.active {
    background: #fff;

    color: #000;
}


/* =========================================================
   HELP
   ========================================================= */

.help-items {
    display: flex;
    flex-direction: column;

    margin-top: 25px;

    border-top:
        1px solid rgba(255, 255, 255, 0.06);
}

.help-item {
    min-height: 55px;

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

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

.help-item strong {
    color: #bbb;

    font-size: 11px;
}

.help-item span {
    color: #555;

    font-size: 10px;
}


/* =========================================================
   TOASTS
   ========================================================= */

.toast-container {
    position: fixed;

    right: 20px;
    bottom: 25px;

    z-index: 500;

    display: flex;
    flex-direction: column;

    gap: 8px;

    pointer-events: none;
}

.toast {
    max-width: 300px;

    padding:
        10px
        13px;

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

    border-radius: 9px;

    background: #151515;

    color: #ccc;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.4);

    font-size: 10px;

    animation:
        toastIn
        250ms
        ease
        forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;

        transform:
            translateY(8px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

.mobile-only {
    display: none;
}

@media (max-width: 800px) {

    .sidebar {
        position: fixed;

        left: 0;
        top: 0;
        bottom: 0;

        transform:
            translateX(-100%);

        transition:
            transform 300ms var(--ease);

        box-shadow:
            20px 0 70px rgba(0, 0, 0, 0.5);
    }

    .sidebar.mobile-open {
        transform:
            translateX(0);
    }

    .mobile-only {
        display: flex;
    }

    .topbar {
        padding:
            0
            12px;
    }

    .topbar-right {
        gap: 2px;
    }

    .model-version {
        display: none;
    }

    .welcome-screen {
        padding:
            55px
            18px
            170px;
    }

    .welcome-screen h1 {
        font-size: 30px;
    }

    .suggestion-grid {
        grid-template-columns: 1fr;

        width: min(400px, 100%);

        margin-top: 28px;
    }

    .message-list {
        padding:
            25px
            14px
            180px;
    }

    .composer-area {
        padding:
            15px
            10px
            12px;
    }

    .composer-footer,
    .launch-banner {
        display: none;
    }

    .frelo-logo {
        font-size:
            clamp(
                38px,
                12vw,
                75px
            );
    }

    .website-loading {
        top: calc(50% + 62px);
    }

    .loading-track {
        top: calc(50% + 92px);
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .topbar {
        height: 60px;

        flex-basis: 60px;
    }

    .login-button {
        padding:
            0
            8px;
    }

    .signup-button {
        padding:
            0
            10px;
    }

    .welcome-screen h1 {
        font-size: 27px;
    }

    .composer {
        min-height: 54px;

        border-radius: 15px;

        padding: 7px;
    }

    .composer-button,
    .send-button {
        width: 35px;
        height: 35px;

        flex-basis: 35px;
    }

    .frelo-logo {
        font-size:
            clamp(
                34px,
                12vw,
                58px
            );
    }

    .website-loading {
        font-size: 7px;

        letter-spacing: 0.28em;
    }

    .loading-track {
        width: 210px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   FRELO AI
   STREAMING CURSOR
========================================================= */

.frelo-streaming-cursor {

    display: inline-block;

    width: 2px;

    height: 1em;

    margin-left: 4px;

    vertical-align: -2px;

    background: #ffffff;

    border-radius: 2px;

    animation:
        freloStreamingCursor
        0.8s ease-in-out infinite;

}


@keyframes freloStreamingCursor {

    0%,
    100% {

        opacity: 0.2;

    }

    50% {

        opacity: 1;

    }

}

/* =========================================================
   FRELO AI
   PROFESSIONAL RESPONSE STYLING
========================================================= */


/* ---------------------------------------------------------
   HEADINGS
--------------------------------------------------------- */

.message-body h2,
.message-body h3,
.message-body h4 {

    margin:
        18px 0 9px;

    color:
        #ffffff;

    font-weight:
        600;

    line-height:
        1.35;

}


.message-body h2 {

    font-size:
        20px;

}


.message-body h3 {

    font-size:
        17px;

}


.message-body h4 {

    font-size:
        15px;

}


/* ---------------------------------------------------------
   INLINE CODE
--------------------------------------------------------- */

.frelo-inline-code {

    padding:
        2px 6px;

    border-radius:
        5px;

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

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

    color:
        #f1f1f1;

    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;

    font-size:
        0.9em;

}


/* ---------------------------------------------------------
   CODE BLOCK
--------------------------------------------------------- */

.frelo-code-block {

    position:
        relative;

    margin:
        14px 0;

    padding:
        16px;

    overflow-x:
        auto;

    background:
        #080808;

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

    border-radius:
        10px;

    box-shadow:
        0 12px 30px
        rgba(0,0,0,0.25);

}


.frelo-code-block code {

    color:
        #e6e6e6;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size:
        13px;

    line-height:
        1.65;

    white-space:
        pre;

}


/* ---------------------------------------------------------
   QUOTES
--------------------------------------------------------- */

.message-body blockquote {

    margin:
        12px 0;

    padding:
        8px 14px;

    border-left:
        2px solid
        #666;

    color:
        #a5a5a5;

}


/* ---------------------------------------------------------
   LISTS
--------------------------------------------------------- */

.message-body ul {

    margin:
        10px 0;

    padding-left:
        22px;

}


.message-body li {

    margin:
        5px 0;

}


/* ---------------------------------------------------------
   LINKS
--------------------------------------------------------- */

.frelo-link {

    color:
        #ffffff;

    text-decoration:
        underline;

    text-decoration-color:
        rgba(255,255,255,0.35);

    text-underline-offset:
        3px;

}


.frelo-link:hover {

    text-decoration-color:
        #ffffff;

}


/* ---------------------------------------------------------
   AI RESPONSE ACTION BAR
--------------------------------------------------------- */

.frelo-response-actions {

    display:
        flex;

    align-items:
        center;

    gap:
        5px;

    margin-top:
        10px;

    opacity:
        0;

    transform:
        translateY(4px);

    transition:
        opacity 180ms ease,
        transform 180ms ease;

}


.message.ai:hover
.frelo-response-actions {

    opacity:
        1;

    transform:
        translateY(0);

}


.frelo-response-action {

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    width:
        30px;

    height:
        28px;

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

    border-radius:
        7px;

    background:
        transparent;

    color:
        #777;

    cursor:
        pointer;

    transition:
        all 160ms ease;

}


.frelo-response-action:hover {

    color:
        #ffffff;

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

    border-color:
        rgba(255,255,255,0.13);

}


.frelo-response-action.active {

    color:
        #ffffff;

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

}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (
    max-width: 700px
) {

    .frelo-response-actions {

        opacity:
            1;

        transform:
            none;

    }

}
