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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    height: 100vh;
    overflow: hidden;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

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

.new-chat-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a5a0 100%);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
    transition: all 0.2s;
}

.new-chat-btn:hover {
    background: linear-gradient(135deg, #44a5a0 0%, #3a8b87 100%);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
    transform: translateY(-1px);
}

.conversations {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.conversation-item {
    padding: 12px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    transition: all 0.2s;
}

.conversation-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.conversation-item.active {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1) 0%, rgba(68, 165, 160, 0.1) 100%);
    color: #44a5a0;
    font-weight: 500;
    border-left: 3px solid #4ecdc4;
}

/* Main chat area */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.chat-header {
    padding: 40px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* .header-logo {
    height: auto;
    width: 400px;
    max-width: 90%;
} */

.header-logo {
    height: 120px;
    width: auto;
    max-width: 90%;
}

.chat-header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a5a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: #f8fafc;
}

.message {
    margin-bottom: 24px;
    display: flex;
    gap: 14px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a5a0 100%);
    color: white;
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

.message-content {
    flex: 1;
    padding: 14px 18px;
    border-radius: 14px;
    background: #ffffff;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.message.user .message-content {
    background: linear-gradient(135deg, #e0f7f6 0%, #d1f2f0 100%);
    border: 1px solid #b8ebe8;
}

/* Input area */
.input-area {
    padding: 24px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.input-container {
    display: flex;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

/* User Account Section */
.user-account {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.08) 0%, rgba(68, 165, 160, 0.08) 100%);
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a5a0 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-email {
    font-size: 12px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Guest Account Section */
.guest-account {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.08) 0%, rgba(71, 85, 105, 0.08) 100%);
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.guest-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guest-info {
    flex: 1;
    min-width: 0;
}

.guest-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
}

.guest-text {
    font-size: 12px;
    color: #64748b;
}

.login-btn, .register-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.login-btn {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a5a0 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.login-btn:hover {
    background: linear-gradient(135deg, #44a5a0 0%, #3a8b87 100%);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
    transform: translateY(-1px);
}

.register-btn {
    background: transparent;
    color: #4ecdc4;
    border: 2px solid #4ecdc4;
}

.register-btn:hover {
    background: rgba(78, 205, 196, 0.1);
}

.empty-state {
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.auth-prompt {
    margin: 30px auto;
    max-width: 500px;
    animation: fadeIn 0.5s ease-in;
}

.auth-prompt-content {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1) 0%, rgba(68, 165, 160, 0.1) 100%);
    border: 2px solid #4ecdc4;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}

.auth-prompt-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.auth-prompt-content p {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 24px;
}

.auth-prompt-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.auth-prompt-btn {
    padding: 12px 32px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 15px;
}

.auth-prompt-btn.primary {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a5a0 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.auth-prompt-btn.primary:hover {
    background: linear-gradient(135deg, #44a5a0 0%, #3a8b87 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.auth-prompt-btn.secondary {
    background: white;
    color: #4ecdc4;
    border: 2px solid #4ecdc4;
}

.auth-prompt-btn.secondary:hover {
    background: rgba(78, 205, 196, 0.1);
}

#message-input {
    flex: 1;
    padding: 14px 18px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    color: #1e293b;
    font-size: 15px;
    resize: none;
    font-family: inherit;
    transition: all 0.2s;
}

#message-input:focus {
    outline: none;
    border-color: #4ecdc4;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

#send-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a5a0 100%);
    border: none;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
    transition: all 0.2s;
}

#send-btn:hover {
    background: linear-gradient(135deg, #44a5a0 0%, #3a8b87 100%);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
    transform: translateY(-1px);
}

#send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}