:root {
    --primary: #1e293b;
    --secondary: #334155;
    --accent: #d4af37; /* Gold for premium feel */
    --accent-light: #f3e5ab;
    --text: #0f172a;
    --text-muted: #64748b;
    --bg: #f8fafc;
    --surface: #ffffff;
    --success: #10b981;
    --error: #ef4444;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    width: 100%;
    max-width: 480px; /* Mobile-first constraint */
    height: 100%;
    max-height: 900px;
    background-color: var(--surface);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-radius: 0;
}

@media (min-width: 500px) {
    .app-container {
        border-radius: 24px;
        height: 90vh;
        border: 1px solid rgba(0,0,0,0.05);
    }
}

.header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary);
}

.status-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: #f1f5f9;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
}

.status-badge.connected {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    gap: 32px;
    overflow-y: auto;
}

.consultant-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.visualizer-container {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #0f172a);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.avatar-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid var(--surface);
}

.avatar-initials {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.speaking-waves {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.speaking-waves span {
    width: 4px;
    height: 10px;
    background-color: var(--accent);
    border-radius: 2px;
    animation: wave 1s infinite ease-in-out;
}

.speaking-waves span:nth-child(2) { animation-delay: 0.1s; }
.speaking-waves span:nth-child(3) { animation-delay: 0.2s; }

@keyframes wave {
    0%, 100% { height: 10px; }
    50% { height: 20px; }
}

.avatar-container.speaking .speaking-waves {
    opacity: 1;
}

.avatar-container.listening .pulse-ring {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { width: 100%; height: 100%; opacity: 0.6; }
    100% { width: 150%; height: 150%; opacity: 0; }
}

.consultant-info {
    text-align: center;
}

.consultant-info h1 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.status-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    min-height: 1.5em;
}

.controls-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    margin-bottom: 20px;
}

.mic-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: var(--primary);
    border: none;
    color: var(--surface);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mic-btn:hover {
    transform: scale(1.05);
    background-color: var(--secondary);
}

.mic-btn.active {
    background-color: var(--error);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.mic-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.transcript-container {
    width: 100%;
    flex: 1;
    max-height: 200px;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
    font-size: 0.9rem;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transcript-placeholder {
    color: #cbd5e1;
    text-align: center;
    margin-top: 20px;
    font-style: italic;
}

.message {
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.5;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
}

.message.user {
    background-color: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.message.assistant {
    background-color: white;
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(0,0,0,0.05);
}

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

.footer {
    padding: 16px;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer p {
    font-size: 0.75rem;
    color: #94a3b8;
}
