/* ═══ UX ENHANCEMENTS — Право в архитектуре ═══ */

/* ── Floating Audio Mini-Player ─────────────────────── */
.audio-miniplayer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 16, 53, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(123, 140, 255, 0.15);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
}
.audio-miniplayer.visible { transform: translateY(0); }
.audio-miniplayer .amp-info { flex: 1; min-width: 0; }
.audio-miniplayer .amp-title { font-size: 11px; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audio-miniplayer .amp-sub { font-size: 9px; color: #64748b; margin-top: 1px; }
.audio-miniplayer .amp-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: linear-gradient(135deg, #7b8cff, #6070ee); color: #fff; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.audio-miniplayer .amp-close { width: 24px; height: 24px; border: none; background: none; color: #64748b; font-size: 16px; cursor: pointer; flex-shrink: 0; }
.audio-miniplayer .amp-progress { position: absolute; top: -2px; left: 0; height: 2px; background: linear-gradient(90deg, #7b8cff, #a78bfa); transition: width 0.3s; border-radius: 2px; }

/* ── Confetti ────────────────────────────────────────── */
.confetti-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 99999; overflow: hidden; }
.confetti-piece {
    position: absolute;
    width: 8px; height: 8px;
    opacity: 0;
    animation: confetti-fall 2.5s ease-out forwards;
}
@keyframes confetti-fall {
    0% { opacity: 1; transform: translateY(-20px) rotate(0deg) scale(1); }
    100% { opacity: 0; transform: translateY(100vh) rotate(720deg) scale(0.3); }
}

/* ── Onboarding Overlay ──────────────────────────────── */
.onboarding-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 99990;
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s;
}
.onboarding-card {
    background: #161850; border: 1px solid rgba(123,140,255,0.2);
    border-radius: 16px; padding: 28px 24px; max-width: 340px; width: 90%;
    text-align: center; box-shadow: 0 16px 64px rgba(0,0,0,0.5);
}
.onboarding-card .ob-icon { font-size: 40px; margin-bottom: 12px; }
.onboarding-card .ob-title { font-size: 16px; font-weight: 800; color: #f8f8ff; margin-bottom: 8px; }
.onboarding-card .ob-text { font-size: 13px; color: #a0adff; line-height: 1.6; margin-bottom: 20px; }
.onboarding-card .ob-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.onboarding-card .ob-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(123,140,255,0.2); }
.onboarding-card .ob-dot.active { background: #7b8cff; }
.onboarding-card .ob-btn { padding: 10px 28px; border: none; border-radius: 8px; background: linear-gradient(135deg, #7b8cff, #6070ee); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.onboarding-card .ob-skip { display: block; margin-top: 10px; color: #64748b; font-size: 11px; background: none; border: none; cursor: pointer; font-family: inherit; }

/* ── Drag & Drop Route ───────────────────────────────── */
.route-item { position: relative; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.route-item.dragging { opacity: 0.4; transform: scale(0.97); }
.route-item .drag-handle {
    cursor: grab; color: #64748b; padding: 0 6px; font-size: 14px;
    user-select: none; -webkit-user-select: none; touch-action: none;
}
.route-item .drag-handle:active { cursor: grabbing; }
.drag-ghost {
    position: fixed; pointer-events: none; z-index: 99999;
    background: rgba(22, 24, 80, 0.95); border: 1px solid rgba(123,140,255,0.3);
    border-radius: 8px; padding: 8px 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    font-size: 12px; color: #e2e8f0;
}
.route-drop-indicator {
    height: 2px; background: #7b8cff; border-radius: 2px; margin: -1px 0;
    transition: opacity 0.15s; opacity: 0;
}
.route-drop-indicator.visible { opacity: 1; }

/* ── Optimize Route Button ───────────────────────────── */
.btn-optimize {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 14px; font-size: 11px; font-weight: 600;
    color: #34d399; background: rgba(52,211,153,0.1);
    border: 1px solid rgba(52,211,153,0.25); border-radius: 8px;
    cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.btn-optimize:hover { background: rgba(52,211,153,0.2); }

/* ── Custom SVG Markers ──────────────────────────────── */
.marker-custom { display: flex; align-items: center; justify-content: center; }

/* ── Animations ──────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(123,140,255,0.4); } 50% { box-shadow: 0 0 0 8px rgba(123,140,255,0); } }
.checkin-pulse { animation: pulseGlow 1s ease 2; }

