/* =========================================================
   MY AI — CHATGPT STYLE PREMIUM DARK THEME
   ========================================================= */

:root {
    --bg: #212121;
    --bg-main: #212121;
    --sidebar: #171717;
    --sidebar-hover: #2a2a2a;

    --panel: #2f2f2f;
    --panel-hover: #383838;

    --border: #3a3a3a;
    --border-light: #444444;

    --text: #ececec;
    --text-soft: #c7c7c7;
    --muted: #9b9b9b;
    --muted-dark: #777777;

    --accent: #10a37f;
    --accent-hover: #19b58d;

    --user-bg: #2f2f2f;
    --ai-bg: transparent;

    --radius: 10px;
}




/* =========================================================
   RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    background: var(--bg-main);
    color: var(--text);

    overflow: hidden;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}


/* =========================================================
   APP
   ========================================================= */

.app {
    width: 100%;
    height: 100vh;

    display: flex;

    background: #212121;
}


/* =========================================================
   BACKGROUND
   ========================================================= */

.background {
    position: fixed;
    inset: 0;

    z-index: -10;

    background: #212121;

    overflow: hidden;
}

.background .glow,
.background .grid {
    display: none;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    width: 260px;
    max-width: 260px;
    height: 100%;

    flex-shrink: 0;

    padding: 14px 12px;

    display: flex;
    flex-direction: column;

    background: #171717;

    border-right: 1px solid #303030;

    box-shadow: none;

    position: relative;
    z-index: 10;

    transform-style: preserve-3d;
}


/* =========================================================
   LOGO
   ========================================================= */

.logo {
    display: flex;
    align-items: center;

    gap: 11px;

    padding:
        6px 7px 20px;
}

.logo-icon {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    overflow: hidden;

    background:whitesmoke;

    border: 1px solid #3a3a3a;

    box-shadow: none;

    transform: none;
}

.logo-icon img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    border-radius: 8px;
}

.logo h2 {
    font-size: 15px;

    font-weight: 600;

    color: #f2f2f2;

    background: none;

    -webkit-background-clip: initial;
    background-clip: initial;

    -webkit-text-fill-color: initial;
}

.logo small {
    display: block;

    margin-top: 2px;

    color: #8e8e8e;

    font-size: 10px;
}


/* =========================================================
   NEW CHAT
   ========================================================= */

