/* ==========================================================
   ForexCode
   style.css
   Part 1
   Global Styles • Variables • Layout • Sidebar
========================================================== */

/* ---------- RESET ---------- */



/* ---------- BODY ---------- */

body{

    background:var(--bg);

    color:var(--text);

    font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;

    overflow:hidden;

}

/* ---------- APP ---------- */

.app{

    width:100%;

    height:100dvh;

    display:flex;

}

/* ==========================================================
   SIDEBAR
========================================================== */

.sidebar{

    width:300px;

    background:var(--sidebar);

    border-right:1px solid var(--border);

    display:flex;

    flex-direction:column;

    transition:.25s;
    height:100vh;

}
.aiwelcome{
    width:100%;
    padding:20px;
}


/* ---------- LOGO ---------- */

.logo{

    font-size:28px;

    font-weight:700;

    text-align:center;

    padding:22px;

    letter-spacing:.5px;

    border-bottom:1px solid var(--border);

    color:white;

}

/* ---------- NEW CHAT ---------- */

#newChat{

    width:calc(100% - 24px);

    margin:12px;

    padding:14px;

    border:none;

    border-radius:14px;

    background:var(--primary);

    color:white;

    font-size:15px;

    font-weight:600;

    cursor:pointer;

    transition:.25s;

}

#newChat:hover{

    background:var(--primary-hover);

    transform:translateY(-2px);

}

/* ---------- CHAT HISTORY ---------- */

#history{

    flex:1;

    overflow-y:auto;

    overflow-x:hidden;

    padding:12px;

}

/* Scrollbar */

#history::-webkit-scrollbar{

    width:8px;

}

#history::-webkit-scrollbar-thumb{

    background:#333;

    border-radius:20px;

}

/* ---------- HISTORY ITEM ---------- */

.historyItem{

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:8px;

    width:100%;

    margin-bottom:8px;

    border-radius:12px;

    transition:.2s;

}

.historyItem:hover{

    background:var(--sidebar-hover);

}

/* ---------- CHAT BUTTON ---------- */

.historyChat{

    flex:1;

    min-height:44px;

    display:flex;

    align-items:center;

    justify-content:flex-start;

    background:none;

    border:none;

    color:white;

    font-size:14px;

    padding:0 14px;

    margin:0;

    cursor:pointer;

    border-radius:10px;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

    transition:.2s;

}

.historyChat:hover{

    background:transparent;

}

/* ---------- DELETE ---------- */

.deleteChat{

    width:40px;

    height:40px;

    margin:0;

    padding:0;

    border:none;

    background:none;

    color:#8b949e;

    border-radius:10px;

    display:flex;

    align-items:center;

    justify-content:center;

    cursor:pointer;

    flex-shrink:0;

    opacity:0;

    transition:.2s;

}

.historyItem:hover .deleteChat{

    opacity:1;

}

.deleteChat:hover{

    background:#2d333b;

    color:#ff5f5f;

}

/* ---------- PROFILE ---------- */

.profileSection{

    border-top:1px solid var(--border);

    padding:15px;

}

/* ---------- USER ---------- */

#profile{

    display:flex;

    align-items:center;

    gap:12px;

    margin-bottom:12px;

}

#photo{

    width:42px;

    height:42px;

    border-radius:50%;

    object-fit:cover;

    border:2px solid var(--primary);

}

#username{

    font-size:15px;

    font-weight:600;

}

#useremail{

    font-size:12px;

    color:var(--text2);

    margin-top:2px;

}

/* ---------- LOGIN ---------- */

#login{

    width:100%;

    margin:0;

    margin-top:10px;

    padding:12px;

    border:none;

    border-radius:12px;

    background:white;

    color:#111;

    font-weight:600;

    cursor:pointer;

}

/* ---------- LOGOUT ---------- */

#logout{

    width:100%;

    margin:0;

    padding:12px;

    border:none;

    border-radius:12px;

    background:#2f3542;

    color:white;

    cursor:pointer;

    transition:.2s;

}

#logout:hover{

    background:#444b5a;

}
/* ==========================================================
   ForexCode
   style.css
   Part 1
   Global Styles • Variables • Layout • Sidebar
========================================================== */

/* ---------- RESET ---------- */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    width:100%;
    height:100%;
}

/* ---------- VARIABLES ---------- */

:root{

    --bg:#0f1117;
    --sidebar:#161b22;
    --sidebar-hover:#222a35;

    --surface:#1c2128;
    --surface2:#242b36;

    --border:#30363d;

    --primary:#3b82f6;
    --primary-hover:#4f8ef7;

    --success:#22c55e;
    --danger:#ef4444;

    --text:#ffffff;
    --text2:#b8c1cc;

    --shadow:0 10px 30px rgba(0,0,0,.35);

    --radius:16px;

}

