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

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.header {
    padding: 20px;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 20px;
    font-weight: 500;
    color: #4caf50;
}

.header-info {
    font-size: 13px;
    color: #666;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

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

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: #1a1a1a;
}

.message.vera .message-avatar {
    background: #1b3a1f;
}

.message-content {
    background: #151515;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    font-size: 15px;
}

.message.user .message-content {
    background: #1a1a1a;
    border-bottom-right-radius: 4px;
}

.message.vera .message-content {
    background: #1b3a1f;
    border-bottom-left-radius: 4px;
    color: #c8e6c9;
}

.controls {
    padding: 20px;
    border-top: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.status-display {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #888;
    min-height: 24px;
}

.status-display .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
}

.status-display.listening .dot {
    background: #4caf50;
    animation: pulse 2s infinite;
}

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

.status-display.thinking .dot {
    background: #ff9800;
    animation: blink 0.6s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.status-display.speaking .dot {
    background: #2196f3;
}

.status-display.muted .dot {
    background: #d32f2f;
}

.vol-meter {
    width: 240px;
    height: 4px;
    background: #1a1a1a;
    border-radius: 2px;
    overflow: hidden;
}

.vol-bar {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #81c784);
    transition: width 0.05s;
    width: 0%;
}

button {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 24px;
    border: none;
    background: #4CAF50;
    color: white;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button:hover {
    background: #45a049;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.stop {
    background: #333;
    display: none;
}

.stop:hover {
    background: #444;
}

.mute {
    background: #333;
}

.mute:hover {
    background: #444;
}

.mute.muted {
    background: #d32f2f;
}

.mute.muted:hover {
    background: #b71c1c;
}

.timer {
    font-size: 12px;
    color: #555;
    font-variant-numeric: tabular-nums;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #555;
    gap: 12px;
}

.empty-state-icon {
    font-size: 48px;
    opacity: 0.3;
}

.empty-state-text {
    font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .header { padding: 12px 16px; }
    .header h1 { font-size: 16px; }
    .header-info { font-size: 11px; }
    .chat-container { padding: 16px; gap: 12px; }
    .message { max-width: 90%; }
    .message-avatar { width: 32px; height: 32px; font-size: 16px; }
    .message-content { padding: 10px 14px; font-size: 14px; }
    .controls { padding: 16px; }
    .vol-meter { width: 180px; }
    button { padding: 12px 28px; font-size: 14px; width: 100%; max-width: 280px; }
}

@media (max-width: 480px) {
    .header { flex-direction: column; gap: 8px; align-items: flex-start; }
    .vol-meter { width: 140px; }
    .message { max-width: 95%; }
}

@media (hover: none) and (pointer: coarse) {
    button { min-height: 44px; }
}
