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

body {
    font-family: 'Heebo', sans-serif;
    background-color: #f0f4f8;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    direction: rtl;
}

.chat-container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: #1a73e8;
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.header-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.header-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 4px;
}

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

.message {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    line-height: 1.5;
    font-size: 0.95rem;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.ai-msg {
    background: #ffffff;
    color: #333;
    align-self: flex-start;
    border-bottom-right-radius: 4px;
    border: 1px solid #e0e0e0;
}

.user-msg {
    background: #0672ff;
    color: white;
    align-self: flex-end;
    border-bottom-left-radius: 4px;
}

.input-area {
    padding: 15px 20px;
    background: #1a73e8;
    border-top: 1px solid #eeeeee;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* File Preview Styling */
#fileInput {
    display: none; /* Hide the ugly default file input */
}

.file-preview {
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: space-between;
    background: #e8f0fe;
    color: #1a73e8;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.file-preview.active {
    display: flex;
}

.remove-file-btn {
    background: none;
    border: none;
    color: #d93025;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
}

.input-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.icon-btn {
    background: #f1f3f4;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-btn:hover {
    background: #012b62;
}

#userInput {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

#userInput:focus {
    outline: none;
    border-color: #1a73e8;
}

.send-btn {
    background: #ddd;
    color: rgb(55, 0, 255);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 1rem;
}

.send-btn:hover {
    background: #012b62;
}