/* ---------- BODY ---------- */

body{

    background:var(--bg);

    color:var(--text);

    font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;

    overflow:hidden;

}

/* ---------- APP ---------- */

.app{

    width:100%;

    height:100vh;

    display:flex;

}

/* ==========================================================
   SIDEBAR
========================================================== */


/* ---------- LOGO ---------- */

.logo{

    font-size:28px;

    font-weight:700;

    text-align:center;

    padding:22px;

    letter-spacing:.5px;

    border-bottom:1px solid var(--border);

    color:white;

}

/* ---------- NEW CHAT ---------- */

#newChat{

    width:calc(100% - 24px);

    margin:12px;

    padding:14px;

    border:none;

    border-radius:14px;

    background:var(--primary);

    color:white;

    font-size:15px;

    font-weight:600;

    cursor:pointer;

    transition:.25s;

}

#newChat:hover{

    background:var(--primary-hover);

    transform:translateY(-2px);

}

/* ---------- CHAT HISTORY ---------- */

#history{

    flex:1;

    overflow-y:auto;

    overflow-x:hidden;

    padding:12px;

}

/* Scrollbar */

#history::-webkit-scrollbar{

    width:8px;

}

#history::-webkit-scrollbar-thumb{

    background:#333;

    border-radius:20px;

}

/* ---------- HISTORY ITEM ---------- */

.historyItem{

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:8px;

    width:100%;

    margin-bottom:8px;

    border-radius:12px;

    transition:.2s;

}

.historyItem:hover{

    background:var(--sidebar-hover);

}

/* ---------- CHAT BUTTON ---------- */



.historyChat:hover{

    background:transparent;

}

/* ---------- DELETE ---------- */

.deleteChat{

    width:40px;

    height:40px;

    margin:0;

    padding:0;

    border:none;

    background:none;

    color:#8b949e;

    border-radius:10px;

    display:flex;

    align-items:center;

    justify-content:center;

    cursor:pointer;

    flex-shrink:0;

    opacity:0;

    transition:.2s;

}

.historyItem:hover .deleteChat{

    opacity:1;

}

.deleteChat:hover{

    background:#2d333b;

    color:#ff5f5f;

}

/* ---------- PROFILE ---------- */

.profileSection{

    border-top:1px solid var(--border);

    padding:15px;

}

/* ---------- USER ---------- */

#profile{

    display:flex;

    align-items:center;

    gap:12px;

    margin-bottom:12px;

}

#photo{

    width:42px;

    height:42px;

    border-radius:50%;

    object-fit:cover;

    border:2px solid var(--primary);

}

#username{

    font-size:15px;

    font-weight:600;

}

#useremail{

    font-size:12px;

    color:var(--text2);

    margin-top:2px;

}

/* ---------- LOGIN ---------- */

#login{

    width:100%;

    margin:0;

    margin-top:10px;

    padding:12px;

    border:none;

    border-radius:12px;

    background:white;

    color:#111;

    font-weight:600;

    cursor:pointer;

}

/* ---------- LOGOUT ---------- */

#logout{

    width:100%;

    margin:0;

    padding:12px;

    border:none;

    border-radius:12px;

    background:#2f3542;

    color:white;

    cursor:pointer;

    transition:.2s;

}

#logout:hover{

    background:#444b5a;

}
/* ==========================================================
   ForexCode
   style.css
   Part 3
   Code Blocks • Preview • Responsive • Utilities
========================================================== */


/* ==========================================================
   CODE BLOCKS
========================================================== */

pre{

    position:relative;

    margin:18px 0;

    padding:20px;

    overflow:auto;

    border-radius:16px;

    background:#0d1117;

    border:1px solid #30363d;

    box-shadow:0 8px 30px rgba(0,0,0,.35);

}

pre::-webkit-scrollbar{

    height:10px;

}

pre::-webkit-scrollbar-thumb{

    background:#3b82f6;

    border-radius:20px;

}

code{

    font-family:
    Consolas,
    "Fira Code",
    monospace;

    font-size:15px;

    line-height:1.7;

}

/* ==========================================================
   INLINE CODE
========================================================== */

:not(pre)>code{

    background:#2d333b;

    color:#58a6ff;

    padding:3px 7px;

    border-radius:6px;

}

/* ==========================================================
   COPY BUTTON
========================================================== */