.new-chat {
    width: 100%;

    padding: 12px 14px;

    border: 1px solid #444;

    border-radius: 9px;

    color: #eeeeee;

    background: #212121;

    cursor: pointer;

    font-size: 13px;

    font-weight: 500;

    text-align: left;

    box-shadow: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.new-chat:hover {
    background: #2a2a2a;

    border-color: #555;

    transform: none;

    box-shadow: none;
}

.new-chat:active {
    transform: scale(0.99);
}


/* =========================================================
   SIDEBAR TITLE
   ========================================================= */

.sidebar-title {
    margin:
        25px 10px 9px;

    color: whitesmoke;

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: 1.3px;
}


/* =========================================================
   TOOLS
   ========================================================= */

.tool {
    width: 100%;

    padding: 10px 12px;

    margin-bottom: 3px;

    border: 1px solid transparent;

    border-radius: 8px;

    color: #b5b5b5;

    background: transparent;

    text-align: left;

    cursor: pointer;

    font-size: 13px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.tool:hover {
    color: #ffffff;

    background: #2a2a2a;

    border-color: transparent;

    transform: none;

    box-shadow: none;
}

.tool.active {
    color: #ffffff;

    background: #2a2a2a;

    border-color: #3c3c3c;

    box-shadow: none;
}


/* =========================================================
   CONNECTION
   ========================================================= */

.sidebar-bottom {
    margin-top: auto;
}

.connection {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 12px;

    border-radius: 9px;

    background: #202020;

    border: 1px solid #333;

    box-shadow: none;
}

.connection strong {
    display: block;

    font-size: 12px;

    color: #e5e5e5;
}

.connection small {
    display: block;

    margin-top: 2px;

    color: #858585;

    font-size: 10px;
}

.dot {
    width: 8px;
    height: 8px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #666;
}

.dot.online {
    background: #10a37f;

    box-shadow:
        0 0 8px rgba(16, 163, 127, 0.45);

    animation: onlinePulse 2s infinite;
}

@keyframes onlinePulse {
    50% {
        opacity: 0.55;
    }
}


/* =========================================================
   THEME BUTTON
   ========================================================= */

.theme-toggle {
    width: 40px;
    height: 40px;

    margin-top: 10px;

    border: 1px solid #3b3b3b;

    border-radius: 8px;

    background: #202020;

    color: #cccccc;

    cursor: pointer;

    font-size: 17px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.theme-toggle:hover {
    background: #2b2b2b;

    border-color: #505050;

    transform: none;

    box-shadow: none;
}


/* =========================================================
   MAIN
   ========================================================= */

.main {
    flex: 1;

    min-width: 0;

    height: 100%;

    display: flex;

    flex-direction: column;

    position: relative;

    background: #212121;
}


/* =========================================================
   HEADER
   ========================================================= */

.header {
    height: 64px;

    flex-shrink: 0;

    padding: 0 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #212121;

    border-bottom: 1px solid #303030;

    backdrop-filter: none;

    transform-style: preserve-3d;
}

.header h1 {
    font-size: 16px;

    font-weight: 600;

    color: #eeeeee;

    background: none;

    -webkit-background-clip: initial;
    background-clip: initial;

    -webkit-text-fill-color: initial;
}

.header p {
    margin-top: 3px;

    color: #888888;

    font-size: 11px;
}


/* =========================================================
   AI ONLINE
   ========================================================= */

.online,
.status,
.ai-status {
    color: #10a37f !important;
}


/* =========================================================
   CLEAR BUTTON
   ========================================================= */

.clear-btn {
    padding: 8px 12px;

    border: 1px solid #3d3d3d;

    border-radius: 8px;

    background: transparent;

    color: #a8a8a8;

    cursor: pointer;

    font-size: 12px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.clear-btn:hover {
    color: #ffffff;

    background: #2c2c2c;

    border-color: #4b4b4b;

    transform: none;

    box-shadow: none;
}


/* =========================================================
   CHAT
   ========================================================= */

.chat {
    flex: 1;

    overflow-y: auto;

    padding:
        30px 25px 20px;

    scroll-behavior: smooth;

    background: #212121;
}

.chat::-webkit-scrollbar {
    width: 7px;
}

.chat::-webkit-scrollbar-track {
    background: transparent;
}

.chat::-webkit-scrollbar-thumb {
    background: #555;

    border-radius: 20px;
}

.chat::-webkit-scrollbar-thumb:hover {
    background: #666;
}


/* =========================================================
   WELCOME
   ========================================================= */

.welcome {
    width: 100%;

    max-width: 900px;

    margin:
        60px auto 40px;

    padding:
        20px;

    display: flex;

    flex-direction: column;

    align-items: center;

    text-align: center;

    animation: welcomeIn 0.45s ease;
}

@keyframes welcomeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   WELCOME ICON
   ========================================================= */

.welcome-icon {
    width: 70px;
    height: 50px;

    margin-bottom: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 100px;

    background: #2a2a2a;

    border: 1px solid #404040;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25);

    transform: none;

    transition:
        transform 0.25s ease;
}

.welcome-icon:hover {
    transform: translateY(-3px);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.3);
}

.welcome-icon img {
    width: 58px;
    height: 58px;

    object-fit: contain;

    border-radius: 50px;

    filter: none;
}


/* =========================================================
   WELCOME TEXT
   ========================================================= */

.welcome h2 {
    max-width: 700px;

    font-size: 30px;

    line-height: 1.25;

    font-weight: 600;

    letter-spacing: -0.7px;

    color: #eeeeee;

    background: none;

    -webkit-background-clip: initial;
    background-clip: initial;

    -webkit-text-fill-color: initial;

    animation: none;
}

.welcome > p {
    max-width: 600px;

    margin:
        12px auto 28px;

    color: #999999;

    font-size: 13px;

    line-height: 1.6;
}


/* =========================================================
   SUGGESTIONS
   ========================================================= */

.suggestions {
    width: 100%;

    max-width: 780px;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;
}


/* =========================================================
   SUGGESTION CARDS
   ========================================================= */

.suggestion-card {
    position: relative;

    width: 100%;

    min-height: 82px;

    padding: 14px;

    display: flex;

    align-items: center;

    gap: 12px;

    border: 1px solid #3a3a3a;

    border-radius: 10px;

    background: #2a2a2a;

    color: #ffffff;

    cursor: pointer;

    text-align: left;

    overflow: hidden;

    box-shadow: none;

    backdrop-filter: none;

    transform: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.suggestion-card::before {
    display: none;
}

.suggestion-card:hover {
    transform: none;

    background: #333333;

    border-color: #505050;

    box-shadow: none;
}


/* =========================================================
   SUGGESTION ICON
   ========================================================= */

.suggestion-icon {
    width: 40px;
    height: 40px;

    min-width: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #333333;

    border: 1px solid #454545;

    font-size: 17px;

    transform: none;

    box-shadow: none;
}

.suggestion-text {
    display: flex;

    flex-direction: column;

    gap: 4px;

    position: relative;

    z-index: 2;
}

.suggestion-text strong {
    font-size: 12px;

    font-weight: 600;

    color: #eeeeee;
}

.suggestion-text small {
    font-size: 10px;

    color: #929292;
}


/* =========================================================
   MESSAGES
   ========================================================= */

.messages {
    width: 100%;

    max-width: 900px;

    margin: auto;
}

.message {
    display: flex;

    gap: 12px;

    margin-bottom: 24px;

    animation: messageIn 0.25s ease;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    justify-content: flex-end;
}


/* =========================================================
   AVATAR
   ========================================================= */

.avatar {
    min-width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    font-size: 13px;

    box-shadow: none;

    transform: none;
}

.user .avatar {
    background: #3a3a3a;

    border: 1px solid #4a4a4a;
}

.ai .avatar {
    background:
        linear-gradient(
            135deg,
            #10a37f,
            #0d8f70
        );

    border: none;

    box-shadow:
        0 4px 15px rgba(16, 163, 127, 0.18);
}


/* =========================================================
   MESSAGE CONTENT
   ========================================================= */

.message-content {
    max-width: 750px;

    padding:
        11px 15px;

    border-radius: 12px;

    line-height: 1.65;

    font-size: 14px;

    color: #ececec;

    word-wrap: break-word;
}

.user .message-content {
    color: #eeeeee;

    background: #2f2f2f;

    border: 1px solid #414141;

    box-shadow: none;

    border-bottom-right-radius: 4px;
}

.ai .message-content {
    background: transparent;

    border: none;

    box-shadow: none;

    border-bottom-left-radius: 4px;

    backdrop-filter: none;
}


/* =========================================================
   AI IMAGE
   ========================================================= */

.ai-image {
    max-width: 600px;

    width: 100%;

    display: block;

    margin-top: 8px;

    border-radius: 12px;

    border: 1px solid #3e3e3e;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.35);

    transition:
        transform 0.2s ease;
}

.ai-image:hover {
    transform: scale(1.01);

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.4);
}

.image-download {
    display: inline-block;

    margin-top: 9px;

    padding:
        7px 11px;

    border-radius: 7px;

    color: #cccccc;

    background: #2f2f2f;

    border: 1px solid #444;

    text-decoration: none;

    font-size: 11px;

    transition:
        background 0.2s ease;
}

.image-download:hover {
    background: #3a3a3a;

    transform: none;
}


/* =========================================================
   TYPING
   ========================================================= */

.typing {
    display: flex;

    gap: 4px;

    align-items: center;

    padding: 5px 0;
}

.typing span {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #999;

    box-shadow: none;

    animation: typing 1s infinite;
}

.typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes typing {
    50% {
        transform: translateY(-4px);

        opacity: 0.4;
    }
}


/* =========================================================
   INPUT AREA
   ========================================================= */

.input-area {
    padding:
        10px 25px 18px;

    flex-shrink: 0;

    background: #212121;
}


/* =========================================================
   INPUT BOX
   ========================================================= */

.input-box {
    max-width: 900px;

    margin: auto;

    padding:
        10px 12px 9px;

    border-radius: 15px;

    background: #2f2f2f;

    border: 1px solid #444444;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.18);

    backdrop-filter: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.input-box:focus-within {
    border-color: #5a5a5a;

    box-shadow:
        0 8px 35px rgba(0, 0, 0, 0.25);
}


/* =========================================================
   TEXTAREA
   ========================================================= */

textarea {
    width: 100%;

    min-height: 42px;

    max-height: 150px;

    resize: none;

    padding: 8px 9px;

    background: transparent;

    border: none !important;

    outline: none;

    color: #eeeeee;

    font-family: inherit;

    font-size: 14px;

    line-height: 1.5;

    box-shadow: none !important;
}

textarea::placeholder {
    color: #898989;
}


/* =========================================================
   INPUT BOTTOM
   ========================================================= */

.input-bottom {
    display: flex;

    align-items: center;

    gap: 8px;
}


/* =========================================================
   IMAGE MODE
   ========================================================= */

.image-mode {
    padding:
        7px 10px;

    border-radius: 8px;

    color: #b5b5b5;

    background: #383838;

    border: 1px solid #494949;

    cursor: pointer;

    font-size: 11px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.image-mode:hover {
    color: #ffffff;

    background: #444444;

    transform: none;

    box-shadow: none;
}


/* =========================================================
   HINT
   ========================================================= */

.hint {
    margin-left: auto;

    color: #777777;

    font-size: 10px;
}


/* =========================================================
   SEND BUTTON
   ========================================================= */

.send-btn {
    width: 38px;
    height: 38px;

    border: none;

    border-radius: 9px;

    background: #ffffff;

    color: #202020;

    cursor: pointer;

    font-size: 17px;

    font-weight: 700;

    box-shadow: none;

    transition:
        background 0.2s ease,
        transform 0.15s ease;
}

.send-btn:hover {
    background: #e5e5e5;

    transform: none;

    box-shadow: none;
}

.send-btn:active {
    transform: scale(0.95);
}


/* =========================================================
   DISCLAIMER
   ========================================================= */

.disclaimer {
    max-width: 900px;

    margin:
        7px auto 0;

    text-align: center;

    color: #777777;

    font-size: 9px;
}


/* =========================================================
   GLOBAL BUTTONS
   ========================================================= */

button {
    font-family: inherit;

    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   GLOBAL INPUTS
   ========================================================= */

input,
select {
    background: #2f2f2f !important;

    color: #eeeeee !important;

    border: 1px solid #444444 !important;
}

input:focus,
select:focus {
    border-color: #666666 !important;

    outline: none !important;

    box-shadow: none !important;
}

input::placeholder {
    color: #858585 !important;
}


/* =========================================================
   PURPLE / BLUE OVERRIDE
   ========================================================= */

.hero-title,
.welcome-title,
.main-title {
    background: none !important;

    color: #eeeeee !important;

    -webkit-text-fill-color: #eeeeee !important;
}

.new-chat,
.new-chat-btn,
.primary-btn,
button.primary {
    background: #2f2f2f !important;

    color: #eeeeee !important;

    border: 1px solid #444444 !important;

    box-shadow: none !important;
}

.new-chat:hover,
.new-chat-btn:hover,
.primary-btn:hover,
button.primary:hover {
    background: #3a3a3a !important;

    box-shadow: none !important;
}


/* =========================================================
   ALL CARDS
   ========================================================= */

.card,
.action-card,
.tool-card,
.feature-card,
.info-card,
.panel {
    background: #2a2a2a !important;

    border: 1px solid #3a3a3a !important;

    box-shadow: none !important;
}

.card:hover,
.action-card:hover,
.tool-card:hover,
.feature-card:hover {
    border-color: #505050 !important;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2) !important;
}


/* =========================================================
   CHAT INPUT ALTERNATE CLASSES
   ========================================================= */

.input-container,
.chat-input-container,
.message-box {
    background: #2f2f2f !important;

    border: 1px solid #444 !important;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.2) !important;

    backdrop-filter: none;
}


/* =========================================================
   ALTERNATE SEND BUTTONS
   ========================================================= */

.send-button,
#sendButton,
button[type="submit"] {
    background: #ffffff !important;

    color: #202020 !important;

    border: none !important;

    box-shadow: none !important;
}

.send-button:hover,
#sendButton:hover,
button[type="submit"]:hover {
    background: #dddddd !important;

    box-shadow: none !important;
}


/* =========================================================
   IMAGE / TOOL BUTTONS
   ========================================================= */

.image-btn,
.image-button,
.tool-btn {
    background: #2f2f2f !important;

    color: #c8c8c8 !important;

    border: 1px solid #444 !important;
}

.image-btn:hover,
.image-button:hover,
.tool-btn:hover {
    background: #3a3a3a !important;

    border-color: #555 !important;
}


/* =========================================================
   LOGO
   ========================================================= */

.logo img,
.brand img,
.sidebar img {
    border-color: #3d3d3d !important;

    box-shadow: none !important;
}


/* =========================================================
   DIVIDERS
   ========================================================= */

hr,
.divider {
    border-color: #343434 !important;
}


/* =========================================================
   SELECTION
   ========================================================= */

::selection {
    background: rgba(16, 163, 127, 0.35);

    color: #ffffff;
}


/* =========================================================
   LIGHT MODE
   ========================================================= */

body.light-mode {
    background: #ffffff !important;

    color: #202123 !important;
}

body.light-mode .background {
    background: #ffffff !important;
}

body.light-mode .app,
body.light-mode .main,
body.light-mode .chat,
body.light-mode .input-area {
    background: #ffffff !important;
}

body.light-mode .sidebar {
    background: #f7f7f8 !important;

    border-right:
        1px solid #e5e5e5 !important;
}

body.light-mode .header {
    background: #ffffff !important;

    border-bottom:
        1px solid #e5e5e5 !important;
}

body.light-mode .logo h2,
body.light-mode .header h1 {
    color: #202123 !important;
}

body.light-mode .logo small,
body.light-mode .header p {
    color: #6e6e80 !important;
}

body.light-mode .new-chat {
    background: #ffffff !important;

    color: #202123 !important;

    border-color: #d9d9e3 !important;
}

body.light-mode .new-chat:hover {
    background: #ececf1 !important;
}

body.light-mode .tool {
    color: #5f6368;
}

body.light-mode .tool:hover,
body.light-mode .tool.active {
    color: #202123;

    background: #ececf1;

    border-color: transparent;
}

body.light-mode .connection {
    background: #ffffff;

    border-color: #dedede;
}

body.light-mode .connection strong {
    color: #202123;
}

body.light-mode .connection small {
    color: #6e6e80;
}

body.light-mode .theme-toggle {
    background: #ffffff;

    color: #333;

    border-color: #ddd;
}

body.light-mode .welcome h2 {
    color: #202123;

    background: none;

    -webkit-text-fill-color: #202123;
}

body.light-mode .welcome > p {
    color: #6e6e80;
}

body.light-mode .welcome-icon {
    background: #f7f7f8;

    border-color: #e5e5e5;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.06);
}

body.light-mode .suggestion-card {
    background: #ffffff;

    border-color: #e5e5e5;

    color: #202123;
}

body.light-mode .suggestion-card:hover {
    background: #f7f7f8;

    border-color: #d5d5d5;
}

body.light-mode .suggestion-text strong {
    color: #202123;
}

body.light-mode .suggestion-text small {
    color: #6e6e80;
}

body.light-mode .suggestion-icon {
    background: #f3f3f3;

    border-color: #e2e2e2;
}

body.light-mode .clear-btn {
    background: #ffffff;

    color: #555;

    border-color: #ddd;
}

body.light-mode .message-content {
    color: #202123;
}

body.light-mode .user .message-content {
    background: #f4f4f4;

    color: #202123;

    border-color: #e0e0e0;
}

body.light-mode .ai .message-content {
    background: transparent;

    color: #202123;
}

body.light-mode .input-box {
    background: #ffffff;

    border-color: #d9d9e3;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.08);
}

body.light-mode textarea {
    color: #202123;
}

body.light-mode textarea::placeholder {
    color: #8e8ea0;
}

body.light-mode .image-mode {
    background: #f5f5f5;

    color: #555;

    border-color: #ddd;
}

body.light-mode .send-btn {
    background: #202123;

    color: #ffffff;
}

body.light-mode .send-btn:hover {
    background: #000000;
}

body.light-mode .disclaimer {
    color: #8e8ea0;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 900px) {

    .sidebar {
        width: 230px;
        max-width: 230px;
    }

    .suggestions {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .welcome h2 {
        font-size: 27px;
    }
}


@media (max-width: 700px) {

    body {
        overflow: hidden;
    }

    .sidebar {
        display: none;
    }

    .header {
        height: 60px;

        padding: 0 14px;
    }

    .header h1 {
        font-size: 15px;
    }

    .header p {
        font-size: 9px;
    }

    .chat {
        padding:
            20px 12px 12px;
    }

    .welcome {
        margin:
            30px auto 25px;

        padding:
            15px 8px;
    }

    .welcome h2 {
        font-size: 24px;
    }

    .welcome > p {
        font-size: 12px;
    }

    .welcome-icon {
        width: 65px;
        height: 65px;
    }

    .welcome-icon img {
        width: 52px;
        height: 52px;
    }

    .suggestions {
        grid-template-columns: 1fr;

        max-width: 500px;
    }

    .suggestion-card {
        min-height: 70px;
    }

    .messages {
        width: 100%;
    }

    .message-content {
        max-width: 82%;

        font-size: 13px;
    }

    .input-area {
        padding:
            7px 10px 10px;
    }

    .input-box {
        border-radius: 13px;
    }

    .hint {
        display: none;
    }
}


@media (max-width: 450px) {

    .header p {
        display: none;
    }

    .clear-btn {
        padding:
            7px 9px;

        font-size: 10px;
    }

    .welcome h2 {
        font-size: 22px;
    }

    .welcome > p {
        max-width: 320px;
    }

    .suggestion-card {
        min-height: 65px;

        padding: 12px;
    }

    .suggestion-icon {
        width: 38px;
        height: 38px;

        min-width: 38px;
    }

    .message-content {
        max-width: 85%;
    }

    .image-mode {
        padding:
            6px 8px;

        font-size: 10px;
    }

    .send-btn {
        width: 36px;
        height: 36px;
    }
}


/* =========================================================
   FINAL CHATGPT-STYLE OVERRIDES
   ========================================================= */

body,
.app,
.main,
.chat,
.input-area {
    scrollbar-color: #555 #212121;
}

* {
    scrollbar-width: thin;
}

.logo,
.new-chat,
.tool,
.connection,
.theme-toggle,
.suggestion-card,
.input-box,
.header {
    transform-style: flat;
}

/* ========================================
   MARKO AI - CODE BLOCK
   ======================================== */

.marko-code-block {
    width: 100%;
    margin: 18px 0;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    overflow: hidden;
    background: #0d0d0d;
}

.marko-code-header {
    height: 42px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #171717;
    border-bottom: 1px solid #303030;
}

.marko-code-language {
    font-size: 12px;
    color: #a0a0a0;
    font-family: Arial, sans-serif;
    text-transform: lowercase;
}

.marko-copy-btn {
    border: 1px solid #404040;
    background: #242424;
    color: #d8d8d8;
    padding: 6px 11px;
    border-radius: 7px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s ease;
}

.marko-copy-btn:hover {
    background: #333333;
    color: #ffffff;
}

.marko-copy-btn.copied {
    background: #1f7a45;
    border-color: #2c9b59;
    color: #ffffff;
}

.marko-code-block pre {
    margin: 0;
    padding: 18px;
    overflow-x: auto;
    white-space: pre;
    background: #0d0d0d;
}

.marko-code-block pre code {
    color: #e8e8e8;
    font-family:
        Consolas,
        "Courier New",
        monospace;
    font-size: 14px;
    line-height: 1.65;
}

.inline-code {
    background: #2b2b2b;
    color: #eeeeee;
    padding: 2px 6px;
    border-radius: 5px;
    font-family: Consolas, monospace;
    font-size: 0.9em;
}

.marko-ai-response h1,
.marko-ai-response h2,
.marko-ai-response h3 {
    margin-top: 18px;
    margin-bottom: 10px;
}

.marko-ai-response h1 {
    font-size: 25px;
}

.marko-ai-response h2 {
    font-size: 21px;
}

.marko-ai-response h3 {
    font-size: 18px;
}

.marko-ai-response ul {
    padding-left: 22px;
    margin: 10px 0;
}

.marko-ai-response li {
    margin: 5px 0;
}

.marko-ai-response a {
    color: #66aaff;
    text-decoration: underline;
}

.image-message img {
    max-width: 100%;
}

/* =========================================================
   MARKO AI — FULL WIDTH CHATGPT STYLE CODE
   HTML + CSS + JS ONE BELOW ANOTHER
   ========================================================= */

/* Main AI response */
.message.assistant.marko-ai-response {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    box-sizing: border-box !important;

    float: none !important;
    clear: both !important;

    flex: none !important;

    grid-column: 1 / -1 !important;
}


/* IMPORTANT:
   AI response ke andar jo bhi element hai
   usko normal vertical flow mein rakho
*/
.message.assistant.marko-ai-response > * {
    float: none !important;

    box-sizing: border-box !important;
}


/* =========================================================
   HEADINGS
   ========================================================= */

.message.assistant.marko-ai-response h1,
.message.assistant.marko-ai-response h2,
.message.assistant.marko-ai-response h3 {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    clear: both !important;

    margin-top: 20px !important;
    margin-bottom: 10px !important;
}


/* =========================================================
   CODE BLOCK — 100% WIDTH
   ========================================================= */

.message.assistant.marko-ai-response
.marko-code-block {

    display: block !important;

    position: relative !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    box-sizing: border-box !important;

    margin: 15px 0 25px 0 !important;

    padding: 0 !important;

    float: none !important;
    clear: both !important;

    flex: none !important;

    grid-column: 1 / -1 !important;

    overflow: hidden !important;

    border-radius: 10px !important;
}


/* =========================================================
   CODE HEADER
   ========================================================= */

.message.assistant.marko-ai-response
.marko-code-header {

    display: flex !important;

    flex-direction: row !important;

    align-items: center !important;

    justify-content: space-between !important;

    width: 100% !important;

    min-height: 44px !important;

    box-sizing: border-box !important;

    padding: 0 12px !important;
}


/* Language */

.message.assistant.marko-ai-response
.marko-code-language {

    display: block !important;

    flex: 1 !important;

    width: auto !important;

    white-space: nowrap !important;
}


/* Copy */

.message.assistant.marko-ai-response
.marko-copy-btn {

    display: inline-flex !important;

    align-items: center !important;

    justify-content: center !important;

    flex-shrink: 0 !important;

    width: auto !important;

    white-space: nowrap !important;
}


/* =========================================================
   CODE AREA — FULL WIDTH
   ========================================================= */

.message.assistant.marko-ai-response
.marko-code-block pre {

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    box-sizing: border-box !important;

    margin: 0 !important;

    padding: 20px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    white-space: pre !important;
}


/* Actual code */

.message.assistant.marko-ai-response
.marko-code-block pre code {

    display: block !important;

    width: max-content !important;

    min-width: 100% !important;

    max-width: none !important;

    box-sizing: border-box !important;

    white-space: pre !important;

    word-break: normal !important;

    overflow-wrap: normal !important;

    font-family:
        Consolas,
        "Courier New",
        monospace !important;

    font-size: 14px !important;

    line-height: 1.7 !important;
}


/* =========================================================
   FORCE HTML → CSS → JS VERTICAL
   ========================================================= */

/* Every code block must start on new row */

.message.assistant.marko-ai-response
.marko-code-block {
    break-before: auto !important;
    break-after: auto !important;

    page-break-before: auto !important;
    page-break-after: auto !important;
}


/* Code block ke baad next element */
.message.assistant.marko-ai-response
.marko-code-block + * {
    clear: both !important;
}


/* =========================================================
   NORMAL TEXT
   ========================================================= */

.message.assistant.marko-ai-response {
    line-height: 1.6 !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .message.assistant.marko-ai-response
    .marko-code-block {

        width: 100% !important;
        max-width: 100% !important;

        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .message.assistant.marko-ai-response
    .marko-code-block pre {

        padding: 15px !important;
    }

    .message.assistant.marko-ai-response
    .marko-code-block pre code {

        font-size: 13px !important;
    }
}

/* =====================================================
   MARKO AI — CHAT HISTORY
===================================================== */

.history-section {
    margin-top: 22px;
    padding: 0 4px;
}

.history-title {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 10px;

    color: #a8a8a8;

    font-size: 11px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.8px;
}


/* History container */

.chat-history {
    display: flex;
    flex-direction: column;

    gap: 3px;

    max-height: 350px;

    overflow-y: auto;

    padding-right: 3px;
}


/* History item */

.history-item {
    width: 100%;

    min-height: 40px;

    display: flex;
    align-items: center;

    box-sizing: border-box;

    padding: 9px 11px;

    border-radius: 8px;

    background: transparent;

    color: #d7d7d7;

    font-size: 13px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}


/* Hover */

.history-item:hover {
    background: #2a2a2a;

    color: #ffffff;
}


/* Active */

.history-item.active {
    background: #303030;

    color: #ffffff;
}


/* History icon */

.history-item-icon {
    width: 22px;

    flex-shrink: 0;

    font-size: 14px;
}


/* History title */

.history-item-title {
    flex: 1;

    min-width: 0;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* Empty */

.history-empty {
    padding: 10px;

    color: #666;

    font-size: 12px;

    text-align: center;
}


/* Scrollbar */

.chat-history::-webkit-scrollbar {
    width: 5px;
}

.chat-history::-webkit-scrollbar-thumb {
    background: #3a3a3a;

    border-radius: 10px;
}

.chat-history::-webkit-scrollbar-track {
    background: transparent;
}

/* =========================================================
   MARKO AI — FINAL RESPONSIVE / MEDIA QUERIES
   Phone + Tablet + Laptop + Desktop
   ========================================================= */


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1200px) {

    .sidebar {
        width: 260px;
        max-width: 260px;
    }

    .chat {
        padding-left: 30px;
        padding-right: 30px;
    }

    .messages,
    .welcome,
    .input-box,
    .disclaimer {
        max-width: 900px;
    }

}


/* =========================================================
   LAPTOP / COMPUTER
   ========================================================= */

@media (min-width: 901px) and (max-width: 1199px) {

    .sidebar {
        width: 240px;
        max-width: 240px;
    }

    .chat {
        padding: 25px 20px 18px;
    }

    .messages,
    .welcome,
    .input-box,
    .disclaimer {
        max-width: 850px;
    }

    .welcome {
        margin-top: 45px;
    }

    .welcome h2 {
        font-size: 28px;
    }

    .suggestions {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* =========================================================
   TABLET — LANDSCAPE
   ========================================================= */

@media (min-width: 701px) and (max-width: 900px) {

    .sidebar {
        width: 220px;
        max-width: 220px;
        padding: 12px 10px;
    }

    .logo {
        gap: 8px;
    }

    .logo h2 {
        font-size: 14px;
    }

    .chat {
        padding: 22px 16px 15px;
    }

    .messages,
    .welcome,
    .input-box,
    .disclaimer {
        max-width: 100%;
    }

    .welcome {
        margin: 35px auto 30px;
        padding: 15px;
    }

    .welcome h2 {
        font-size: 26px;
    }

    .suggestions {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .message-content {
        max-width: 80%;
    }

    .input-area {
        padding: 8px 16px 14px;
    }

}


/* =========================================================
   PHONE + SMALL TABLET
   ========================================================= */

@media (max-width: 700px) {

    html,
    body {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    body {
        min-width: 0;
    }

    .app {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        display: flex;
    }


    /* -----------------------------------------
       SIDEBAR
       ----------------------------------------- */

    .sidebar {
        display: none !important;
    }


    /* -----------------------------------------
       MAIN
       ----------------------------------------- */

    .main {
        width: 100%;
        min-width: 0;
        height: 100dvh;
        min-height: 100dvh;
    }


    /* -----------------------------------------
       HEADER
       ----------------------------------------- */

    .header {
        width: 100%;
        height: 58px;
        min-height: 58px;

        padding: 0 12px;

        border-bottom: 1px solid #303030;
    }

    .header h1 {
        font-size: 15px;
        line-height: 1.2;
    }

    .header p {
        font-size: 9px;
        margin-top: 2px;
    }

    .clear-btn {
        padding: 7px 10px;
        font-size: 10px;
        border-radius: 7px;
        white-space: nowrap;
    }


    /* -----------------------------------------
       CHAT AREA
       ----------------------------------------- */

    .chat {
        width: 100%;
        min-width: 0;

        padding:
            16px 10px 10px;

        overflow-x: hidden;
        overflow-y: auto;

        -webkit-overflow-scrolling: touch;

        scroll-behavior: smooth;
    }


    /* -----------------------------------------
       WELCOME
       ----------------------------------------- */

    .welcome {
        width: 100%;
        max-width: 100%;

        margin:
            28px auto 22px;

        padding:
            10px 6px;
    }

    .welcome-icon {
        width: 62px;
        height: 62px;

        margin-bottom: 18px;

        border-radius: 50%;
    }

    .welcome-icon img {
        width: 50px;
        height: 50px;
    }

    .welcome h2 {
        width: 100%;
        max-width: 350px;

        font-size: 22px;
        line-height: 1.3;

        letter-spacing: -0.3px;
    }

    .welcome > p {
        width: 100%;
        max-width: 340px;

        margin:
            9px auto 20px;

        font-size: 12px;
        line-height: 1.55;
    }


    /* -----------------------------------------
       SUGGESTIONS
       ----------------------------------------- */

    .suggestions {
        width: 100%;
        max-width: 500px;

        display: grid;

        grid-template-columns: 1fr;

        gap: 8px;
    }

    .suggestion-card {
        width: 100%;
        min-height: 64px;

        padding: 11px;

        gap: 10px;

        border-radius: 9px;
    }

    .suggestion-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;

        font-size: 15px;
    }

    .suggestion-text strong {
        font-size: 11px;
    }

    .suggestion-text small {
        font-size: 9px;
    }


    /* -----------------------------------------
       MESSAGES
       ----------------------------------------- */

    .messages {
        width: 100%;
        max-width: 100%;

        margin: 0 auto;
    }

    .message {
        width: 100%;

        gap: 8px;

        margin-bottom: 18px;
    }

    .message-content {
        max-width: calc(100vw - 70px);

        padding:
            9px 12px;

        font-size: 13px;

        line-height: 1.6;

        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .avatar {
        min-width: 29px;
        width: 29px;
        height: 29px;

        border-radius: 7px;

        font-size: 11px;
    }


    /* -----------------------------------------
       AI RESPONSE
       ----------------------------------------- */

    .message.assistant.marko-ai-response {
        width: 100% !important;
        max-width: 100% !important;

        padding: 0 !important;

        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .message.assistant.marko-ai-response .message-content {
        width: 100%;
        max-width: 100%;

        padding:
            8px 2px;

        font-size: 13px;
    }


    /* -----------------------------------------
       HEADINGS
       ----------------------------------------- */

    .message.assistant.marko-ai-response h1 {
        font-size: 21px !important;
        line-height: 1.3 !important;
    }

    .message.assistant.marko-ai-response h2 {
        font-size: 18px !important;
        line-height: 1.35 !important;
    }

    .message.assistant.marko-ai-response h3 {
        font-size: 16px !important;
        line-height: 1.4 !important;
    }


    /* -----------------------------------------
       CODE BLOCK
       ----------------------------------------- */

    .message.assistant.marko-ai-response .marko-code-block {
        width: 100% !important;
        max-width: 100% !important;

        margin:
            12px 0 18px !important;

        border-radius: 9px !important;
    }

    .message.assistant.marko-ai-response .marko-code-header {
        min-height: 40px !important;
        height: 40px !important;

        padding:
            0 9px !important;
    }

    .message.assistant.marko-ai-response .marko-code-language {
        font-size: 10px !important;
    }

    .message.assistant.marko-ai-response .marko-copy-btn {
        padding:
            5px 8px !important;

        font-size: 10px !important;
    }

    .message.assistant.marko-ai-response .marko-code-block pre {
        width: 100% !important;

        padding:
            13px !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;

        -webkit-overflow-scrolling: touch;
    }

    .message.assistant.marko-ai-response .marko-code-block pre code {
        width: max-content !important;
        min-width: 100% !important;

        font-size: 12px !important;
        line-height: 1.6 !important;

        white-space: pre !important;
    }


    /* -----------------------------------------
       AI IMAGES
       ----------------------------------------- */

    .ai-image,
    .image-message img {
        width: 100% !important;
        max-width: 100% !important;

        height: auto;

        border-radius: 9px;
    }

    .image-download {
        padding:
            6px 9px;

        font-size: 10px;
    }


    /* -----------------------------------------
       INPUT AREA
       ----------------------------------------- */

    .input-area {
        width: 100%;

        flex-shrink: 0;

        padding:
            6px 9px
            calc(9px + env(safe-area-inset-bottom));

        background: #212121;
    }


    /* -----------------------------------------
       INPUT BOX
       ----------------------------------------- */

    .input-box {
        width: 100%;
        max-width: 100%;

        margin: 0;

        padding:
            8px 9px 8px;

        border-radius: 14px;

        background: #2f2f2f;

        box-shadow:
            0 5px 20px rgba(0, 0, 0, 0.18);
    }


    /* -----------------------------------------
       TEXTAREA
       ----------------------------------------- */

    textarea {
        width: 100%;

        min-height: 38px;
        max-height: 120px;

        padding:
            7px 6px;

        font-size: 14px;

        line-height: 1.45;

        overflow-y: auto;
    }


    /* -----------------------------------------
       INPUT BOTTOM
       ----------------------------------------- */

    .input-bottom {
        width: 100%;

        gap: 6px;
    }

    .image-mode,
    .image-btn,
    .image-button,
    .tool-btn {
        padding:
            6px 8px;

        font-size: 10px;

        border-radius: 7px;
    }

    .hint {
        display: none !important;
    }


    /* -----------------------------------------
       SEND BUTTON
       ----------------------------------------- */

    .send-btn,
    .send-button,
    #sendButton,
    button[type="submit"] {
        width: 36px !important;
        min-width: 36px !important;

        height: 36px !important;
        min-height: 36px !important;

        border-radius: 9px !important;

        font-size: 15px;
    }


    /* -----------------------------------------
       DISCLAIMER
       ----------------------------------------- */

    .disclaimer {
        width: 100%;
        max-width: 100%;

        margin:
            5px auto 0;

        padding:
            0 5px;

        font-size: 8px;

        line-height: 1.35;
    }


    /* -----------------------------------------
       CHAT HISTORY
       ----------------------------------------- */

    .chat-history {
        max-height: 250px;

        overflow-y: auto;

        -webkit-overflow-scrolling: touch;
    }

    .history-item {
        min-height: 38px;

        padding:
            8px 9px;

        font-size: 12px;
    }

}


/* =========================================================
   SMALL PHONE — 450px OR LESS
   ========================================================= */

@media (max-width: 450px) {

    .header {
        height: 56px;
        min-height: 56px;

        padding:
            0 10px;
    }

    .header h1 {
        font-size: 14px;
    }

    .header p {
        display: none !important;
    }

    .clear-btn {
        padding:
            6px 8px;

        font-size: 9px;
    }

    .chat {
        padding:
            13px 8px 8px;
    }

    .welcome {
        margin:
            22px auto 18px;

        padding:
            7px 4px;
    }

    .welcome-icon {
        width: 58px;
        height: 58px;

        margin-bottom: 15px;
    }

    .welcome-icon img {
        width: 47px;
        height: 47px;
    }

    .welcome h2 {
        font-size: 20px;
    }

    .welcome > p {
        max-width: 310px;

        font-size: 11px;

        margin-bottom: 17px;
    }

    .suggestion-card {
        min-height: 61px;

        padding: 10px;
    }

    .suggestion-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }

    .message {
        gap: 6px;
    }

    .message-content {
        max-width: calc(100vw - 62px);

        padding:
            8px 10px;

        font-size: 12.5px;
    }

    .avatar {
        min-width: 27px;
        width: 27px;
        height: 27px;
    }

    .input-area {
        padding-left: 7px;
        padding-right: 7px;
    }

    .input-box {
        border-radius: 13px;

        padding:
            7px 8px;
    }

    textarea {
        min-height: 36px;

        font-size: 13px;
    }

    .image-mode {
        font-size: 9px;

        padding:
            5px 7px;
    }

    .send-btn,
    .send-button,
    #sendButton,
    button[type="submit"] {
        width: 34px !important;
        min-width: 34px !important;

        height: 34px !important;
        min-height: 34px !important;

        font-size: 14px;
    }

}


/* =========================================================
   VERY SMALL PHONE — 360px OR LESS
   ========================================================= */

@media (max-width: 360px) {

    .header {
        padding:
            0 8px;
    }

    .header h1 {
        font-size: 13px;
    }

    .clear-btn {
        padding:
            5px 7px;

        font-size: 8px;
    }

    .chat {
        padding:
            10px 6px 6px;
    }

    .welcome h2 {
        font-size: 18px;
    }

    .welcome > p {
        font-size: 10px;
    }

    .suggestion-card {
        min-height: 58px;

        padding: 8px;
    }

    .suggestion-text strong {
        font-size: 10px;
    }

    .suggestion-text small {
        font-size: 8px;
    }

    .message-content {
        max-width: calc(100vw - 56px);

        font-size: 12px;

        padding:
            7px 9px;
    }

    .avatar {
        min-width: 25px;
        width: 25px;
        height: 25px;

        font-size: 10px;
    }

    .image-mode {
        font-size: 8px;
    }

    .send-btn,
    .send-button,
    #sendButton,
    button[type="submit"] {
        width: 32px !important;
        min-width: 32px !important;

        height: 32px !important;
        min-height: 32px !important;
    }

}


/* =========================================================
   LIGHT MODE — RESPONSIVE FIX
   ========================================================= */

@media (max-width: 700px) {

    body.light-mode .input-area {
        background: #ffffff !important;
    }

    body.light-mode .chat {
        background: #ffffff !important;
    }

    body.light-mode .header {
        background: #ffffff !important;
    }

    body.light-mode .input-box {
        background: #ffffff !important;
        border-color: #d9d9e3 !important;
    }

}


/* =========================================================
   TOUCH DEVICES
   ========================================================= */

@media (hover: none) and (pointer: coarse) {

    button,
    .suggestion-card,
    .tool,
    .history-item,
    .image-mode,
    .send-btn {
        -webkit-tap-highlight-color: transparent;
    }

    .suggestion-card:hover,
    .tool:hover,
    .history-item:hover,
    .send-btn:hover {
        transform: none !important;
    }

}


/* =========================================================
   LANDSCAPE PHONE
   ========================================================= */

@media (max-width: 700px) and (orientation: landscape) {

    .header {
        height: 52px;
        min-height: 52px;
    }

    .chat {
        padding-top: 10px;
    }

    .welcome {
        margin-top: 12px;
        margin-bottom: 12px;
    }

    .welcome-icon {
        display: none;
    }

    .welcome h2 {
        font-size: 19px;
    }

    .welcome > p {
        margin-bottom: 12px;
    }

    .suggestion-card {
        min-height: 55px;
    }

}
