/**
 * Светалана — Cyberpunk Neon Theme
 */

/* ═══════════════════════════════════════════════════════════════════════
   Переменные & Сброс
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --bg-primary: #08080f;
    --bg-secondary: #0d0d1a;
    --bg-surface: #12121e;
    --bg-elevated: #1a1a2e;

    --neon-cyan: #00f0ff;
    --neon-magenta: #ff00aa;
    --neon-purple: #8b5cf6;
    --neon-amber: #ffd700;
    --neon-green: #00ff88;

    --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 30px rgba(0, 240, 255, 0.2);
    --glow-magenta: 0 0 10px rgba(255, 0, 170, 0.5), 0 0 30px rgba(255, 0, 170, 0.2);

    --text-primary: #e0e0f0;
    --text-secondary: #8888aa;
    --text-dim: #555577;

    --border-color: rgba(0, 240, 255, 0.15);
    --border-glow: rgba(0, 240, 255, 0.3);

    --font-display: 'Orbitron', monospace;
    --font-body: 'Rajdhani', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --radius: 12px;
    --radius-sm: 8px;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Сканлайн эффект */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 240, 255, 0.015) 2px,
        rgba(0, 240, 255, 0.015) 4px
    );
}

/* ═══════════════════════════════════════════════════════════════════════
   Фоновые канвасы
   ═══════════════════════════════════════════════════════════════════════ */

#particlesCanvas,
#gridCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   Главный контейнер
   ═══════════════════════════════════════════════════════════════════════ */

.app-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(13, 13, 26, 0.85);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    box-shadow: 0 0 60px rgba(0, 240, 255, 0.05);
}

/* ═══════════════════════════════════════════════════════════════════════
   Хедер
   ═══════════════════════════════════════════════════════════════════════ */

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--neon-cyan),
        var(--neon-magenta),
        transparent
    );
    opacity: 0.5;
}

.app-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

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

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.connection-status.connected {
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: var(--neon-green);
}

.connection-status.disconnected {
    background: rgba(255, 68, 68, 0.08);
    border: 1px solid rgba(255, 68, 68, 0.2);
    color: #ff4444;
}

.connection-status.error {
    background: rgba(255, 170, 0, 0.08);
    border: 1px solid rgba(255, 170, 0, 0.2);
    color: #ffaa00;
}

.connection-status.connecting {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--neon-cyan);
}

.status-icon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-icon.connected {
    background: var(--neon-green);
    box-shadow: 0 0 6px var(--neon-green);
}

.status-icon.disconnected {
    background: #ff4444;
}

.status-icon.connecting {
    background: var(--neon-cyan);
    animation: pulse 1s infinite;
}

.status-icon.error {
    background: #ffaa00;
}

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

/* ═══════════════════════════════════════════════════════════════════════
   Аватар / Видео-эмодзи
   ═══════════════════════════════════════════════════════════════════════ */

.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 12px;
    flex-shrink: 0;
}

.assistant-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--neon-cyan);
    box-shadow: var(--glow-cyan);
    transition: all 0.3s ease;
    cursor: pointer;
}

.assistant-avatar video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.assistant-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a3e, #2a1a3e);
    border-radius: 50%;
    font-size: 2.5rem;
}

/* Ripple эффект при разговоре */
.assistant-avatar.speaking::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--neon-cyan);
    animation: ripple-wave 1.5s ease-out infinite;
}

.assistant-avatar.speaking::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--neon-magenta);
    animation: ripple-wave 1.5s ease-out 0.5s infinite;
}

@keyframes ripple-wave {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.assistant-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 8px;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: var(--font-display);
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════════════
   Чат
   ═══════════════════════════════════════════════════════════════════════ */

.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
    scroll-behavior: smooth;
}

.chat-box::-webkit-scrollbar {
    width: 3px;
}
.chat-box::-webkit-scrollbar-track {
    background: transparent;
}
.chat-box::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 3px;
    opacity: 0.3;
}

.message {
    display: flex;
    flex-direction: column;
    margin: 6px 0;
    max-width: 88%;
    animation: messageIn 0.3s ease-out;
}

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

.message.user {
    margin-left: auto;
    align-items: flex-end;
}

.message.server {
    margin-right: auto;
    align-items: flex-start;
}

.message-content {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
}

.message.user .message-content {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-bottom-right-radius: 4px;
    color: var(--text-primary);
}

.message.server .message-content {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
}

.message-time {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 4px;
    font-family: var(--font-mono);
}

.message.user .message-time {
    text-align: right;
    margin-right: 4px;
}

