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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-dark: #0f0f1a;
    --bg-card: rgba(30, 30, 50, 0.8);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: rgba(99, 102, 241, 0.3);
    --glow: rgba(99, 102, 241, 0.5);
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

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

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 2.5rem;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    flex: 1;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px var(--glow);
}

.logo-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.visualizer-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 2rem auto;
}

#visualizer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.status-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.status-ring.listening {
    border-color: var(--secondary);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

.status-ring.speaking {
    border-color: var(--primary);
    box-shadow: 0 0 30px var(--glow);
    animation: pulse 1.5s infinite;
}

.status-ring.connecting {
    border-color: var(--warning);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
}

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

.inner-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-card));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.status-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    min-height: 1.5rem;
}

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

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px var(--glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-icon {
    font-size: 0.9rem;
}

.transcript-container {
    margin-top: 2rem;
}

.transcript-container h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transcript-container h3::before {
    content: '💬';
}

.transcript {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.transcript::-webkit-scrollbar {
    width: 6px;
}

.transcript::-webkit-scrollbar-track {
    background: transparent;
}

.transcript::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.transcript-entry {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.transcript-entry:last-child {
    border-bottom: none;
}

.transcript-entry.user {
    color: var(--secondary);
}

.transcript-entry.user::before {
    content: 'You: ';
    font-weight: 600;
}

.transcript-entry.assistant {
    color: var(--primary-light);
}

.transcript-entry.assistant::before {
    content: 'AI: ';
    font-weight: 600;
}

.transcript-entry.system {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
}

.knowledge-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.knowledge-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.knowledge-info h3::before {
    content: '📚';
}

.knowledge-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.knowledge-badge {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--border);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary-light);
}

.knowledge-badge.count {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--secondary);
}

.loading {
    color: var(--text-secondary);
}

footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    .glass-card {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

