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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

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

/* Left panel: Info (1/3 width) */
.info-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.logo h1 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 10px;
}

.tagline {
    color: #666;
    font-size: 1.1em;
}

.instructions h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.instructions ol {
    padding-left: 20px;
    color: #555;
    line-height: 1.8;
}

.instructions li {
    margin-bottom: 10px;
}

.status {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.status-label {
    font-weight: 600;
    color: #666;
}

.status-value {
    color: #333;
}

#connection-status {
    color: #22c55e;
    font-weight: 600;
}

.controls {
    margin-top: auto;
}

.btn-secondary {
    width: 100%;
    padding: 12px;
    background: #e0e0e0;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

/* Right panel: Chat (2/3 width) */
.chat-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

/* Custom scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Message bubbles */
.message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: slideIn 0.3s ease;
}

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

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

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

.message-bubble {
    padding: 15px 20px;
    border-radius: 20px;
    margin-bottom: 5px;
}

.message.user .message-bubble {
    background: #667eea;
    color: white;
    border-bottom-right-radius: 5px;
}

.message.bot .message-bubble {
    background: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 5px;
}

.message-text {
    font-size: 1.1em;
    line-height: 1.5;
    margin-bottom: 8px;
}

.message-translation {
    font-size: 0.9em;
    opacity: 0.7;
    font-style: italic;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.message.user .message-translation {
    border-top-color: rgba(255, 255, 255, 0.3);
}

/* Input area */
.input-area {
    padding: 20px;
    border-top: 2px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.voice-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 3em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.voice-button:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.voice-button:active,
.voice-button.listening {
    background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
    animation: pulse 1.5s infinite;
}

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

.mic-icon {
    font-size: 1em;
}

.mic-text {
    font-size: 0.3em;
    margin-top: 5px;
    text-align: center;
}

.voice-status {
    min-height: 30px;
    color: #666;
    font-size: 0.9em;
    text-align: center;
}

/* Loading animation */
.message.bot .message-bubble.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }

    .info-panel,
    .chat-panel {
        flex: none;
    }

    .info-panel {
        height: 200px;
    }

    .chat-panel {
        flex: 1;
    }
}
