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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --success: #22c55e;
    --warning: #f59e0b;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
}

.container {
    width: 100%;
    max-width: 800px;
}

.assistant-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.visualizer-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#visualizer {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0.9;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0;
    animation: pulse 2s ease-out infinite;
}

.pulse-ring.delay-1 {
    animation-delay: 0.5s;
}

.pulse-ring.delay-2 {
    animation-delay: 1s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.visualizer-container.listening .pulse-ring {
    animation-duration: 1s;
}

.visualizer-container.speaking {
    animation: glow 0.5s ease-in-out alternate infinite;
}

@keyframes glow {
    from {
        filter: brightness(1);
    }
    to {
        filter: brightness(1.3);
    }
}

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

#status-text {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#sub-status {
    color: var(--text-muted);
    font-size: 1rem;
}

.controls {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.mic-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.mic-button:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.mic-button:active {
    transform: scale(0.95);
}

.mic-button.listening {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: pulse-mic 1s ease-in-out infinite;
}

@keyframes pulse-mic {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 10px 40px rgba(239, 68, 68, 0.7);
    }
}

.mic-button svg {
    width: 32px;
    height: 32px;
}

.commands-section {
    margin-bottom: 2rem;
}

.commands-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.command-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.command-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.command-icon {
    font-size: 1.5rem;
}

.command-text {
    font-size: 0.9rem;
    color: var(--text);
}

.transcript-area {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.transcript-header {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.transcript-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

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

.message.user {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message.assistant {
    background: rgba(255, 255, 255, 0.08);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

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

.transcript-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

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

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }
    
    .assistant-card {
        padding: 1.5rem;
    }
    
    .visualizer-container {
        width: 150px;
        height: 150px;
    }
    
    #status-text {
        font-size: 1.25rem;
    }
    
    .commands-grid {
        grid-template-columns: 1fr;
    }
}