.copy{

    margin-top:12px;

    margin-right:8px;

    padding:8px 14px;

    border:none;

    border-radius:10px;

    background:#2563eb;

    color:white;

    cursor:pointer;

    transition:.25s;

}

.copy:hover{

    background:#3b82f6;

    transform:translateY(-2px);

}

/* ==========================================================
   PREVIEW WINDOW
========================================================== */

#previewContainer{

    display:none;

    position:fixed;

    top:40px;

    right:40px;

    width:48%;

    height:85%;

    background:white;

    border-radius:18px;

    overflow:hidden;

    box-shadow:0 20px 60px rgba(0,0,0,.45);

    z-index:9999;

}

/* ---------- Header ---------- */

.previewHeader{

    height:60px;

    background:#111827;

    color:white;

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:0 20px;

    border-bottom:1px solid #30363d;

}
.chatdiv{
    flex:1;
    overflow:auto;
}

.previewHeader h3{

    font-size:18px;

    font-weight:600;

}

/* ---------- Close ---------- */

#closePreview{

    width:42px;

    height:42px;

    margin:0;

    padding:0;

    border:none;

    border-radius:10px;

    background:#ef4444;

    color:white;

    cursor:pointer;

    font-size:18px;

}

#closePreview:hover{

    background:#dc2626;

}

/* ---------- Frame ---------- */

#previewFrame{

    width:100%;

    height:calc(100% - 60px);

    border:none;

    background:white;

}

/* ==========================================================
   IMAGES
========================================================== */

img{

    max-width:100%;

    border-radius:12px;

}

/* ==========================================================
   SELECTION
========================================================== */

::selection{

    background:#2563eb;

    color:white;

}

/* ==========================================================
   FOCUS
========================================================== */

button:focus,
textarea:focus{

    outline:none;

}

/* ==========================================================
   LOADING
========================================================== */

.loading{

    display:flex;

    align-items:center;

    gap:10px;

    color:#9ca3af;

}

/* ==========================================================
   FADE
========================================================== */

.fade{

    animation:fade .35s ease;

}

@keyframes fade{

    from{

        opacity:0;

    }

    to{

        opacity:1;

    }

}

/* ==========================================================
   MOBILE
========================================================== */

@media(max-width:900px){

.sidebar{

    width:75px;

}

.logo{

    font-size:18px;

    padding:18px 5px;

}
#useremail{

    display:none;

}
#username{

    display:flex;

}

#login,
#logout{

    font-size:12px;

    padding:10px;

}

.historyChat{

    font-size:13px;

}

#chat{

    padding:20px;

}

.user,
.ai{

    max-width:100%;

}

#previewContainer{

    width:95%;

    height:80%;

    left:2.5%;

    right:auto;

}

}

/* ==========================================================
   SMOOTH SCROLL
========================================================== */

html{

    scroll-behavior:smooth;

}

/* ==========================================================
   GLASS EFFECT
========================================================== */

.glass{

    backdrop-filter:blur(16px);

    -webkit-backdrop-filter:blur(16px);

    background:rgba(255,255,255,.05);

    border:1px solid rgba(255,255,255,.08);

}

/* ==========================================================
   CARD
========================================================== */

.card{

    background:#1f2937;

    border:1px solid #30363d;

    border-radius:18px;

    padding:20px;

}

/* ==========================================================
   HOVER SCALE
========================================================== */

.hoverScale{

    transition:.25s;

}

.hoverScale:hover{

    transform:translateY(-3px);

}

/* ==========================================================
   FOOTER
========================================================== */

.footer{

    padding:12px;

    text-align:center;

    color:#9ca3af;

    font-size:13px;

}

.main{
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    min-width:60dvh;
    
}

.topbar{

    height:120px;

    flex-shrink:0;

    display:flex;

    flex-direction:column;

    justify-content:center;

    padding:0 30px;

    border-bottom:1px solid #30363d;

    background:#161b22;

}

.topbar h1{

    font-size:28px;

    font-weight:700;

}

.topbar p{

    color:#9ca3af;

    margin-top:4px;

}

#chat{
    flex:1;
    overflow-y:auto;
    min-height:0;
    padding:20px;
}

/* ===============================
   CODEX INPUT AREA
================================ */


/* ===============================
   PROMPT BOX
================================ */

.promptBox{

    width:100%;

    max-width:950px;

    background:#1b1f27;

    border:1px solid #30363d;

    border-radius:24px;

    display:flex;

    align-items:flex-end;

    padding:14px;

    gap:12px;

    box-shadow:0 12px 40px rgba(0,0,0,.35);

}

/* ===============================
   TEXTAREA
================================ */

