* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    background: #08090d;
    color: #f5f5f7;
}

button,
textarea,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}


/* =========================================================
   LOGIN
   ========================================================= */

.screen {
    width: 100%;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(91, 70, 255, .18),
            transparent 35%
        ),
        #08090d;
}

.login-card {
    width: min(420px, 100%);

    padding: 45px 40px;

    text-align: center;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 26px;

    background: rgba(18,19,26,.88);

    box-shadow:
        0 30px 100px rgba(0,0,0,.45);
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    font-size: 22px;
    font-weight: 700;
}

.brand-icon {
    width: 43px;
    height: 43px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #735cff,
            #38c7ff
        );

    box-shadow:
        0 0 35px rgba(94,88,255,.3);
}

.brand-icon.small {
    width: 34px;
    height: 34px;

    border-radius: 10px;

    font-size: 15px;
}

.login-card h1 {
    margin-top: 35px;

    font-size: 30px;
    letter-spacing: -.7px;
}

.login-card p {
    margin-top: 12px;

    color: #9da1ad;

    line-height: 1.6;
}

.google-button {
    margin-top: 30px;

    width: 100%;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    color: #171717;
    background: white;

    border-radius: 13px;

    text-decoration: none;

    font-weight: 600;

    transition: .2s;
}

.google-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 30px rgba(255,255,255,.12);
}

.google-button svg {
    width: 20px;
    height: 20px;
}

