/* =========================================================
   SS RACETECH AI PARTS FINDER
   DARK MOTORSPORT UI
========================================================= */


* {

    margin: 0;
    padding: 0;

    box-sizing: border-box;

}


:root {

    --bg: #080808;
    --panel: #111111;
    --panel-light: #171717;
    --panel-hover: #1c1c1c;

    --red: #e00000;
    --red-bright: #ff2020;
    --red-dark: #9e0000;

    --white: #ffffff;
    --text: #eeeeee;
    --muted: #8b8b8b;
    --muted-light: #b5b5b5;

    --border: #292929;
    --border-light: #363636;

}


html {

    background: var(--bg);

}


body {

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(220, 0, 0, 0.14),
            transparent 42%
        ),
        linear-gradient(
            180deg,
            #0b0b0b 0%,
            #060606 100%
        );

    color: var(--text);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

}


/* =========================================================
   APP
========================================================= */


.app-shell {

    width: min(
        1100px,
        calc(100% - 32px)
    );

    margin: 0 auto;

    padding:
        32px
        0
        24px;

}


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


.app-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 22px;

}


.brand {

    display: flex;

    align-items: center;

    gap: 14px;

}


.brand-mark {

    width: 52px;
    height: 52px;

    display: flex;

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

    background:
        linear-gradient(
            145deg,
            #1d1d1d,
            #0e0e0e
        );

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

    border-radius: 14px;

    font-size: 25px;

    box-shadow:
        0 8px 25px
        rgba(0, 0, 0, 0.35);

}


.brand-name {

    font-size: 25px;

    font-weight: 900;

    letter-spacing: 2px;

    color: var(--white);

}


.brand-subtitle {

    margin-top: 3px;

    color: var(--red-bright);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 3px;

}


.ai-status {

    display: flex;

    align-items: center;

    gap: 8px;

    padding:
        9px
        13px;

    border:
        1px solid
        rgba(255, 30, 30, 0.28);

    border-radius: 999px;

    background:
        rgba(130, 0, 0, 0.10);

    color: #d6d6d6;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.5px;

}


.status-dot {

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #ff2424;

    box-shadow:
        0 0 10px
        rgba(255, 30, 30, 0.8);

}


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


.chat-panel {

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #151515,
            #0e0e0e
        );

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

    border-radius: 22px;

    box-shadow:

        0 25px 70px
        rgba(0, 0, 0, 0.55),

        0 0 50px
        rgba(210, 0, 0, 0.07);

}


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


.chat-header {

    display: flex;

    align-items: center;

    gap: 13px;

    padding:
        17px
        21px;

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

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

}


.assistant-avatar {

    width: 40px;
    height: 40px;

    display: flex;

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

    border-radius: 11px;

    background:
        linear-gradient(
            145deg,
            var(--red),
            var(--red-dark)
        );

    box-shadow:
        0 5px 18px
        rgba(220, 0, 0, 0.25);

    font-size: 18px;

}


.assistant-info {

    display: flex;

    flex-direction: column;

    gap: 3px;

}


.assistant-info strong {

    color: var(--white);

    font-size: 14px;

}


.assistant-info span {

    color: var(--muted);

    font-size: 11px;

}


/* =========================================================
   MESSAGE AREA
========================================================= */


.messages {

    height: 430px;

    overflow-y: auto;

    padding:
        25px;

    scroll-behavior: smooth;

}


.messages::-webkit-scrollbar {

    width: 7px;

}


.messages::-webkit-scrollbar-track {

    background: transparent;

}


.messages::-webkit-scrollbar-thumb {

    background: #303030;

    border-radius: 20px;

}


.messages::-webkit-scrollbar-thumb:hover {

    background: #444;

}


/* =========================================================
   MESSAGE ROWS
========================================================= */


.message-row {

    display: flex;

    gap: 10px;

    margin-bottom: 18px;

}


.bot-row {

    justify-content: flex-start;

}


.bot-avatar {

    flex:
        0 0 32px;

    width: 32px;
    height: 32px;

    display: flex;

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

    margin-top: 3px;

    border-radius: 9px;

    background: #202020;

    border:
        1px solid
        #333;

    font-size: 14px;

}


