/* Import Arabic font */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --active-color: #e74c3c;
}

body {
    direction: rtl;
    background-color: #f5f5f7;
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* Chat container styles */
.chat-container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
    width: 400px;
}

/* Large chat container for the main interface */
.large-chat-container {
    width: 600px; /* Increased width */
    height: 700px; /* Increased height */
}

/* Chat header styles */
.chat-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.assistant-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.assistant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4cd964; /* Green for online */
    border: 2px solid white;
}

.status-indicator.thinking {
    background-color: #ff9500; /* Orange for thinking */
}

.status-indicator.speaking {
    background-color: #4cd964; /* Green for speaking */
    animation: pulse 1.5s infinite;
}

.assistant-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.assistant-status {
    margin: 0;
    font-size: 12px;
    color: #777;
}

/* Chat messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f8f9fa;
}

/* Message bubbles */
.message {
    display: flex;
    margin-bottom: 15px;
    max-width: 80%;
}

.message.user-message {
    align-self: flex-end;
}

.message.assistant-message {
    align-self: flex-start;
}

.message-bubble {
    padding: 12px 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.user-message .message-bubble {
    background-color: #007aff;
    color: white;
    border-bottom-right-radius: 4px;
}

.assistant-message .message-bubble {
    background-color: #e5e5ea;
    color: #333;
    border-bottom-left-radius: 4px;
}

/* Chat footer with mic button */
.chat-footer {
    padding: 15px;
    border-top: 1px solid #eaeaea;
    display: flex;
    justify-content: center;
    background-color: white;
}

.mic-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.glass-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    transition: all 0.3s ease;
}

header {
    background: rgba(44, 62, 80, 0.7);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 2.5em;
    margin-bottom: 15px;
}

.voice-status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

#status-indicator {
    width: 15px;
    height: 15px;
    background-color: gray;
    border-radius: 50%;
    margin-left: 10px;
}

#status-indicator.listening {
    background-color: var(--active-color);
    box-shadow: 0 0 10px var(--active-color);
    animation: pulse 1.5s infinite;
}

/* Central Microphone Bar Styling */
.central-mic-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40vh;
    padding: 20px;
    margin: 2rem 0;
    position: relative;
    z-index: 1;
    margin-bottom: 3rem;
}

.mic-bar {
    background: linear-gradient(135deg, 
        rgba(52, 152, 219, 0.4) 0%,
        rgba(44, 62, 80, 0.4) 100%);
    border-radius: 25px;
    padding: 30px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    position: relative;
    transition: all 0.3s ease;
}

.mic-bar:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.mic-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: 4px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
    color: white;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
    animation: float 3s infinite alternate ease-in-out;
}

.mic-button:hover {
    transform: scale(1.15) translateY(-10px);
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.7);
}

.mic-button.active {
    background: linear-gradient(145deg, #27ae60, #2ecc71);
    animation: activePulse 1.5s infinite;
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 30px rgba(46, 204, 113, 0.7);
}

.mic-button i {
    color: white;
    font-size: 50px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    margin-bottom: 5px;
}

.mic-button::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(231, 76, 60, 0.4) 0%, rgba(231, 76, 60, 0) 70%);
    z-index: -1;
    animation: ripple 2s infinite;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-10px);
    }
}

@keyframes ripple {
    0% {
        opacity: 1;
        transform: scale(0.8);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

@keyframes activePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 20px rgba(46, 204, 113, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

.mic-instruction {
    color: white;
    font-size: 22px;
    margin-top: 25px;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 25px;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    animation: fadeInUp 0.5s ease-out forwards;
}

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

.mic-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.wave {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
}

.wave1, .wave2, .wave3 {
    width: 90px;
    height: 90px;
    left: 50%;
    top: 50%;
}

.mic-button.active + .mic-waves .wave1 {
    animation: wave 2s infinite;
}

.mic-button.active + .mic-waves .wave2 {
    animation: wave 2s infinite 0.5s;
}

.mic-button.active + .mic-waves .wave3 {
    animation: wave 2s infinite 1s;
}

@keyframes wave {
    0% {
        width: 80px;
        height: 80px;
        opacity: 0.8;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(0.9);
        opacity: 0.7;
    }
}

/* Assistant styling */
.conversation-section {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    max-width: 1100px;
    margin: 2rem auto;
    padding: 1rem;
}

.assistant-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 30%;
    padding: 1rem;
}

.assistant-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #3a7bd5;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
    margin: 0 auto;
}

.assistant-status {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

#assistantStatus {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #888;
    transition: all 0.3s ease;
}

#assistantStatus.listening {
    background-color: #e74c3c;
    box-shadow: 0 0 10px #e74c3c;
    animation: pulse 1.5s infinite;
}

