:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --accent-color: #ea4335;
    --background-color: #f8f9fa;
    --text-color: #202124;
    --light-text: #5f6368;
    --border-color: #dadce0;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    direction: rtl;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--light-text);
    font-size: 1rem;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background-color: var(--primary-color);
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.saad-message {
    background-color: var(--border-color);
    color: var(--text-color);
    align-self: flex-start;
    margin-right: auto;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mic-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.mic-button:hover {
    background-color: #3367d6;
    transform: scale(1.05);
}

.mic-button:active {
    transform: scale(0.95);
}

.mic-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.mic-text {
    font-size: 0.7rem;
    text-align: center;
}

.status {
    margin-top: 10px;
    color: var(--light-text);
    font-size: 0.9rem;
    text-align: center;
}

.listening {
    color: var(--accent-color);
    font-weight: bold;
}

.processing {
    color: var(--secondary-color);
    font-weight: bold;
}

footer {
    text-align: center;
    margin-top: 20px;
    color: var(--light-text);
    font-size: 0.8rem;
}

/* تحريك للإشارة إلى الاستماع */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.listening-animation {
    animation: pulse 1.5s infinite;
}