/* =========================================================
   BOT MESSAGE
========================================================= */


.bot {

    max-width: 760px;

}


.message-bubble {

    background:
        linear-gradient(
            145deg,
            #1b1b1b,
            #141414
        );

    border:
        1px solid
        #303030;

    border-left:
        3px solid
        var(--red);

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

    padding:
        17px
        19px;

    line-height: 1.6;

    box-shadow:
        0 8px 25px
        rgba(0, 0, 0, 0.20);

}


.message-label {

    margin-bottom: 8px;

    color: var(--red-bright);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 2px;

}


.welcome-title {

    margin-bottom: 5px;

    color: var(--white);

    font-size: 20px;

    font-weight: 800;

}


.message-bubble p {

    margin: 0;

    color: #bcbcbc;

    text-align: left;

    font-size: 14px;

}


/* =========================================================
   QUICK PROMPTS
========================================================= */


.quick-prompts {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 16px;

}


.quick-prompts button {

    padding:
        8px
        11px;

    background: #101010;

    color: #d2d2d2;

    border:
        1px solid
        #353535;

    border-radius: 8px;

    font-size: 11px;

    font-weight: 700;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;

}


.quick-prompts button:hover {

    background: #1c1c1c;

    border-color:
        var(--red);

    color: white;

    transform:
        translateY(-1px);

}


/* =========================================================
   USER MESSAGE
========================================================= */


.user {

    width: fit-content;

    max-width: 75%;

    margin-left: auto;
    margin-bottom: 18px;

    padding:
        12px
        16px;

    background:
        linear-gradient(
            145deg,
            #d90000,
            #a50000
        );

    color: white;

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

    font-size: 14px;

    line-height: 1.5;

    box-shadow:
        0 7px 20px
        rgba(190, 0, 0, 0.16);

}


/* =========================================================
   AI SUMMARY
========================================================= */


.ai-summary {

    background:
        linear-gradient(
            145deg,
            #191919,
            #111111
        );

    border:
        1px solid
        #333;

    border-left:
        3px solid
        var(--red);

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

    padding:
        18px
        20px;

    margin-bottom: 16px;

    box-shadow:
        0 8px 25px
        rgba(0, 0, 0, 0.20);

    line-height: 1.65;

}


.ai-summary strong {

    color: white;

    font-size: 16px;

}


.ai-summary p {

    margin:
        9px 0;

    color: #bdbdbd;

    text-align: left;

    font-size: 13px;

}


.ai-summary .highlight {

    color:
        var(--red-bright);

    font-weight: 800;

}


/* =========================================================
   PRODUCT CARDS
========================================================= */


.product-card {

    position: relative;

    background:
        linear-gradient(
            145deg,
            #171717,
            #0d0d0d
        );

    border:
        1px solid
        #2c2c2c;

    border-radius: 16px;

    padding: 20px;

    margin:
        13px 0;

    text-align: center;

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

    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;

}


.product-card:hover {

    transform:
        translateY(-2px);

    border-color:
        rgba(255, 25, 25, 0.65);

    box-shadow:
        0 15px 35px
        rgba(0, 0, 0, 0.35),

        0 0 25px
        rgba(220, 0, 0, 0.08);

}


.product-card img {

    display: block;

    width: 100%;

    max-width: 260px;

    height: 210px;

    object-fit: contain;

    margin:
        0 auto 16px;

    border-radius: 10px;

}


.product-card strong {

    display: inline-block;

    color: white;

    font-size: 16px;

    line-height: 1.45;

}


.product-card small {

    display: inline-block;

    margin-top: 7px;

    color: #777;

    font-size: 10px;

    letter-spacing: .4px;

}


/* =========================================================
   BEST MATCH
========================================================= */


.best-match {

    display: inline-block;

    margin-bottom: 14px;

    padding:
        6px
        10px;

    background:
        rgba(220, 0, 0, 0.10);

    border:
        1px solid
        rgba(255, 30, 30, 0.35);

    border-radius: 999px;

    color:
        var(--red-bright);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 1.5px;

}


/* =========================================================
   PRODUCT BUTTON
========================================================= */