#assistantStatus.speaking {
    background-color: #2ecc71;
    box-shadow: 0 0 10px #2ecc71;
    animation: pulse 1s infinite;
}

#assistantStatus.thinking {
    background-color: #f39c12;
    box-shadow: 0 0 10px #f39c12;
    animation: pulse 0.5s infinite;
}

.assistant-image.pulse-hover:hover {
    transform: scale(1.05);
    border-color: #2c71c4;
}

.assistant-image.active-listening {
    border-color: #e74c3c;
    animation: pulseBorder 1.5s infinite;
}

.assistant-image::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(45deg, #3a7bd5, #3a7bd5, #2ecc71, #3a7bd5);
    border-radius: 50%;
    z-index: -1;
    background-size: 300% 300%;
    animation: gradientBorder 3s linear infinite;
}

@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* Modern Chat Interface Styles */
.chat-container {
    flex: 1;
    max-height: 500px;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.assistant-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.assistant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #777;
    border: 2px solid white;
    transition: all 0.3s ease;
}

.status-indicator.listening {
    background-color: #e74c3c;
}

.status-indicator.thinking {
    background-color: #f39c12;
}

.status-indicator.speaking {
    background-color: #2ecc71;
}

.assistant-info {
    display: flex;
    flex-direction: column;
}

.assistant-info h3 {
    font-size: 16px;
    margin: 0;
    color: #333;
}

.assistant-status {
    font-size: 12px;
    color: #777;
    margin: 0;
}

.conversation-header-status {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #777;
    transition: all 0.3s ease;
}

.conversation-header-status.listening {
    background-color: #e74c3c;
    box-shadow: 0 0 10px #e74c3c;
    animation: pulse 1.5s infinite;
}

.conversation-header-status.thinking {
    background-color: #f39c12;
    box-shadow: 0 0 10px #f39c12;
}

.conversation-header-status.speaking {
    background-color: #2ecc71;
    box-shadow: 0 0 10px #2ecc71;
    animation: pulse 2s infinite;
}

.conversation-header h3 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.clear-btn {
    background: rgba(231, 76, 60, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: rgba(231, 76, 60, 0.6);
    transform: scale(1.1);
}

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

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.chat-message.user-message {
    align-self: flex-end;
}

.chat-message.assistant-message {
    align-self: flex-start;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    margin-bottom: 2px;
    max-width: 100%;
    word-wrap: break-word;
}

.user-message .message-bubble {
    background-color: #6a4bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.assistant-message .message-bubble {
    background-color: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-info {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
    align-self: flex-end;
}

.chat-footer {
    padding: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
}

.mic-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.mic-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(145deg, #6a4bff, #8067ff);
    border: none;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(106, 75, 255, 0.3);
    transition: all 0.3s ease;
}

.mic-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(106, 75, 255, 0.4);
}

.mic-button.active {
    background: linear-gradient(145deg, #ff4b4b, #ff6767);
    box-shadow: 0 4px 15px rgba(255, 75, 75, 0.3);
    animation: pulse 1.5s infinite;
}

.mic-label {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
}

.response-row {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    position: relative;
}

.response-row.user-row {
    background-color: rgba(58, 123, 213, 0.1);
    border-right: 3px solid #3a7bd5;
    transition: all 0.3s ease;
}

.response-row.assistant-row {
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 3px solid #2ecc71;
    transition: all 0.3s ease;
}

.response-row.highlight-response {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.user-row.highlight-response {
    background-color: rgba(58, 123, 213, 0.2);
    border-right: 3px solid #3a7bd5;
}

.assistant-row.highlight-response {
    background-color: rgba(46, 204, 113, 0.2);
    border-left: 3px solid #2ecc71;
}

.response-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    flex-shrink: 0;
}

.user-row .response-avatar {
    background-color: #3a7bd5;
    color: white;
}

.assistant-row .response-avatar {
    background-color: white;
    border: 2px solid #2ecc71;
}

.response-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.response-text {
    flex: 1;
    color: #333;
    font-weight: 500;
    font-size: 1.1rem;
    direction: rtl;
    text-align: right;
    min-height: 24px;
}

.response-label {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 5px;
    font-weight: bold;
}

.active-conversation {
    padding: 15px;
    background: transparent;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-left: none;
    border-right: none;
}

.conversation-divider {
    position: relative;
    text-align: center;
    margin: 15px 0;
    height: 20px;
}

.conversation-divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.conversation-divider span {
    background: rgba(0, 0, 0, 0.6);
    padding: 0 15px;
    position: relative;
    z-index: 2;
    color: white;
    font-size: 0.9rem;
    border-radius: 10px;
}

.conversation-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 250px;
}

.user-message, .assistant-message {
    display: flex;
    gap: 15px;
    animation: fadeIn 0.5s ease-out;
}

.user-message {
    justify-content: flex-end;
    text-align: right;
}

.assistant-message {
    justify-content: flex-start;
    text-align: right;
}

.message-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #3a7bd5, #1e5799);
    color: white;
    font-size: 1.5rem;
    order: 2;
}

