.engine-btn {
    background: rgba(120,120,120,0.12);
    border: none;
    outline: none;
    margin-right: 0.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 2em;
    width: 2em;
    border-radius: 50%;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(120,120,120,0.08);
}
.engine-btn:hover {
    background: rgba(120,120,120,0.22);
    box-shadow: 0 4px 16px rgba(120,120,120,0.18);
}
#engine-icon {
    width: 1.2em;
    height: 1.2em;
}
.engine-list {
    position: absolute;
    left: 0;
    top: 110%;
    width: 28em;
    max-width: 98vw;
    background: rgba(255,255,255,0.45);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    border-radius: 1.2em;
    padding: 0.7em 0.7em 0.3em 0.7em;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5em 0.7em;
    z-index: 10;
    backdrop-filter: blur(22px) saturate(1.5);
    transition: opacity 0.18s cubic-bezier(.4,2,.6,1), transform 0.18s cubic-bezier(.4,2,.6,1);
    opacity: 0;
    transform: translateY(-16px);
    pointer-events: none;
}
.engine-list.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.engine-list.hidden {
    display: none;
}
.engine-item {
    display: flex;
    align-items: center;
    padding: 0.3em 0.3em;
    border-radius: 0.6em;
    cursor: pointer;
    transition: background 0.18s;
    font-size: 0.95em;
    color: #222;
    user-select: none;
}
.engine-item:hover {
    background: rgba(0,0,0,0.08);
}
.engine-item.selected {
    background: color-mix(in srgb, var(--theme-color, #0099ff) 15%, transparent);
    box-shadow: 0 0 12px var(--theme-color, #0099ff)55;
    transform: scale(1.08);
    transition: 
        background 0.25s cubic-bezier(.4,2,.6,1),
        box-shadow 0.25s cubic-bezier(.4,2,.6,1),
        transform 0.18s cubic-bezier(.4,2,.6,1);
} 
@media (max-width: 700px) {
  .engine-list {
    display: flex;
    flex-direction: column;
    width: 92vw;
    max-width: 92vw;
    position: absolute;
    top: calc(100% + 0.5em);
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.05em;
    max-height: calc((1.4em + 1.4em + 0.2em) * 5);
    overflow-y: auto;
    gap: 0;
    padding: 0.6em;
    margin: 0;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    border-radius: 1em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
  }

  .engine-item {
    font-size: 1em;
    width: 100%;
    min-width: 0;
    padding: 0.6em 0.8em;
    margin: 0.1em 0;
    border-radius: 0.6em;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
} 