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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
}

#app {
    width: 100%;
    max-width: 480px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    color: #38bdf8;
}

.subtitle {
    font-size: 14px;
    color: #94a3b8;
}

#status {
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
    min-height: 20px;
}

#status.listening {
    color: #f87171;
}

#status.processing {
    color: #fbbf24;
}

#result-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 120px;
}

.bubble {
    padding: 16px;
    border-radius: 16px;
    animation: fadeIn 0.3s ease;
}

.bubble .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.bubble .text {
    font-size: 18px;
    margin-top: 4px;
    line-height: 1.5;
}

.bubble.original {
    background: #1e293b;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bubble.translated {
    background: #1e3a5f;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

#mic-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: #2563eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    fill: #ffffff;
}

#mic-btn:active {
    transform: scale(0.95);
}

#mic-btn.listening {
    background: #dc2626;
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.3);
    animation: pulse 1.5s infinite;
}

#mic-btn.ready {
    background: #16a34a;
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.3);
    animation: pulse-green 1.5s infinite;
}

#mic-btn.processing {
    background: #d97706;
    pointer-events: none;
}

#lang-select {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 14px;
    width: 100%;
    max-width: 320px;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.3); }
    50% { box-shadow: 0 0 0 14px rgba(220, 38, 38, 0.1); }
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.3); }
    50% { box-shadow: 0 0 0 14px rgba(22, 163, 74, 0.1); }
}

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