.login-note {
    margin-top: 20px;

    color: #666a78;

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   APP
   ========================================================= */

.app {
    width: 100%;
    height: 100vh;

    display: flex;

    background: #08090d;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    width: 270px;
    height: 100%;

    display: flex;
    flex-direction: column;

    background: #0d0e13;

    border-right: 1px solid rgba(255,255,255,.07);

    z-index: 50;
}

.sidebar-top {
    padding: 18px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: flex;
    align-items: center;

    gap: 10px;

    font-weight: 700;
}

.new-chat {
    width: 100%;

    margin-top: 20px;

    padding: 12px 14px;

    display: flex;
    align-items: center;

    gap: 9px;

    color: white;

    background: rgba(255,255,255,.06);

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 11px;

    transition: .2s;
}

.new-chat:hover {
    background: rgba(255,255,255,.1);

    border-color:
        rgba(115,92,255,.35);
}

.new-chat span {
    font-size: 20px;
}


/* =========================================================
   HISTORY
   ========================================================= */

.history {
    flex: 1;

    padding: 10px;

    overflow-y: auto;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 2px;
}

.history-title {
    padding: 10px;

    color: #707482;

    font-size: 12px;
    text-transform: uppercase;
}

.icon-button {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    color: #777b88;

    background: transparent;

    border: none;
    border-radius: 9px;

    transition: .15s;
}

.icon-button:hover {
    color: white;

    background: rgba(255,255,255,.07);
}

.history-item-wrapper {
    position: relative;

    display: flex;
    align-items: center;

    margin-bottom: 2px;
}

.history-item {
    width: 100%;

    padding: 11px 38px 11px 12px;

    overflow: hidden;

    text-align: left;
    white-space: nowrap;
    text-overflow: ellipsis;

    color: #aeb1bd;

    background: transparent;

    border: none;
    border-radius: 9px;

    transition: .15s;
}

.history-item:hover,
.history-item.active {
    color: white;
    background: rgba(255,255,255,.07);
}

.history-item.active {
    box-shadow:
        inset 2px 0 0 #735cff;
}

.history-item-menu {
    position: absolute;

    right: 4px;

    width: 30px;
    height: 30px;

    display: grid;
    place-items: center;

    color: #777b88;

    background: transparent;

    border: none;
    border-radius: 8px;
}

.history-item-menu:hover {
    color: white;
    background: rgba(255,255,255,.08);
}

.chat-search {
    padding: 5px 4px 10px;
}

.chat-search input {
    width: 100%;
    height: 38px;

    padding: 0 12px;

    outline: none;

    color: white;
    background: #17181f;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
}

.chat-search input:focus {
    border-color: rgba(115,92,255,.55);

    box-shadow:
        0 0 0 3px rgba(115,92,255,.08);
}

.empty-history {
    padding: 40px 15px;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 9px;

    text-align: center;

    color: #555965;

    font-size: 12px;
}

.empty-history-icon {
    font-size: 24px;
    opacity: .7;
}


/* =========================================================
   USER
   ========================================================= */

.sidebar-bottom {
    position: relative;

    padding: 15px;

    border-top: 1px solid rgba(255,255,255,.07);
}

.user-profile {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 10px;

    min-width: 0;

    padding: 5px;

    color: white;

    background: transparent;

    border: none;
    border-radius: 10px;

    text-align: left;
}

.user-profile:hover {
    background: rgba(255,255,255,.05);
}

.user-profile img {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    object-fit: cover;

    border-radius: 50%;
}

.user-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.user-info strong {
    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    font-size: 13px;
}

.user-info span {
    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    color: #727582;

    font-size: 11px;
}


/* =========================================================
   PROFILE MENU
   ========================================================= */

.profile-menu {
    position: absolute;

    left: 15px;
    right: 15px;
    bottom: 70px;

    padding: 6px;

    background: #17181f;

    border: 1px solid rgba(255,255,255,.09);
    border-radius: 13px;

    box-shadow:
        0 20px 60px rgba(0,0,0,.5);

    z-index: 100;
}

.profile-menu button {
    width: 100%;
    height: 40px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 0 11px;

    color: #b9bbc5;

    background: transparent;

    border: none;
    border-radius: 8px;

    text-align: left;

    font-size: 13px;
}

.profile-menu button:hover {
    color: white;

    background: rgba(255,255,255,.07);
}

.profile-menu button.danger {
    color: #ff7373;
}

.profile-menu button.danger:hover {
    background: rgba(255,70,70,.08);
}

.profile-divider {
    height: 1px;

    margin: 5px 4px;

    background: rgba(255,255,255,.07);
}


/* =========================================================
   CHAT
   ========================================================= */

.chat {
    flex: 1;

    min-width: 0;
    height: 100%;

    display: flex;
    flex-direction: column;
}

.chat-header {
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

    border-bottom: 1px solid rgba(255,255,255,.06);

    background: rgba(8,9,13,.72);

    backdrop-filter: blur(15px);

    z-index: 10;
}

.chat-header-left {
    display: flex;
    align-items: center;

    gap: 8px;
}

.chat-header-info {
    display: flex;
    flex-direction: column;
}

.chat-title {
    font-size: 15px;
    font-weight: 600;
}

.status {
    display: flex;
    align-items: center;

    gap: 6px;

    margin-top: 3px;

    color: #777b88;

    font-size: 11px;
}

.status > span:first-child {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #59d98a;

    box-shadow:
        0 0 10px rgba(89,217,138,.7);
}

.status > span:first-child.thinking {
    background: #f0b84b;

    box-shadow:
        0 0 10px rgba(240,184,75,.6);
}

.status > span:first-child.error {
    background: #ff5f5f;

    box-shadow:
        0 0 10px rgba(255,95,95,.6);
}

.status > span:first-child.stopped {
    background: #777b88;

    box-shadow: none;
}

.chat-actions {
    display: flex;
    align-items: center;

    gap: 4px;
}

.danger-icon:hover {
    color: #ff7373;

    background: rgba(255,70,70,.08);
}

.mobile-menu,
.mobile-close {
    display: none;
}


/* =========================================================
   MESSAGES
   ========================================================= */

.messages {
    flex: 1;

    overflow-y: auto;

    padding: 40px 20px 130px;
}

.welcome {
    max-width: 760px;

    margin: 80px auto 0;

    text-align: center;
}

.welcome-icon {
    width: 58px;
    height: 58px;

    margin: auto;

    display: grid;
    place-items: center;

    border-radius: 18px;

    font-size: 23px;
    font-weight: 700;

    background:
        linear-gradient(
            135deg,
            #735cff,
            #38c7ff
        );

    box-shadow:
        0 0 50px rgba(91,92,255,.25);
}

.welcome h1 {
    margin-top: 25px;

    font-size: 32px;
    letter-spacing: -1px;
}

.welcome p {
    margin-top: 10px;

    color: #777b88;

    line-height: 1.5;
}

.suggestions {
    margin-top: 30px;

    display: flex;
    justify-content: center;

    flex-wrap: wrap;

    gap: 10px;
}

.suggestions button {
    padding: 10px 14px;

    color: #b9bbc5;

    background: rgba(255,255,255,.04);

    border: 1px solid rgba(255,255,255,.08);

    border-radius: 10px;

    font-size: 13px;

    transition: .2s;
}

.suggestions button:hover {
    color: white;

    background: rgba(255,255,255,.08);

    border-color:
        rgba(115,92,255,.3);
}


/* =========================================================
   MESSAGE
   ========================================================= */

.message {
    max-width: 800px;

    margin: 0 auto 28px;

    display: flex;

    gap: 15px;
}

.message-avatar {
    width: 32px;
    height: 32px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 10px;

    font-size: 12px;
    font-weight: 700;

    background: #20222c;
}

.user-message .message-avatar {
    background: #30323d;
}

.message-body {
    max-width: 720px;

    padding-top: 6px;

    color: #e4e5e9;

    line-height: 1.65;

    white-space: pre-wrap;
}

.message-actions {
    display: flex;

    gap: 4px;

    margin-top: 8px;

    opacity: 0;

    transition: .15s;
}

.message:hover .message-actions {
    opacity: 1;
}

.message-actions button {
    padding: 5px 8px;

    color: #777b88;

    background: rgba(255,255,255,.04);

    border: 1px solid rgba(255,255,255,.06);
    border-radius: 7px;

    font-size: 11px;
}

.message-actions button:hover {
    color: white;

    background: rgba(255,255,255,.08);
}


/* =========================================================
   GENERATION
   ========================================================= */

.generation-status {
    width: min(800px, calc(100% - 40px));

    margin: 0 auto 8px;

    display: flex;
    align-items: center;

    gap: 10px;

    color: #777b88;

    font-size: 11px;
}

.typing-indicator {
    display: flex;

    gap: 3px;
}

.typing-indicator span {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #735cff;

    animation: typing 1.2s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: .15s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes typing {
    0%,
    60%,
    100% {
        opacity: .25;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.generation-status button {
    margin-left: auto;

    padding: 6px 10px;

    color: #aeb1bd;

    background: rgba(255,255,255,.05);

    border: 1px solid rgba(255,255,255,.07);
    border-radius: 8px;

    font-size: 11px;
}

.generation-status button:hover {
    color: white;

    background: rgba(255,255,255,.09);
}


/* =========================================================
   COMPOSER
   ========================================================= */

.composer-area {
    position: fixed;

    left: 270px;
    right: 0;
    bottom: 0;

    padding: 20px 20px 15px;

    background:
        linear-gradient(
            transparent,
            #08090d 25%
        );

    z-index: 20;
}

.composer {
    max-width: 800px;

    margin: auto;

    display: flex;
    align-items: flex-end;

    padding: 8px 8px 8px 16px;

    background: #17181f;

    border: 1px solid rgba(255,255,255,.1);
    border-radius: 17px;

    box-shadow:
        0 10px 40px rgba(0,0,0,.3);

    transition: .2s;
}

.composer:focus-within {
    border-color:
        rgba(115,92,255,.35);

    box-shadow:
        0 10px 40px rgba(0,0,0,.3),
        0 0 0 3px rgba(115,92,255,.06);
}

.composer textarea {
    flex: 1;

    max-height: 180px;

    padding: 10px 5px;

    resize: none;

    color: white;

    background: transparent;

    border: none;
    outline: none;

    line-height: 1.5;
}

.composer textarea::placeholder {
    color: #6f7380;
}

.composer-actions {
    display: flex;
    align-items: center;

    gap: 4px;
}

.composer-button,
.send-button {
    width: 39px;
    height: 39px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border: none;
    border-radius: 11px;

    transition: .2s;
}

.composer-button {
    color: #777b88;

    background: transparent;

    font-size: 17px;
}

.composer-button:hover {
    color: white;

    background: rgba(255,255,255,.07);
}

.send-button {
    color: white;

    background:
        linear-gradient(
            135deg,
            #735cff,
            #38c7ff
        );

    font-size: 22px;

    box-shadow:
        0 0 20px rgba(91,92,255,.15);
}

.send-button:hover {
    transform: scale(1.04);

    box-shadow:
        0 0 25px rgba(91,92,255,.3);
}

.send-button:disabled {
    opacity: .35;

    transform: none;

    cursor: default;
}

.composer-footer {
    max-width: 800px;

    margin: 7px auto 0;

    display: flex;
    justify-content: space-between;
}

.composer-note {
    color: #50535e;

    font-size: 10px;
}

.message-counter {
    color: #50535e;

    font-size: 10px;
}


/* =========================================================
   MODALS
   ========================================================= */

.modal {
    position: fixed;

    inset: 0;

    z-index: 200;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.modal-backdrop {
    position: absolute;

    inset: 0;

    background: rgba(0,0,0,.65);

    backdrop-filter: blur(7px);
}

.modal-card {
    position: relative;

    width: min(450px, 100%);

    padding: 25px;

    background: #12131a;

    border: 1px solid rgba(255,255,255,.09);
    border-radius: 19px;

    box-shadow:
        0 30px 100px rgba(0,0,0,.6);

    animation:
        modal-in .16s ease-out;
}

@keyframes modal-in {
    from {
        opacity: 0;

        transform:
            translateY(8px)
            scale(.98);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 19px;
    font-weight: 650;
}

.modal-header p {
    margin-top: 6px;

    color: #777b88;

    font-size: 12px;
}

.modal-close {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    color: #777b88;

    background: transparent;

    border: none;
    border-radius: 9px;

    font-size: 22px;
}

.modal-close:hover {
    color: white;

    background: rgba(255,255,255,.07);
}

.modal-input {
    width: 100%;
    height: 46px;

    padding: 0 13px;

    outline: none;

    color: white;
    background: #08090d;

    border: 1px solid rgba(255,255,255,.1);
    border-radius: 11px;
}

.modal-input:focus {
    border-color: #735cff;

    box-shadow:
        0 0 0 3px rgba(115,92,255,.1);
}

.modal-input::placeholder {
    color: #555965;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;

    gap: 8px;

    margin-top: 22px;
}

.modal-actions button {
    min-height: 42px;

    padding: 0 16px;

    border-radius: 10px;

    border: 1px solid transparent;

    font-size: 13px;
    font-weight: 600;

    transition: .15s;
}

.secondary-button {
    color: #aeb1bd;

    background: rgba(255,255,255,.05);

    border-color:
        rgba(255,255,255,.07) !important;
}

.secondary-button:hover {
    color: white;

    background: rgba(255,255,255,.09);
}

.primary-button {
    color: white;

    background:
        linear-gradient(
            135deg,
            #735cff,
            #38c7ff
        );

    box-shadow:
        0 0 20px rgba(91,92,255,.12);
}

.primary-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 0 25px rgba(91,92,255,.25);
}

.danger-button {
    color: white;

    background: #d94343;
}

.danger-button:hover {
    background: #ee4e4e;

    transform: translateY(-1px);
}

.modal-warning-icon {
    width: 45px;
    height: 45px;

    display: grid;
    place-items: center;

    margin-bottom: 14px;

    border-radius: 13px;

    background: rgba(255,70,70,.1);

    font-size: 20px;
}

.modal-description {
    color: #888c99;

    line-height: 1.6;

    font-size: 13px;
}


/* =========================================================
   SETTINGS
   ========================================================= */

.settings-card {
    width: min(520px, 100%);
}

.settings-list {
    overflow: hidden;

    border: 1px solid rgba(255,255,255,.07);
    border-radius: 13px;
}

.setting {
    min-height: 70px;

    padding: 13px 15px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    border-bottom: 1px solid rgba(255,255,255,.06);
}

.setting:last-child {
    border-bottom: none;
}

.setting-text {
    display: flex;
    flex-direction: column;

    gap: 4px;
}

.setting-text strong {
    font-size: 13px;
}

.setting-text span {
    color: #6f7380;

    font-size: 11px;
}

.setting select {
    padding: 8px 10px;

    color: white;
    background: #17181f;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 9px;

    outline: none;
}


/* =========================================================
   SWITCH
   ========================================================= */

.switch {
    position: relative;

    width: 42px;
    height: 23px;

    flex-shrink: 0;
}

.switch input {
    opacity: 0;

    width: 0;
    height: 0;
}

.slider {
    position: absolute;

    inset: 0;

    border-radius: 20px;

    background: #30323d;

    transition: .2s;
}

.slider::before {
    content: "";

    position: absolute;

    width: 17px;
    height: 17px;

    left: 3px;
    top: 3px;

    border-radius: 50%;

    background: #aeb1bd;

    transition: .2s;
}

.switch input:checked + .slider {
    background:
        linear-gradient(
            135deg,
            #735cff,
            #38c7ff
        );
}

.switch input:checked + .slider::before {
    background: white;

    transform: translateX(19px);
}


/* =========================================================
   ABOUT
   ========================================================= */

.about-card {
    width: min(390px, 100%);
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;

    padding: 5px 0 10px;
}

.about-icon {
    width: 65px;
    height: 65px;

    display: grid;
    place-items: center;

    margin-bottom: 14px;

    border-radius: 18px;

    font-size: 27px;
    font-weight: 700;

    background:
        linear-gradient(
            135deg,
            #735cff,
            #38c7ff
        );

    box-shadow:
        0 0 40px rgba(91,92,255,.2);
}

.about-content h3 {
    font-size: 21px;
}

.about-content p {
    margin-top: 7px;

    color: #777b88;
}

.about-content span {
    margin-top: 8px;

    color: #50535e;

    font-size: 11px;
}


/* =========================================================
   TOAST
   ========================================================= */

.toast-container {
    position: fixed;

    right: 20px;
    bottom: 20px;

    z-index: 300;

    display: flex;
    flex-direction: column;

    gap: 8px;
}

.toast {
    min-width: 230px;
    max-width: 350px;

    padding: 12px 15px;

    color: #e4e5e9;

    background: #17181f;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 11px;

    box-shadow:
        0 15px 50px rgba(0,0,0,.45);

    font-size: 12px;

    animation:
        toast-in .2s ease-out;
}

.toast.success {
    border-left:
        3px solid #59d98a;
}

.toast.error {
    border-left:
        3px solid #ff5f5f;
}

@keyframes toast-in {
    from {
        opacity: 0;

        transform:
            translateY(8px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


/* =========================================================
   SIDEBAR OVERLAY
   ========================================================= */

.sidebar-overlay {
    position: fixed;

    inset: 0;

    z-index: 40;

    background: rgba(0,0,0,.55);

    backdrop-filter: blur(2px);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .sidebar {
        position: fixed;

        left: 0;
        top: 0;
        bottom: 0;

        width: 270px;

        transform: translateX(-100%);

        transition:
            transform .2s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-menu,
    .mobile-close {
        display: grid;
    }

    .composer-area {
        left: 0;

        padding:
            12px 10px 10px;
    }

    .chat-header {
        padding: 0 14px;
    }

    .messages {
        padding:
            25px 15px 130px;
    }

    .welcome {
        margin-top: 50px;
    }

    .welcome h1 {
        font-size: 27px;
    }

    .suggestions {
        flex-direction: column;
    }

    .suggestions button {
        width: 100%;
    }

    .login-card {
        padding: 35px 25px;
    }

    .chat-actions {
        display: none;
    }

    .message-actions {
        opacity: 1;
    }

    .modal-card {
        padding: 20px;
    }

    .toast-container {
        left: 15px;
        right: 15px;
        bottom: 15px;
    }

    .toast {
        min-width: 0;
        max-width: none;
    }
}



/* =========================================================
MARKDOWN EDITOR
========================================================= */

.markdown-editor {
width: 100%;
margin-bottom: 10px;


overflow: hidden;

background: #101116;

border: 1px solid rgba(255,255,255,.09);
border-radius: 14px;

box-shadow:
    0 12px 35px rgba(0,0,0,.25);

animation:
    markdown-in .18s ease-out;


}

@keyframes markdown-in {
from {
opacity: 0;
transform: translateY(5px);
}

to {
    opacity: 1;
    transform: translateY(0);
}


}

/* =========================================================
HEADER
========================================================= */

.markdown-editor-header {
height: 45px;


padding: 0 12px 0 15px;

display: flex;
align-items: center;
justify-content: space-between;

border-bottom: 1px solid rgba(255,255,255,.06);

background: rgba(255,255,255,.015);


}

.markdown-editor-header strong {
color: #e8e9ed;


font-size: 12px;
font-weight: 600;


}

.markdown-close {
width: 30px;
height: 30px;


display: grid;
place-items: center;

color: #737783;

background: transparent;

border: none;
border-radius: 8px;

font-size: 20px;

transition: .15s;


}

.markdown-close:hover {
color: white;


background: rgba(255,255,255,.07);


}

/* =========================================================
TABS
========================================================= */

.markdown-editor-tabs {
height: 40px;


display: flex;
align-items: center;

gap: 3px;

padding: 4px 8px;

border-bottom: 1px solid rgba(255,255,255,.06);

background: #0d0e13;


}

.markdown-tab {
height: 32px;


padding: 0 13px;

color: #737783;

background: transparent;

border: none;
border-radius: 8px;

font-size: 11px;
font-weight: 500;

transition: .15s;


}

.markdown-tab:hover {
color: #d5d6db;


background: rgba(255,255,255,.05);


}

.markdown-tab.active {
color: white;


background: rgba(115,92,255,.16);

box-shadow:
    inset 0 0 0 1px rgba(115,92,255,.18);

}

/* =========================================================
MARKDOWN INPUT
========================================================= */

.markdown-input {
width: 100%;
min-height: 150px;
max-height: 300px;

display: block;

padding: 14px 15px;

resize: vertical;

outline: none;

color: #e7e8ec;

background: #0b0c10;

border: none;

font-family:
    "JetBrains Mono",
    "Cascadia Code",
    Consolas,
    monospace;

font-size: 13px;
line-height: 1.6;

tab-size: 4;

}

.markdown-input::placeholder {
color: #555965;
}

.markdown-input:focus {
background: #0c0d11;
}

/* =========================================================
PREVIEW
========================================================= */

.markdown-preview {
min-height: 150px;
max-height: 300px;

overflow-y: auto;

padding: 14px 15px;

color: #e4e5e9;

background: #0b0c10;

font-size: 13px;
line-height: 1.65;


}

/* =========================================================
MARKDOWN PREVIEW CONTENT
========================================================= */

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4,
.markdown-preview h5,
.markdown-preview h6 {
margin: 18px 0 8px;


color: white;

line-height: 1.25;


}

.markdown-preview h1 {
font-size: 24px;
}

.markdown-preview h2 {
font-size: 20px;
}

.markdown-preview h3 {
font-size: 17px;
}

.markdown-preview h4 {
font-size: 15px;
}

.markdown-preview p {
margin: 8px 0;
}

.markdown-preview strong {
color: white;
font-weight: 700;
}

.markdown-preview em {
color: #c8cad2;
}

.markdown-preview a {
color: #8b7cff;


text-decoration: none;

transition: .15s;


}

.markdown-preview a:hover {
color: #a99eff;


text-decoration: underline;


}

.markdown-preview ul,
.markdown-preview ol {
margin: 8px 0;
padding-left: 22px;
}

.markdown-preview li {
margin: 4px 0;
}

.markdown-preview blockquote {
margin: 10px 0;


padding: 8px 13px;

color: #aeb1bd;

background: rgba(255,255,255,.035);

border-left: 3px solid #735cff;

border-radius: 0 7px 7px 0;


}

.markdown-preview code {
padding: 2px 5px;

color: #d5ccff;

background: rgba(115,92,255,.12);

border: 1px solid rgba(115,92,255,.12);

border-radius: 5px;

font-family:
    "JetBrains Mono",
    "Cascadia Code",
    Consolas,
    monospace;

font-size: .9em;


}

.markdown-preview pre {
margin: 12px 0;


padding: 13px 15px;

overflow-x: auto;

background: #07080b;

border: 1px solid rgba(255,255,255,.07);

border-radius: 9px;


}

.markdown-preview pre code {
padding: 0;


color: #dfe1e7;

background: transparent;

border: none;

font-size: 12px;

line-height: 1.55;


}

.markdown-preview hr {
margin: 15px 0;


border: none;

border-top: 1px solid rgba(255,255,255,.08);


}

.markdown-preview img {
max-width: 100%;

border-radius: 9px;


}

/* =========================================================
MARKDOWN TOOLBAR
========================================================= */

.markdown-toolbar {
min-height: 45px;


padding: 6px 8px;

display: flex;
align-items: center;

gap: 4px;

border-top: 1px solid rgba(255,255,255,.06);

background: #0d0e13;


}

.markdown-toolbar button {
width: 32px;
height: 32px;


display: grid;
place-items: center;

color: #858996;

background: transparent;

border: 1px solid transparent;
border-radius: 8px;

font-size: 12px;
font-weight: 600;

transition:
    color .15s,
    background .15s,
    border-color .15s,
    transform .1s;


}

.markdown-toolbar button:hover {
color: white;

background: rgba(255,255,255,.07);

border-color:
    rgba(255,255,255,.07);

}

.markdown-toolbar button:active {
transform: scale(.94);

background:
    rgba(115,92,255,.15);

}

.markdown-toolbar button strong {
font-size: 14px;
color: inherit;
}

.markdown-toolbar button em {
font-size: 14px;
color: inherit;
}

/* =========================================================
MARKDOWN TOOLBAR SEPARATORS
========================================================= */

.markdown-toolbar button:nth-child(3) {
margin-left: 5px;
}

.markdown-toolbar button:nth-child(3)::before {
content: "";

position: absolute;

}

/* =========================================================
TOP MARKDOWN BUTTON
========================================================= */

.composer-toolbar {
max-width: 800px;

margin: 0 auto 7px;

display: flex;
align-items: center;

gap: 8px;

}

.composer-tool {
height: 32px;

padding: 0 11px;

display: inline-flex;
align-items: center;

gap: 6px;

color: #9296a3;

background: rgba(255,255,255,.035);

border: 1px solid rgba(255,255,255,.07);

border-radius: 8px;

font-size: 11px;

transition: .15s;

}

.composer-tool:hover {
color: white;

background: rgba(115,92,255,.1);

border-color:
    rgba(115,92,255,.25);

}

.markdown-hint {
color: #50535e;

font-size: 10px;

}

/* =========================================================
SCROLLBARS
========================================================= */

.markdown-input::-webkit-scrollbar,
.markdown-preview::-webkit-scrollbar {
width: 6px;
height: 6px;
}

.markdown-input::-webkit-scrollbar-track,
.markdown-preview::-webkit-scrollbar-track {
background: transparent;
}

.markdown-input::-webkit-scrollbar-thumb,
.markdown-preview::-webkit-scrollbar-thumb {
background: #2a2c35;

border-radius: 10px;

}

.markdown-input::-webkit-scrollbar-thumb:hover,
.markdown-preview::-webkit-scrollbar-thumb:hover {
background: #3a3d48;
}

/* =========================================================
MOBILE
========================================================= */

@media (max-width: 700px) {
.composer-toolbar {
    margin-bottom: 5px;
}

.composer-tool {
    height: 30px;

    padding: 0 9px;

    font-size: 10px;
}

.markdown-hint {
    display: none;
}

.markdown-editor {
    border-radius: 12px;
}

.markdown-input,
.markdown-preview {
    min-height: 130px;
    max-height: 220px;
}

.markdown-toolbar {
    overflow-x: auto;
}

.markdown-toolbar button {
    flex-shrink: 0;
}

}
