body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 15px;
    background-color: #f5f7fa;
    color: #333;
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.chat-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
    height: 60vh;
    overflow-y: auto;
    margin-bottom: 15px;
}

.message {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 85%;
    line-height: 1.3;
    font-size: 0.9rem;
}

.user-message {
    background-color: #e3f2fd;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background-color: #f1f1f1;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.input-area {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

#question {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 18px;
    font-size: 0.9rem;
}

#send-btn {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
}

#send-btn:hover {
    background-color: #2980b9;
}

.lang-indicator {
    text-align: center;
    margin-top: 8px;
    font-style: italic;
    color: #7f8c8d;
    font-size: 0.8rem;
}

.rtl {
    direction: rtl;
    text-align: right;
}

.message br {
    content: "";
    display: block;
    margin-bottom: 8px;
}

.alert-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.15);
    z-index: 1000;
    width: 85%;
    max-width: 300px;
    text-align: center;
}

.alert-box p {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.alert-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.alert-button {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    flex: 1;
}

.alert-button.yes {
    background-color: #4CAF50;
    color: white;
}

.alert-button.no {
    background-color: #f44336;
    color: white;
}

@media (max-width: 480px) {
    .chat-container {
        height: 65vh;
    }
    
    .message {
        max-width: 90%;
    }
    
    .alert-buttons {
        flex-direction: column;
    }
    
    .alert-button {
        width: 100%;
        margin-bottom: 5px;
    }
}