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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.chat-container {
    width: 95vw;
    height: 95vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: #202123;
    color: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #444;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #444;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.logo i {
    font-size: 24px;
    color: #10a37f;
}

.logo h2 {
    font-size: 18px;
    font-weight: 600;
}

.new-chat-btn {
    width: 100%;
    padding: 12px;
    background: #10a37f;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s;
}

.new-chat-btn:hover {
    background: #0d8c6d;
}

.chat-history {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

.chat-history h3 {
    font-size: 14px;
    color: #8e8ea0;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-chat-item {
    padding: 10px;
    margin: 5px 0;
    background: #2d2d2d;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    transition: background 0.3s;
}

.recent-chat-item:hover {
    background: #3d3d3d;
}

.recent-chat-item i {
    color: #10a37f;
    font-size: 12px;
}

.chat-time {
    margin-left: auto;
    font-size: 11px;
    color: #8e8ea0;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #444;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.avatar {
    width: 32px;
    height: 32px;
    background: #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn {
    background: none;
    border: none;
    color: #8e8ea0;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s;
}

.settings-btn:hover {
    color: white;
}

/* Main Content Styles */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #f7f7f8;
}

.chat-header {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

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

.model-badge {
    background: #10a37f;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10a37f;
}

.status-indicator.active {
    background: #10a37f;
}

.header-right {
    display: flex;
    gap: 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e5e5e5;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: #f7f7f8;
    border-color: #ccc;
}

/* Messages Container */
.messages-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.welcome-screen {
    text-align: center;
    padding: 60px 20px;
}

.welcome-icon {
    font-size: 60px;
    color: #10a37f;
    margin-bottom: 30px;
}

.welcome-screen h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
    color: #333;
}

.quick-prompts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.prompt-btn {
    padding: 20px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.prompt-btn:hover {
    background: #f7f7f8;
    border-color: #10a37f;
    transform: translateY(-2px);
}

/* Message Styles */
.message {
    display: flex;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.message.user {
    flex-direction: row-reverse;
}

.message .avatar {
    width: 40px;
    height: 40px;
    background: #10a37f;
    color: white;
    flex-shrink: 0;
}

.message.user .avatar {
    background: #8e8ea0;
}

.message-content {
    flex-grow: 1;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.message.user .message-content {
    background: #10a37f;
    color: white;
}

.message-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-time {
    font-size: 12px;
    color: #8e8ea0;
}

.message.user .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* Input Container */
.input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e5e5e5;
}

.input-wrapper {
    position: relative;
    margin-bottom: 10px;
}

#message-input {
    width: 100%;
    padding: 20px 60px 20px 20px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 16px;
    resize: none;
    max-height: 200px;
    min-height: 60px;
    font-family: inherit;
    transition: border-color 0.3s;
}

#message-input:focus {
    outline: none;
    border-color: #10a37f;
}

#send-btn {
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 40px;
    height: 40px;
    background: #10a37f;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

#send-btn:hover {
    background: #0d8c6d;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #8e8ea0;
}

.disclaimer {
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-options {
    display: flex;
    gap: 10px;
}

.option-btn {
    background: none;
    border: none;
    color: #8e8ea0;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s;
}

.option-btn:hover {
    color: #333;
}

/* Settings Panel */
.settings-panel {
    position: absolute;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.3s;
    z-index: 1000;
}

.settings-panel.active {
    right: 0;
}

.settings-header {
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #8e8ea0;
}

.settings-content {
    padding: 20px;
}

.setting-item {
    margin-bottom: 25px;
}

.setting-item label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.setting-item select,
.setting-item input[type="range"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
}

.setting-item input[type="range"] {
    padding: 0;
    height: 20px;
}

.btn-save,
.btn-clear {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-save {
    background: #10a37f;
    color: white;
}

.btn-save:hover {
    background: #0d8c6d;
}

.btn-clear {
    background: #ef4444;
    color: white;
}

.btn-clear:hover {
    background: #dc2626;
}

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    display: none;
    z-index: 1001;
}

.typing-indicator {
    display: flex;
    gap: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .chat-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    
    .sidebar {
        display: none;
    }
    
    .quick-prompts {
        grid-template-columns: 1fr;
    }
    
    .settings-panel {
        width: 100%;
        right: -100%;
    }
}
