@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --font-family: 'Inter', sans-serif;
    --sidebar-width: 320px;
    --sidebar-transition: all 0.3s ease-in-out;
    --thought-panel-width: 350px;
    --bg-primary:  #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #30363d;
    --text-primary: #c9d1d9;
    --text-secondary: #A0A0A0;
    --accent-primary: #007BFF;
    --accent-hover: #0056b3;
    --border-color: #333333;
    --error-color: #E53935;
    --success-color: #43A047;
    --user-bubble: #007BFF;
    --assistant-bubble: #2A2A2A;
}

body.light-mode {
    --bg-primary: #F5F5F5;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #E0E0E0;
    --text-primary: #121212;
    --text-secondary: #555555;
    --border-color: #CCCCCC;
    --user-bubble: #007BFF;
    --assistant-bubble: #E9E9EB;
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    overflow: hidden;
    position: relative;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.5rem;
}

.top-bar-left .logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    height: 100vh;
    padding-top: 5em;
    position: relative;
    transition: var(--sidebar-transition);
}

body.sidebar-collapsed .app-container {
    grid-template-columns: 0 1fr;
}

.sidebar {
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--sidebar-transition);
    overflow-y: auto;
    overflow-x: hidden;
    width: var(--sidebar-width);
}

body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
    padding: 1.5rem 0;
    width: 0;
}
.sidebar-collapsed {
    display:none;
}

/* login */

.form-group { margin-bottom: 1rem; }
label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; color: var(--text-secondary); }
.input-field, #text-input { width: 100%; border: 1px solid var(--border-color); background-color: var(--bg-secondary); color: var(--text-primary); font-size: 1rem; }
.action-button { padding: 0 1.5rem; height: 50px; background-color: var(--accent-primary); color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; }
.control-button { padding: 0.5rem 1rem; background-color: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 6px; cursor: pointer; }
.icon-button { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-secondary); }
.keylock_button { background: #88fd00;
    padding: 1em 1.5em;
    text-align: center;
    border-radius: 1.5em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 3px 1px var(--text-primary);
    margin-bottom: 1.5em;
        color: var(--user-bubble);

}
.auth-page { display: flex; justify-content: center; align-items: center; padding: 2rem; width: 100%; flex-grow: 1; }
.auth-container { background-color: var(--bg-secondary); padding: 2rem 3rem; border-radius: 8px; border: 1px solid var(--border-color); text-align: center; width: 100%; max-width: 450px; }
.auth-options {margin: 30px;}.form-group { margin-bottom: 1rem; }
label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; color: var(--text-secondary); }
.input-field, #text-input { width: 100%; border: 1px solid var(--border-color); background-color: var(--bg-secondary); color: var(--text-primary); font-size: 1rem; }
.action-button { padding: 0 1.5rem; height: 50px; background-color: var(--accent-primary); color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; }
.control-button { padding: 0.5rem 1rem; background-color: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 6px; cursor: pointer; }
.icon-button { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-secondary); }
.keylock_button { background: #8BC34A; padding: 0.5em 1em; text-align: center; border-radius: 1em; font-weight: bold; cursor: pointer; box-shadow: 0 0 3px 1px var(--text-primary); margin-bottom:1.5em; }
.auth-page { display: flex; justify-content: center; align-items: center; padding: 2rem; width: 100%; flex-grow: 1; }
.auth-container { background-color: var(--bg-secondary); padding: 2rem 3rem; border-radius: 8px; border: 1px solid var(--border-color); text-align: center; width: 100%; max-width: 450px; }
.auth-options {margin: 30px;}



pre {
    
    font-family: monospace;
    font-size: 1em;
    overflow-wrap: break-word;
    white-space: pre-line;

}
.main-demo {
    width: 45em;
    max-width: 100%;
}
.head-demo {
    font-size: 2em;
    border-bottom: dashed;
    padding-bottom: 1em;
}

.top-bar-left {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-direction: column;
}
@media (max-width: 400) {
    body {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    .main-demo {
        font-size: 0.5em;
        max-width: 100%;
    }
    pre .head-demo {
        font-size: 0.5em;
        width: 10em;
    }
}