#prompt{

    flex:1;

    background:transparent;

    border:none;

    resize:none;

    outline:none;

    color:white;

    font-size:16px;

    line-height:1.6;

    min-height:26px;

    max-height:220px;

    overflow-y:auto;

}

#prompt::placeholder{

    color:#8b949e;

}

/* ===============================
   BUTTONS
================================ */

.promptButtons{

    display:flex;

    gap:10px;

    align-items:center;

}

.promptButtons button{

    width:42px;

    height:42px;

    margin:0;

    padding:0;

    border:none;

    border-radius:50%;

    display:flex;

    align-items:center;

    justify-content:center;

    cursor:pointer;

    transition:.2s;

}

/* Attach */

#attach{

    background:#2d333b;

    color:white;

}

#attach:hover{

    background:#3b424d;

}

/* Send */

#send{

    background:#2563eb;

    color:white;

    font-size:18px;

    font-weight:bold;

}

#send:hover{

    background:#3b82f6;

    transform:scale(1.05);

}

.user{

    max-width:85%;

    margin-left:auto;

    margin-right:20px;

    margin-bottom:24px;

    padding:22px 24px;

    background:linear-gradient(
        135deg,
        #2563eb,
        #3b82f6
    );

    color:white;

    border-radius:22px;

    font-size:17px;

    font-weight:500;

    line-height:1.8;

    box-shadow:0 10px 30px rgba(37,99,235,.35);

    word-break:break-word;

}

.ai{

    max-width:90%;

    margin-right:auto;

    margin-left:20px;

    margin-bottom:24px;

    padding:18px 22px;

    background:#1f2937;

    border:1px solid #30363d;

    border-radius:22px;

    color:white;

    font-size:16px;

    line-height:1.8;

}

.user{

    border:2px solid #60a5fa;

}

/* ==========================
   MENU BUTTON
========================== */

#menuBtn{

    display:none;

    width:42px;

    height:42px;

    margin:12px;

    border:none;

    border-radius:10px;

    background:#1f2937;

    color:white;

    font-size:22px;

    cursor:pointer;

}

/* ==========================
   MOBILE SIDEBAR
========================== */

@media (max-width:900px){

    #menuBtn{

        display:flex;

        align-items:center;

        justify-content:center;

    }

    .sidebar{

        position:fixed;

        top:0;

        left:-320px;

        width:320px;

        height:100vh;

        z-index:999;

        transition:.3s;

        box-shadow:0 0 30px rgba(0,0,0,.45);

    }

    .sidebar.open{

        left:0;

    }

}



.inputArea{

    flex-shrink:0;

    bottom:0;

    width:100%;

    padding:18px 24px;

    background:transparent;

    display:flex;

    justify-content:center;

    z-index:100;

}

@media (max-width:900px){

    .main{
        height:100dvh;
        justify-content:flex-start;
    }

    #chat{
        padding-top:60px;
        padding-bottom:20px;
    }

}


#closeSidebar{

    display:none;

    width:300px;

    height:42px;

    margin:12px;

    margin-left:auto;

    border:none;

    border-radius:10px;

    background:#1f2937;

    color:white;

    font-size:22px;

    cursor:pointer;

    transition:.2s;
    width:calc(100% - 24px);

}

#closeSidebar:hover{

    background:#374151;

}
@media (max-width:900px){

    #closeSidebar{
        display:flex;
        align-items:center;
        justify-content:center;
    }

}
#visitWebsite{

    width:calc(100% - 24px);

    margin:0 12px 12px;

    padding:12px 14px;

    display:flex;

    align-items:center;

    gap:12px;

    border:none;

    border-radius:12px;

    background:#1f2937;

    color:white;

    font-size:15px;

    font-weight:600;

    cursor:pointer;

    transition:.25s;

}

#visitWebsite img{

    width:24px;

    height:24px;

    object-fit:contain;

    border-radius:6px;

}

#visitWebsite:hover{

    transform:translateY(-2px);

    box-shadow:0 8px 20px rgba(37,99,235,.35);

}
#downloadForexCode{

    width:calc(100% - 24px);

    margin:0 12px 12px;

    padding:12px 14px;

    display:flex;

    align-items:center;

    gap:12px;

    border:none;

    border-radius:12px;

    background:#1f2937;

    color:white;

    font-size:15px;

    font-weight:600;

    cursor:pointer;

    transition:.25s;

}

#downloadForexCode img{

    width:24px;

    height:24px;

    object-fit:contain;

    border-radius:6px;

}

#downloadForexCode:hover{

    transform:translateY(-2px);

    box-shadow:0 8px 20px rgba(34,197,94,.35);

}
/* ==========================================================
   END
========================================================== */
