* {
    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%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    padding: 30px;
}

.call-control {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #10b981;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.icon {
    font-size: 1.2rem;
}

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

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #f3f4f6;
    border-radius: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9ca3af;
    animation: pulse 2s ease-in-out infinite;
}

.status.listening .dot {
    background: #10b981;
}

.status.thinking .dot {
    background: #f59e0b;
}

.status.speaking .dot {
    background: #3b82f6;
}

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

#statusText {
    font-weight: 600;
    color: #374151;
}

.transcript-container {
    margin-bottom: 20px;
}

.transcript-container h3 {
    color: #374151;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.transcript {
    background: #f9fafb;
    border-radius: 10px;
    padding: 20px;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
}

.message {
    margin-bottom: 15px;
    animation: slideIn 0.3s ease-out;
}

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

.message.user {
    text-align: right;
}

.message .label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 5px;
}

.message.user .label {
    color: #667eea;
}

.message.assistant .label {
    color: #764ba2;
}

.message .content {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
}

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

.message.assistant .content {
    background: #e5e7eb;
    color: #374151;
    border-bottom-left-radius: 5px;
}

.hint {
    color: #9ca3af;
    text-align: center;
    font-style: italic;
}

.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.controls label {
    font-weight: 600;
    color: #374151;
}

#volumeSlider {
    width: 200px;
    cursor: pointer;
}

#volumeValue {
    font-weight: 600;
    color: #667eea;
    min-width: 50px;
}

footer {
    background: #f9fafb;
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Scrollbar styling */
.transcript::-webkit-scrollbar {
    width: 8px;
}

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

.transcript::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.transcript::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Responsive design */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }

    .call-control {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .message .content {
        max-width: 90%;
    }
}
