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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

header {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.chat-container {
    display: flex;
    height: calc(100vh - 80px);
}

.sidebar {
    width: 300px;
    background: #ecf0f1;
    padding: 1rem;
    border-left: 1px solid #bdc3c7;
    overflow-y: auto;
}

.sidebar h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.conversations-list {
    margin-top: 1rem;
}

.conversation-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #bdc3c7;
    transition: all 0.3s ease;
}

.conversation-item:hover {
    background: #3498db;
    color: white;
}

.conversation-item.active {
    background: #2980b9;
    color: white;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.messages-container {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8f9fa;
}

.welcome-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #7f8c8d;
}

.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 10px;
    max-width: 70%;
    animation: fadeIn 0.3s ease;
}

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

.message.user {
    background: #3498db;
    color: white;
    margin-left: auto;
    margin-right: 0;
}

.message.bot {
    background: white;
    border: 1px solid #bdc3c7;
    margin-right: auto;
    margin-left: 0;
}

.message-time {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.media-player {
    margin-top: 0.5rem;
}

.media-player audio, .media-player video {
    width: 100%;
    max-width: 300px;
}

.input-area {
    padding: 1rem;
    background: white;
    border-top: 1px solid #bdc3c7;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.input-group textarea {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
}

.buttons-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.record-btn.recording {
    background: #e74c3c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #ffeaa7;
    border-radius: 5px;
    margin-top: 0.5rem;
}

.recording-dot {
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.transcription-area {
    margin-top: 1rem;
    padding: 1rem;
    background: #d5edf7;
    border-radius: 5px;
    border: 1px solid #3498db;
}

.transcription-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.hidden {
    display: none !important;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    font-size: 1rem;
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.error-message {
    background: #e74c3c;
    color: white;
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

.success-message {
    background: #27ae60;
    color: white;
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}