.product-button {

    display: inline-flex;

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

    gap: 8px;

    margin-top: 17px;

    padding:
        11px
        20px;

    background:
        linear-gradient(
            145deg,
            #df0000,
            #aa0000
        );

    color: white;

    border-radius: 8px;

    text-decoration: none;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: .8px;

    box-shadow:
        0 6px 18px
        rgba(200, 0, 0, 0.18);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;

}


.product-button:hover {

    transform:
        translateY(-1px);

    background:
        linear-gradient(
            145deg,
            #ff2020,
            #c00000
        );

    box-shadow:
        0 8px 22px
        rgba(220, 0, 0, 0.28);

}


/* =========================================================
   INPUT
========================================================= */


.input-section {

    padding:
        17px
        21px
        20px;

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

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

}


.input-wrapper {

    display: flex;

    gap: 10px;

}


input {

    flex: 1;

    min-width: 0;

    padding:
        14px
        16px;

    background: #0b0b0b;

    color: white;

    border:
        1px solid
        #343434;

    border-radius: 10px;

    outline: none;

    font-family: inherit;

    font-size: 14px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;

}


input::placeholder {

    color: #666;

}


input:focus {

    border-color:
        rgba(255, 25, 25, 0.65);

    box-shadow:
        0 0 0 3px
        rgba(220, 0, 0, 0.07);

}


#sendBtn {

    display: flex;

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

    gap: 9px;

    min-width: 125px;

    padding:
        0
        19px;

    background:
        linear-gradient(
            145deg,
            #e00000,
            #a90000
        );

    color: white;

    border: none;

    border-radius: 10px;

    cursor: pointer;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 1px;

    box-shadow:
        0 6px 20px
        rgba(200, 0, 0, 0.18);

    transition:
        transform .2s ease,
        background .2s ease,
        box-shadow .2s ease;

}


#sendBtn:hover {

    transform:
        translateY(-1px);

    background:
        linear-gradient(
            145deg,
            #ff2020,
            #c00000
        );

    box-shadow:
        0 9px 25px
        rgba(220, 0, 0, 0.27);

}


.send-arrow {

    font-size: 16px;

}


.input-hint {

    margin-top: 8px;

    color: #555;

    font-size: 10px;

    text-align: center;

}


.ai-disclaimer {

    margin-top: 10px;

    color: #666;

    font-size: 9px;

    line-height: 1.5;

    text-align: center;

}

.ai-disclaimer strong {

    color: #888;

    font-weight: 700;

}


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


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


.app-footer {

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 9px;

    margin-top: 17px;

    color: #4f4f4f;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.5px;

}


.footer-divider {

    color:
        var(--red-dark);

}


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


@media (
    max-width: 700px
) {

    .app-shell {

        width:
            calc(100% - 18px);

        padding-top: 15px;

    }


    .app-header {

        margin-bottom: 14px;

    }


    .brand-mark {

        width: 44px;
        height: 44px;

        font-size: 21px;

    }


    .brand-name {

        font-size: 20px;

        letter-spacing: 1.5px;

    }


    .brand-subtitle {

        font-size: 9px;

        letter-spacing: 2px;

    }


    .ai-status {

        padding:
            7px
            9px;

        font-size: 8px;

    }


    .chat-panel {

        border-radius: 17px;

    }


    .messages {

        height: 58vh;

        min-height: 420px;

        padding:
            16px;

    }


    .input-section {

        padding:
            13px;

    }


    .input-wrapper {

        gap: 7px;

    }


    #sendBtn {

        min-width: 92px;

        padding:
            0
            13px;

    }


    .user {

        max-width: 88%;

    }


    .product-card {

        padding: 15px;

    }


    .product-card img {

        height: 175px;

    }


    .quick-prompts {

        gap: 6px;

    }

}


@media (
    max-width: 430px
) {

    .ai-status span:last-child {

        display: none;

    }


    .ai-status {

        border: none;

        background: transparent;

        padding: 4px;

    }


    .input-hint {

        display: none;

    }


    #sendBtn span:first-child {

        display: none;

    }


    #sendBtn {

        min-width: 54px;

    }

}