* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    background: #1e1e1e;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: #075e54;
    color: white;
    padding: 20px;
    text-align: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.header-content i {
    font-size: 2.5rem;
    color: #00a884;
}

.chat-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.chat-header p {
    opacity: 0.8;
    font-size: 0.95rem;
}

.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #121212;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 10px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

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

.user-message {
    background: #005c4b;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.bot-message {
    background: #202c33;
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.8rem;
    opacity: 0.8;
}

.message-content {
    word-wrap: break-word;
}

.message-content img, .message-content video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin-top: 8px;
}

.input-area {
    display: flex;
    padding: 15px;
    background: #202c33;
    border-top: 1px solid #2a3942;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#username {
    background: #2a3942;
    border: none;
    border-radius: 20px;
    padding: 12px 16px;
    color: white;
    font-size: 1rem;
    outline: none;
}

#username::placeholder {
    color: #8696a0;
}

#message {
    background: #2a3942;
    border: none;
    border-radius: 20px;
    padding: 12px 16px;
    color: white;
    font-size: 1rem;
    min-height: 60px;
    max-height: 120px;
    resize: none;
    outline: none;
}

#message::placeholder {
    color: #8696a0;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-upload label {
    cursor: pointer;
    color: #8696a0;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.file-upload label:hover {
    color: #00a884;
}

#fileInput {
    display: none;
}

#fileName {
    color: #8696a0;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

#sendBtn {
    background: #00a884;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
    transition: background 0.2s;
}

#sendBtn:hover {
    background: #075e54;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #121212;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #2a3942;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #3a4a5a;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        height: 95vh;
        border-radius: 15px;
    }
    
    .chat-header h1 {
        font-size: 1.4rem;
    }
    
    .message {
        max-width: 85%;
    }
    
    #sendBtn {
        width: 45px;
        height: 45px;
    }
    
    #fileName {
        max-width: 120px;
        font-size: 0.8rem;
    }
}