:root {
    --bg-main: #090d16;
    --bg-surface: #111827;
    --bg-card: rgba(19, 27, 46, 0.75);
    --border-card: rgba(99, 102, 241, 0.15);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --accent-emerald: #10b981;
    --accent-pink: #ec4899;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-zh: 'Noto Sans SC', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

/* Header */
.app-header {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(9, 13, 22, 0.9);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent-pink));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-live {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.brand-tagline {
    font-size: 12px;
    color: var(--text-secondary);
}

.action-mini-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary);
    font-size: 16px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

/* Main */
.app-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}

.hero-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Dual Mic Wrapper (Left & Right) */
.dual-mic-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 15px 0;
    gap: 12px;
}

.speaker-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 160px;
}

.dual-mic-btn {
    width: 135px;
    height: 135px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    border: 2px solid transparent;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.dual-mic-btn .flag-icon {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 4px;
}

.dual-mic-btn .mic-symbol {
    font-size: 18px;
    margin-bottom: 4px;
}

.dual-mic-btn .btn-caption {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.dual-mic-btn .btn-subcaption {
    font-size: 10px;
    opacity: 0.8;
}

/* Russian Button Style */
.dual-mic-btn.ru-btn {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-color: rgba(99, 102, 241, 0.4);
    color: #c7d2fe;
}
.dual-mic-btn.ru-btn:hover {
    transform: scale(1.05);
    border-color: #6366f1;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}
.dual-mic-btn.ru-btn.active {
    background: linear-gradient(145deg, #312e81, #1e1b4b);
    border-color: #818cf8;
    box-shadow: 0 0 35px rgba(99, 102, 241, 0.7);
    animation: pulseRu 1.5s infinite;
}

@keyframes pulseRu {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* Chinese Button Style */
.dual-mic-btn.zh-btn {
    background: linear-gradient(145deg, #3b1824, #1c0a10);
    border-color: rgba(236, 72, 153, 0.4);
    color: #fbcfe8;
}
.dual-mic-btn.zh-btn:hover {
    transform: scale(1.05);
    border-color: #ec4899;
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.4);
}
.dual-mic-btn.zh-btn.active {
    background: linear-gradient(145deg, #831843, #500724);
    border-color: #f472b6;
    box-shadow: 0 0 35px rgba(236, 72, 153, 0.7);
    animation: pulseZh 1.5s infinite;
}

@keyframes pulseZh {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.target-hint {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

/* Center Divider */
.dual-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Status Bar */
.live-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(17, 24, 39, 0.7);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}
.status-pulse-dot.recording {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: blinkDot 0.8s infinite;
}

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

.status-info-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Live Card */
.live-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 18px;
    padding: 18px;
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.live-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.active-speaker-tag {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}

.replay-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.replay-btn:hover {
    background: var(--accent-emerald);
    color: #000;
}

.live-transcript {
    font-size: 16px;
    font-weight: 500;
    color: #f1f5f9;
    min-height: 26px;
    line-height: 1.4;
}

.live-translation-box {
    background: rgba(10, 15, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trans-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
}

.trans-content {
    font-size: 18px;
    font-weight: 600;
    color: #a7f3d0;
    font-family: var(--font-zh), var(--font-main);
    line-height: 1.4;
}

/* Text Input Row */
.text-input-row {
    width: 100%;
    display: flex;
    gap: 8px;
    align-items: center;
}

.text-field {
    flex: 1;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
}
.text-field:focus { border-color: var(--primary); }
.text-field::placeholder { color: var(--text-muted); }

.send-btn {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--primary);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.send-btn:hover { transform: scale(1.05); }

/* Quick Bank */
.quick-bank {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-bank-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-btn {
    padding: 7px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #fff;
}

/* Conversation Section */
.conversation-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

.clear-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
}
.clear-btn:hover { color: #f87171; }

.dialog-stream {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.dialog-msg {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
}

.dialog-msg.ru-user {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    align-self: flex-start;
    width: 90%;
}

.dialog-msg.zh-user {
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.2);
    align-self: flex-end;
    width: 90%;
}

.msg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
}
.ru-user .msg-header { color: #818cf8; }
.zh-user .msg-header { color: #f472b6; }

.msg-original { font-size: 14px; color: #f1f5f9; }
.msg-translated { font-size: 15px; color: #6ee7b7; font-family: var(--font-zh), var(--font-main); }

.bubble-play-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 10px;
}

/* Debug log */
.debug-log {
    width: 100%;
    max-height: 120px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 10px;
    font-family: monospace;
    font-size: 10px;
    color: #6ee7b7;
}

/* Footer */
.app-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(9, 13, 22, 0.95);
    padding: 16px 20px;
}

.footer-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}
.footer-links a { color: var(--text-secondary); text-decoration: none; }