.message.server .message-time {
    text-align: left;
    margin-left: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Панель ввода
   ═══════════════════════════════════════════════════════════════════════ */

.input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.chat-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.1);
}

.chat-input::placeholder {
    color: var(--text-dim);
}

.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-icon:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.btn-icon.send {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(139, 92, 246, 0.2));
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.btn-icon.send:hover {
    box-shadow: var(--glow-cyan);
}

.btn-icon.record {
    position: relative;
}

.btn-icon.record.recording {
    background: rgba(255, 0, 170, 0.2);
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
    box-shadow: 0 0 20px rgba(255, 0, 170, 0.3);
    animation: recordPulse 1s infinite;
}

@keyframes recordPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 0, 170, 0.3); }
    50% { box-shadow: 0 0 25px rgba(255, 0, 170, 0.5); }
}

/* ═══════════════════════════════════════════════════════════════════════
   Голосовой режим (полный экран)
   ═══════════════════════════════════════════════════════════════════════ */

.voice-call-mode {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(8, 8, 15, 0.97);
    backdrop-filter: blur(30px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.voice-call-mode.active {
    display: flex;
}

.voice-call-mode .assistant-avatar {
    width: 140px;
    height: 140px;
}

.voice-call-mode .assistant-name {
    font-size: 1.1rem;
}

.voice-call-mode .wave-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 60px;
}

.voice-call-mode .wave-bar {
    width: 4px;
    height: 4px;
    border-radius: 2px;
    background: var(--neon-cyan);
    transition: height 0.1s ease, opacity 0.1s ease;
}

.voice-call-mode .wave-bar.ai-active {
    background: var(--neon-magenta);
}

.voice-call-hint {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.voice-hangup-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #ff4444;
    background: rgba(255, 68, 68, 0.15);
    color: #ff4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.voice-hangup-btn:hover {
    background: rgba(255, 68, 68, 0.3);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════════════
   Панель настроек
   ═══════════════════════════════════════════════════════════════════════ */

.settings-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-overlay.active {
    opacity: 1;
    visibility: visible;
}

.settings-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    z-index: 201;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    padding: 24px;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.settings-panel.active {
    right: 0;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.settings-title {
    font-family: var(--font-display);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--neon-cyan);
}

.settings-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.settings-close:hover {
    color: var(--neon-magenta);
    background: rgba(255, 0, 170, 0.1);
}

.settings-group {
    margin-bottom: 20px;
}

.settings-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    font-family: var(--font-mono);
}

.settings-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
}

.settings-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.settings-hint {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--bg-elevated);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.toggle-track::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: all 0.3s;
}

.toggle-switch input:checked + .toggle-track {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--neon-cyan);
}

.toggle-switch input:checked + .toggle-track::before {
    left: 22px;
    background: var(--neon-cyan);
    box-shadow: 0 0 6px var(--neon-cyan);
}

.settings-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
}

.btn-settings {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-settings.primary {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: var(--bg-primary);
}

.btn-settings.primary:hover {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.btn-settings.secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-settings.secondary:hover {
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
}

/* ═══════════════════════════════════════════════════════════════════════
   Уведомления (Toast)
   ═══════════════════════════════════════════════════════════════════════ */

.notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 300;
    padding: 12px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.85rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    font-family: var(--font-mono);
    white-space: nowrap;
}

.notification.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════
   Safe area для iPhone
   ═══════════════════════════════════════════════════════════════════════ */

@supports (padding-top: env(safe-area-inset-top)) {
    .app-header {
        padding-top: max(16px, env(safe-area-inset-top, 0px));
    }
    .input-area {
        padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    }
    .voice-call-mode {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .settings-panel {
        padding-top: max(24px, env(safe-area-inset-top));
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}

.safe-area-bottom {
    display: none;
    height: env(safe-area-inset-bottom, 0px);
}

/* ═══════════════════════════════════════════════════════════════════════
   Адаптивность
   ═══════════════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
    .app-container {
        max-width: 420px;
        margin: 5vh auto;
        border-radius: 20px;
        height: 90vh;
        max-height: 800px;
        box-shadow:
            0 0 40px rgba(0, 240, 255, 0.08),
            0 0 80px rgba(139, 92, 246, 0.05);
    }
}

@media (max-width: 480px) {
    .app-container {
        border: none;
        max-width: 100%;
        height: 100dvh;
        background: rgba(8, 8, 15, 0.92);
    }
    .app-title {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }
    .assistant-avatar {
        width: 72px;
        height: 72px;
    }
    .connection-status {
        font-size: 0.55rem;
        padding: 2px 8px;
    }
    .chat-input {
        font-size: 0.85rem;
        padding: 8px 14px;
    }
    .btn-icon {
        width: 40px;
        height: 40px;
    }
    .message-content {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* Landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .avatar-section {
        display: none;
    }
    .app-header {
        padding: 8px 16px;
    }
    .chat-box {
        padding: 4px 12px;
    }
    .input-area {
        padding: 6px 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   PWA: Dark mode support
   ═══════════════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: light) {
    /* Keep dark theme — cyberpunk stays dark always */
}

/* ═══════════════════════════════════════════════════════════════════════
   Reduced motion
   ═══════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   Аудио-визуализатор (в чате)
   ═══════════════════════════════════════════════════════════════════════ */

.audio-visualizer {
    display: none;
    align-items: center;
    gap: 3px;
    height: 30px;
    padding: 4px 0;
}

.audio-visualizer.active {
    display: flex;
}

.audio-visualizer .vis-bar {
    width: 3px;
    border-radius: 2px;
    background: var(--neon-cyan);
    height: 4px;
    transition: height 0.08s ease;
}

.audio-visualizer.user .vis-bar {
    background: var(--neon-cyan);
}

.audio-visualizer.ai .vis-bar {
    background: var(--neon-magenta);
}

/* ═══════════════════════════════════════════════════════════════════════
   Индикатор записи (inline)
   ═══════════════════════════════════════════════════════════════════════ */

.recording-indicator {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 6px 16px;
    font-size: 0.75rem;
    color: var(--neon-magenta);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 0, 170, 0.1);
    background: rgba(255, 0, 170, 0.03);
    animation: recordingFadeIn 0.3s ease-out;
}

.recording-indicator.active {
    display: flex;
}

.recording-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-magenta);
    animation: recordPulse 1s infinite;
    flex-shrink: 0;
}

