* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

/* Шапка офиса */
.office-header {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.office-info {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    font-size: 1.8rem;
    color: #3498db;
}

.reception-label {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.current-time {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Область приёмной */
.reception-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 40px;
    min-height: 500px;
}

/* Секция секретаря */
.secretary-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.secretary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.secretary-avatar {
    position: relative;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #667eea;
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-indicator.active {
    background: #2ecc71;
}

.status-indicator.busy {
    background: #e74c3c;
}

.secretary-info h3 {
    margin-bottom: 5px;
    font-size: 1.4rem;
}

.secretary-title {
    opacity: 0.9;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.secretary-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

.stat i {
    opacity: 0.7;
}

/* Сообщения */
.secretary-message, .client-message, .processing-status {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-bubble {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    position: relative;
    border: 1px solid #e9ecef;
}

.message-bubble.client {
    background: #e3f2fd;
    border-color: #bbdefb;
}

.message-bubble:before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.secretary-message .message-bubble:before {
    border-right-color: #f8f9fa;
    left: -20px;
    top: 20px;
}

.client-message .message-bubble:before {
    border-left-color: #e3f2fd;
    right: -20px;
    top: 20px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
}

.message-header i {
    opacity: 0.7;
}

.message-time {
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0.6;
}

.message-text {
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Индикатор набора текста */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    color: #666;
    font-size: 0.9rem;
}

.dot {
    width: 8px;
    height: 8px;
    background: #3498db;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Секция клиента */
.client-section {
    display: flex;
    flex-direction: column;
}

.client-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.client-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-subtitle {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* Переключатели методов */
.method-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.method-tab {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: #555;
}

.method-tab:hover {
    border-color: #3498db;
    transform: translateY(-2px);
}

.method-tab.active {
    border-color: #3498db;
    background: #e3f2fd;
    color: #3498db;
    font-weight: 500;
}

.method-content {
    display: none;
}

.method-content.active {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Текстовый ввод */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 1.1rem;
}

textarea {
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
}

.examples {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.examples p {
    font-weight: 500;
    margin-bottom: 8px;
    color: #2c3e50;
}

.examples ul {
    list-style: none;
    padding-left: 20px;
}

.examples li {
    margin-bottom: 5px;
    color: #666;
    position: relative;
}

.examples li:before {
    content: "•";
    color: #3498db;
    position: absolute;
    left: -15px;
}

/* Голосовой ввод */
.voice-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.voice-instruction {
    background: #fff8e1;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #ffb300;
    display: flex;
    gap: 10px;
    font-size: 0.95rem;
    color: #5d4037;
}

.voice-instruction i {
    color: #ffb300;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.voice-record-btn {
    padding: 25px;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.voice-record-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 65, 108, 0.2);
}

.voice-record-btn.recording {
    background: linear-gradient(135deg, #ff0000 0%, #ff4b2b 100%);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

.voice-icon {
    font-size: 2.5rem;
}

.voice-status {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
}

.status-icon {
    font-size: 1.5rem;
    color: #3498db;
}

.status-text {
    font-size: 1rem;
    color: #2c3e50;
}

.voice-result {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #c8e6c9;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #2e7d32;
    font-weight: 500;
}

.result-header i {
    font-size: 1.2rem;
}

#voice-transcript {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #1b5e20;
}

/* Кнопка отправки */
.submit-btn {
    padding: 18px 30px;
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* История запросов */
.request-history {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.request-history h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.history-time {
    color: #666;
    font-weight: 500;
}

.history-text {
    color: #2c3e50;
}

/* Область результатов */
.results-area {
    padding: 0 40px 40px;
    display: none;
}

.results-area.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

.results-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

#current-query-type {
    color: #3498db;
    text-decoration: underline;
}

.results-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Портфолио */
.portfolio-section {
    display: none;
    margin-bottom: 40px;
}

.portfolio-section.active {
    display: block;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.portfolio-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
    font-size: 1.5rem;
}

.portfolio-count {
    background: #3498db;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.portfolio-content {
    padding: 25px;
}

.portfolio-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.portfolio-description {
    color: #7f8c8d;
    margin-bottom: 15px;
    line-height: 1.5;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

.empty-icon {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.empty-state p {
    color: #7f8c8d;
    max-width: 500px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.empty-tip {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    border-left: 4px solid #3498db;
}

.empty-tip i {
    color: #3498db;
    font-size: 1.5rem;
}

.empty-tip p {
    margin: 0;
    text-align: left;
}

/* Футер */
.office-footer {
    background: #2c3e50;
    color: white;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info {
    display: flex;
    gap: 30px;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.footer-item i {
    color: #3498db;
}

.footer-note {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-note i {
    color: #f39c12;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .reception-area {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .office-header, .reception-area, .results-area, .office-footer {
        padding: 20px;
    }
    
    .office-info {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .secretary-card {
        flex-direction: column;
        text-align: center;
    }
    
    .secretary-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .method-tabs {
        flex-direction: column;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .office-footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-info {
        flex-direction: column;
        gap: 15px;
    }
}