:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.6);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-ru: #10b981; /* Изумрудный для RU */
    --accent-lt: #3b82f6; /* Сапфировый для LT */
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    touch-action: manipulation; /* Блокируем двойной тап на iOS */
}

.header {
    width: 100%;
    padding: 20px 0;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header h2 { 
    margin: 0; 
    font-weight: 600; 
    letter-spacing: 0.5px; 
    font-size: 1.5rem;
}

#status {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 500;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
    width: 90vw;
    max-width: 400px;
}

/* Дизайн кнопок рации */
.btn {
    height: 110px;
    border-radius: 24px;
    font-size: 1.3rem;
    font-weight: 600;
    border: 1px solid var(--glass-border);
    color: white;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

.btn span { 
    font-size: 0.75em; 
    color: var(--text-muted);
    font-weight: 400; 
}

#btnRu { border-bottom: 4px solid var(--accent-ru); }
#btnLt { border-bottom: 4px solid var(--accent-lt); }

/* Эффект физического нажатия */
.btn:active { 
    transform: translateY(6px); 
    border-bottom-width: 0px; 
    margin-bottom: 4px;
}

/* Анимация при записи (когда JS добавляет класс .recording) */
.btn.recording#btnRu {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent-ru);
    animation: pulse-ru 1.5s infinite;
}

.btn.recording#btnLt {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-lt);
    animation: pulse-lt 1.5s infinite;
}

@keyframes pulse-ru { 
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); } 
    70% { box-shadow: 0 0 0 20px rgba(16, 185, 129, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } 
}

@keyframes pulse-lt { 
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); } 
    70% { box-shadow: 0 0 0 20px rgba(59, 130, 246, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); } 
}

/* Панели с текстом */
.text-box {
    margin-top: 24px;
    padding: 20px;
    border-radius: 20px;
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    width: 90vw;
    max-width: 400px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.text-box strong { 
    color: var(--text-muted); 
    font-size: 0.85em; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot-ru { color: var(--accent-ru); font-size: 1.2em; }
.dot-lt { color: var(--accent-lt); font-size: 1.2em; }

#recognized { 
    margin-top: 10px; 
    color: #cbd5e1; 
    font-size: 1.05em; 
    line-height: 1.4;
}

#translated { 
    margin-top: 10px; 
    color: #ffffff; 
    font-size: 1.25em; 
    font-weight: 500; 
    line-height: 1.4;
    text-shadow: 0 0 20px rgba(255,255,255,0.1); 
}

/* Убираем отступы на самом последнем элементе, чтобы не было лишнего скролла. */
.text-box:last-child { margin-bottom: 40px; }
