:root {
    --sidebar-width: 260px;
    --primary-color: #7c5cff;
    --bg-main: #343541;
    --bg-sidebar: #202123;
    --bg-input: #40414F;
    --text-primary: #ECECF1;
    --text-secondary: #9FA6B2;
    --border-color: #4E4F60;
}

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

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

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


.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.sidebar-header {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.new-chat {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.new-chat:hover {
    background: var(--bg-input);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.user-info:hover {
    background: var(--bg-input);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.user-name {
    font-size: 14px;
    color: var(--text-secondary);
}


.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 48rem;
    margin: 0 auto;
    width: 100%;
    padding: 0 12px;
}

.chat-window {
    flex: 1;
    overflow-y: auto;
    padding: 24px 0;
    scroll-behavior: smooth;
}


.message {
    display: flex;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    margin: 0;
    max-width: 100%;
}

.message.user {
    background: #444654;
}

.message.ai {
    background: var(--bg-main);
}

.message-content {
    max-width: 48rem;
    margin: 0 auto;
    width: 100%;
    display: flex;
    gap: 24px;
    padding: 0 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.user .avatar {
    background: #5A5B63;
}

.ai .avatar {
    background: var(--primary-color);
}

.message-text {
    flex: 1;
    padding-top: 4px;
}


.input-container {
    padding: 24px 0;
    background: var(--bg-main);
    border-top: 1px solid var(--border-color);
}

.input-form {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 12px;
}

.input-box {
    position: relative;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 48px 12px 16px;
}

textarea {
    width: 100%;
    max-height: 200px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.5;
    resize: none;
    outline: none;
    font-family: inherit;
}

textarea::placeholder {
    color: var(--text-secondary);
}

#sendBtn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
}

#sendBtn:hover {
    color: var(--text-primary);
    background: var(--border-color);
}

.input-footer {
    padding-top: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}


.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 24px 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
}

.typing-indicator.visible {
    max-height: 80px;
    opacity: 1;
}

.typing-content {
    max-width: 48rem;
    margin: 0 auto;
    width: 100%;
    display: flex;
    gap: 24px;
    padding: 0 12px;
}

.dot {
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: bounce 1.5s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}


@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .chat-container {
        padding: 0 8px;
    }
    
    .message-content {
        padding: 0 8px;
    }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-main);
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h2 {
    margin-bottom: 24px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.form-actions button[type="submit"] {
    background: var(--primary-color);
    color: white;
    border: none;
}

.form-actions button[type="submit"]:hover {
    background: #6b46c1;
}

.form-actions button[type="button"] {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.form-actions button[type="button"]:hover {
    background: var(--bg-input);
}

.chat-container {
  max-height: 80vh;
  overflow-y: auto;
}
.chat-container::-webkit-scrollbar {
  width: 8px;             
}

.chat-container::-webkit-scrollbar-track {
  background: #1e1e1e;      /
  border-radius: 4px;
}

.chat-container::-webkit-scrollbar-thumb {
  background: #555;        
}

.chat-container::-webkit-scrollbar-thumb:hover {
  background: #888;         
}

.chat-container {
  max-height: 80vh;
  overflow-y: auto;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chat-container::-webkit-scrollbar {
  display: none;
}