.assistant-message .message-avatar {
    background: white;
    border: 2px solid #3a7bd5;
}

.assistant-message .message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-bubble {
    padding: 15px 20px;
    border-radius: 18px;
    max-width: 70%;
    position: relative;
    transition: all 0.3s ease;
}

.user-message .message-bubble {
    background: rgba(58, 123, 213, 0.4);
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-right-radius: 5px;
    order: 1;
    color: white;
    border-right: 3px solid rgba(58, 123, 213, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.assistant-message .message-bubble {
    background: rgba(255, 255, 255, 0.5);
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
    border-top-left-radius: 18px;
    border-bottom-left-radius: 5px;
    color: #333;
    border-left: 3px solid rgba(46, 204, 113, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.message-bubble p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.5;
    font-weight: 500;
    word-wrap: break-word;
}

.user-message .message-bubble p {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.assistant-message .message-bubble p {
    font-weight: 600;
}

/* Highlight the active message */
.user-message.highlight .message-bubble,
.assistant-message.highlight .message-bubble {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.conversation-status {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.status-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-style: italic;
}

@media (max-width: 900px) {
    .conversation-section {
        flex-direction: column;
    }
    
    .assistant-container {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .message-bubble {
        max-width: 85%;
    }
}

.centered-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 20px;
    width: 100%;
}

/* Assistant layout with large avatar on left */
.assistant-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    gap: 30px;
    margin-top: 20px;
}

/* Large assistant container styles */
.large-assistant-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    position: relative;
}

.large-assistant-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
}

.large-assistant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: all 0.5s ease;
    z-index: -1;
}

.assistant-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 10px 0;
    color: #333;
    text-align: center;
}

/* Mood indicator dots */
.assistant-mood-indicator {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.mood-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.mood-dot.thinking {
    background-color: #ff9500;
}

.mood-dot.speaking {
    background-color: #4cd964;
}

.mood-dot.normal {
    background-color: #007aff;
}

.mood-dot.active {
    opacity: 1;
    box-shadow: 0 0 10px 2px currentColor;
}

.main-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
}

.chat-container {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    height: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    margin-top: 30px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.large-chat-container {
    max-width: 600px;
    height: 700px;
    margin: 0 auto;
}

.chat-box {
    min-height: 300px;
    position: relative;
    padding: 20px;
}

.chat-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.user-bubble {
    background: rgba(58, 123, 213, 0.15);
    border-right: 5px solid #3a7bd5;
    padding: 20px 50px 20px 25px;
    border-radius: 20px;
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 700;
    position: relative;
    margin-bottom: 30px;
    display: none;
    box-shadow: 0 5px 15px rgba(58, 123, 213, 0.1);
}

.user-bubble.active {
    display: block;
    animation: slideIn 0.4s ease-out;
}

.assistant-bubbles {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.assistant-bubble {
    background: #ffffff;
    border-right: 5px solid #2ecc71;
    padding: 25px 30px;
    border-radius: 20px;
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 700;
    display: none;
    box-shadow: 0 5px 20px rgba(46, 204, 113, 0.1);
    line-height: 1.8;
    letter-spacing: 0.3px;
}

.assistant-bubble.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

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

/* Test voice button styling */
.test-voice-btn {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    margin-top: 30px;
    padding: 12px 25px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(78, 84, 200, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.test-voice-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(78, 84, 200, 0.6);
}

.test-voice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.2), rgba(255,255,255,0));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.test-voice-btn:hover::before {
    transform: translateX(100%);
}

.test-voice-btn i {
    margin-left: 12px;
    font-size: 20px;
    animation: pulse 2s infinite;
}

.test-voice-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Features Section */
.features-section {
    margin: 3rem 0;
}

.features-section h2 {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.feature-card {
    background-color: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid #3a7bd5;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(52, 152, 219, 0.6), rgba(41, 128, 185, 0.6));
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    font-weight: 600;
    color: #2c3e50;
    margin: 1rem 0;
}

.feature-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.8rem 1.2rem;
    background: #3a7bd5;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.feature-link:hover {
    background: #2c71c4;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(58, 123, 213, 0.3);
}

/* Page Introduction */
.page-introduction {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-introduction h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: white;
}

.page-introduction .intro-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: white;
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .assistant-container {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .mic-bar {
        padding: 20px 30px;
    }
    
    .mic-button {
        width: 60px;
        height: 60px;
    }
    
    .mic-button i {
        font-size: 24px;
    }
}