.recording-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes recordingFadeIn {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 40px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Кнопка голосового сообщения (левая в строке ввода)
   ═══════════════════════════════════════════════════════════════════════ */

.btn-icon.voice-msg {
    background: linear-gradient(135deg, rgba(255, 0, 170, 0.1), rgba(139, 92, 246, 0.1));
    border-color: rgba(255, 0, 170, 0.2);
    color: var(--neon-magenta);
    order: -1; /* первая слева */
    position: relative;
}

.btn-icon.voice-msg:hover {
    border-color: var(--neon-magenta);
    box-shadow: 0 0 15px rgba(255, 0, 170, 0.2);
}

.btn-icon.voice-msg:active {
    transform: scale(0.9);
    background: rgba(255, 0, 170, 0.25);
    box-shadow: 0 0 20px rgba(255, 0, 170, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════════
   Полноэкранный режим — Wave-анимация (обновлённая)
   ═══════════════════════════════════════════════════════════════════════ */

.voice-wave-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100px;
    width: 200px;
}

.voice-wave-container .wave-bar {
    width: 5px;
    height: 4px;
    border-radius: 3px;
    background: linear-gradient(to top, var(--neon-cyan), var(--neon-magenta));
    transition: transform 0.1s ease, opacity 0.1s ease;
    transform: scaleY(0.1);
    transform-origin: center;
}

.voice-wave-container .wave-bar.center {
    width: 8px;
    background: var(--neon-magenta);
}

/* ═══════════════════════════════════════════════════════════════════════
   Полноэкранный режим — большая кнопка записи
   ═══════════════════════════════════════════════════════════════════════ */

.voice-btn.record-wide {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--neon-magenta);
    background: rgba(255, 0, 170, 0.1);
    color: var(--neon-magenta);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.voice-btn.record-wide:hover {
    background: rgba(255, 0, 170, 0.2);
    box-shadow: 0 0 30px rgba(255, 0, 170, 0.3);
    transform: scale(1.05);
}

.voice-btn.record-wide:active {
    transform: scale(0.95);
}

.voice-btn.record-wide.recording {
    border-color: var(--neon-magenta);
    background: rgba(255, 0, 170, 0.3);
    box-shadow: 0 0 40px rgba(255, 0, 170, 0.4);
    animation: recordPulse 1s infinite;
}

/* ═══════════════════════════════════════════════════════════════════════
   Полноэкранный режим — статус-бар (таймер + хинт)
   ═══════════════════════════════════════════════════════════════════════ */

.voice-status-bar {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.voice-timer {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--neon-cyan);
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.voice-hint {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.voice-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.voice-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
}

.voice-avatar-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-call-mode .assistant-avatar.speaking::before,
.voice-call-mode .assistant-avatar.speaking::after {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════
   Блокировка скролла при активном полноэкранном режиме
   ═══════════════════════════════════════════════════════════════════════ */

body.voice-call-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
}
