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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #8fa4b3 0%, #6b7d8d 100%);
    min-height: 100vh;
    color: #4a5568;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.conversation-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(107, 125, 141, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(143, 164, 179, 0.2);
}

.status-display {
    text-align: center;
    margin-bottom: 1rem;
}

.ai-avatar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    position: relative;
}

.ai-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(143, 164, 179, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(107, 125, 141, 0.3);
}

.avatar-ring {
    position: absolute;
    width: 140px;
    height: 140px;
    border: 2px solid transparent;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.avatar-ring.listening {
    border-color: rgba(123, 167, 188, 0.6);
    animation: avatar-pulse-listening 2s infinite;
}

.avatar-ring.speaking {
    border-color: rgba(143, 164, 179, 0.8);
    animation: avatar-pulse-speaking 1.5s infinite;
}

@keyframes avatar-pulse-listening {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0.6; }
}

@keyframes avatar-pulse-speaking {
    0% { transform: scale(1); opacity: 0.8; }
    33% { transform: scale(1.03); opacity: 1; }
    66% { transform: scale(1.06); opacity: 0.9; }
    100% { transform: scale(1); opacity: 0.8; }
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(143, 164, 179, 0.1);
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(143, 164, 179, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8fa4b3;
    transition: all 0.3s ease;
}

.status-indicator.connected .status-dot {
    background: #7ba7bc;
    animation: pulse 2s infinite;
}

.status-indicator.connecting .status-dot {
    background: #b5a67e;
    animation: pulse 1s infinite;
}

.status-indicator.error .status-dot {
    background: #c5a3a3;
}

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

.conversation-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.conversation-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.conversation-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.conversation-button:active:not(:disabled) {
    transform: translateY(0);
}

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

.conversation-button.start {
    background: linear-gradient(135deg, #7ba7bc, #8fa4b3);
    color: white;
}

.conversation-button.stop {
    background: linear-gradient(135deg, #c5a3a3, #b89b9b);
    color: white;
}

.button-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-icon svg {
    width: 18px;
    height: 18px;
}

.mode-display {
    text-align: center;
}

.mode-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(143, 164, 179, 0.1);
    border-radius: 30px;
    font-weight: 500;
    min-width: 180px;
    justify-content: center;
    border: 1px solid rgba(143, 164, 179, 0.2);
}

.mode-icon {
    width: 24px;
    height: 24px;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.mode-icon svg {
    width: 100%;
    height: 100%;
}

.mode-indicator.listening .mode-icon.listening {
    opacity: 1;
    color: #7ba7bc;
    animation: listening 1.5s ease-in-out infinite;
}

.mode-indicator.speaking .mode-icon.speaking {
    opacity: 1;
    color: #8fa4b3;
    animation: speaking 0.8s ease-in-out infinite;
}

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

@keyframes speaking {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.instructions {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.instructions h3 {
    margin-bottom: 1rem;
    color: #6b7d8d;
    font-size: 1.2rem;
}

.instructions ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.instructions li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: #8fa4b3;
}

.setup-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    color: #856404;
}

.setup-note code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .conversation-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .conversation-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .conversation-panel {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.75rem;
    }
    
    .mode-indicator {
        min-width: 150px;
        padding: 0.75rem 1.5rem;
    }
}