:root {
    --bg-color: #212121;
    --sidebar-bg: #181818;
    --text-color: #ececec;
    --input-bg: #2f2f2f;
    --icon-color: #b4b4b4;
    color-scheme: dark;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100%;
}

.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    padding-right: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
    overflow-y: auto;
    /* Allow scrolling if list is long */
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 8px;
    margin-bottom: 10px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: calc(100% - 10px);
    margin-bottom: 20px;
}

.sidebar-bottom {
    padding: 10px 8px;
    border-top: 1px solid #333;
}

.model-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}

.model-dropdown:hover {
    background-color: #2f2f2f;
}

.model-name {
    font-weight: 200;
    font-size: 1.1rem;
    color: #ececec;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--icon-color);
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    border-radius: 4px;
    width: 40x;
    height: 40px;
}

.icon-btn:hover {
    background-color: #2f2f2f;
    color: #ececec;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ececec;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 10px 12px;
    border-radius: 8px;
}

.nav-item:hover {
    background-color: #2f2f2f;
}

.nav-text {
    font-weight: 500;
}

.chats-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 8px;
}

.section-header {
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
    padding: 0 4px;
}

.chat-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: calc(100% - 10px);
}

.chat-item {
    font-size: 0.9rem;
    color: #ececec;
    padding: 8px 8px;
    cursor: pointer;
    border-radius: 8px;
    padding-left: -50px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item:hover {
    background-color: #2f2f2f;
}

.main-content {
    flex: 1;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 20px;
    display: flex;
    align-items: center;
}

.content-wrapper {
    margin-top: -75px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

.greeting {
    font-size: 28px;
    font-weight: 150;
    margin-bottom: 40px;
    color: #ececec;
    text-align: center;
}

.chat-input-container {
    width: 90%;
    background-color: var(--input-bg);
    border-radius: 27px;
    border: #ffffff0d 0.5px solid;
    padding: 10px 16px;
    display: flex;
    align-items: flex-end;
    box-shadow: 0px 4px 12px 0px #0000001a,inset 0px 0px 1px 0px #fff3;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ececec;
    font-size: 1rem;
    outline: none;
    resize: none;
    overflow-y: hidden;
    font-family: inherit;
    line-height: 1.5;
    padding: 0;
    margin-bottom: 8px; /* Align with buttons visually if needed, or maybe not */
}

.input-right-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-btn {
    background: transparent;
    border: none;
    color: var(--icon-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.input-btn:hover {
    background-color: #424242;
    color: #ececec;
}

.send-btn {
    background-color: #424242;
    color: var(--icon-color);
    width: 36px;
    height: 36px;
}

.send-btn:disabled {
    background-color: #424242;
    color: #b4b4b4;
    cursor: not-allowed;
}

.send-btn:disabled:hover {
    background-color: #424242;
    color: #b4b4b4;
}

.send-btn:not(:disabled) {
    background-color: #ffffff;
    color: #000000;
    cursor: pointer;
}

.send-btn:not(:disabled):hover {
    background-color: #dcdcdc;
    color: #000000;
}

.user-profile-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}

.user-profile-container:hover {
    background-color: #2f2f2f;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-small img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ececec;
}

.user-status {
    font-size: 0.75rem;
    color: #888;
}

.settings-btn {
    background-color: #2f2f2f;
    border: none;
    color: #ececec;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.settings-btn:hover {
    background-color: #424242;
}

::selection {
    background-color: #555;
    color: #fff;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--sidebar-bg);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 0;
    width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    text-align: center;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid #333;
    padding: 16px 20px;
    text-align: left;
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: #ececec;
}

.modal-body {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-body p {
    margin-bottom: 6px;
    font-size: 1rem;
    line-height: 1.5;
}

.modal-body p strong {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: block;
}

.modal-button {
    background-color: #2f2f2f;
    border: 1px solid #333;
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 16px;
    transition: background-color 0.2s;
}

.modal-button:hover {
    background-color: #424242;
}
/* Model Dropdown Menu Styles */
.model-dropdown {
    position: relative;
    user-select: none;
}

.model-options-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: var(--input-bg);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 5px 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    margin-top: 5px;
}

.provider-item {
    padding: 8px 12px;
    color: var(--text-color);
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.provider-item:hover {
    background-color: #404040;
}

.provider-item::after {
    content: '';
    font-family: monospace;
    font-weight: bold;
    margin-left: 10px;
}

.provider-submenu {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 250px;
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--input-bg);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 5px 0;
    margin-left: 5px;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    scrollbar-width: thin;
    scrollbar-color: #555 transparent;
}

.provider-submenu::-webkit-scrollbar {
    width: 6px;
}
.provider-submenu::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 3px;
}

.model-item {
    padding: 8px 12px;
    color: #ccc;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-item:hover {
    background-color: #404040;
    color: #fff;
}

.model-dropdown.active {
    background-color: #2f2f2f;
}

.provider-item.active {
    background-color: #404040;
}
