#quicksearch {
    position: relative;
}

.gs-top-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 500;
    margin-top: 6px;
    background: var(--gs-top-bg, #fff);
    color: var(--gs-top-fg, #222);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    overscroll-behavior: none;
    max-height: 395px;
    scrollbar-width: thin;
    scrollbar-color: var(--gs-top-scrollbar, rgba(0, 0, 0, 0.2)) transparent;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.15s cubic-bezier(0.2, 0, 0, 1), transform 0.15s cubic-bezier(0.2, 0, 0, 1);
}

.gs-top-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.gs-top-panel::-webkit-scrollbar {
    width: 6px;
}

.gs-top-panel::-webkit-scrollbar-track {
    background: transparent;
}

.gs-top-panel::-webkit-scrollbar-thumb {
    background: var(--gs-top-scrollbar, rgba(0, 0, 0, 0.2));
    border-radius: 3px;
}

.gs-top-panel__header {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gs-top-fg, #222);
    border-bottom: 1px solid var(--gs-top-border, rgba(0, 0, 0, 0.06));
}

.gs-top-panel__header-icon {
    flex: 0 0 16px;
    margin-right: 8px;
    color: inherit;
}

.gs-top-panel__list {
    padding: 0;
}

.gs-top-panel__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: inherit;
    text-decoration: none;
    transition: background 0.15s cubic-bezier(0.2, 0, 0, 1), transform 0.1s cubic-bezier(0.2, 0, 0, 1);
    border-bottom: 1px solid var(--gs-top-divider, rgba(0, 0, 0, 0.05));
}

.gs-top-panel__item:last-child {
    border-bottom: 0;
}

.gs-top-panel__item:hover,
.gs-top-panel__item:focus {
    background: var(--gs-top-hover, rgba(0, 0, 0, 0.05));
}

.gs-top-panel__item:active {
    background: var(--gs-top-active, rgba(0, 0, 0, 0.08));
    transform: scale(0.995);
}

.gs-top-panel__poster {
    flex: 0 0 60px;
    width: 60px;
    height: 68px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.06);
}

.gs-top-panel__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.gs-top-panel__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gs-top-panel__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
    color: var(--text-main);
    margin: 0;
}

html.dark .gs-top-panel__title {
    color: var(--text-secondary);
}

html.dark .gs-top-panel__item:hover .gs-top-panel__title {
    color: var(--text-white);
}

.gs-top-panel__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.gs-top-panel__chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--gs-top-chip-color, rgba(0, 0, 0, 0.38));
}

.gs-top-panel__chip svg {
    flex: 0 0 12px;
    color: inherit;
}

.gs-top-panel__clicks {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--gs-top-chip-color, rgba(0, 0, 0, 0.38));
    font-variant-numeric: tabular-nums;
}

.gs-top-panel__clicks--hot {
    color: #ef4444;
}

html.dark .gs-top-panel__clicks--hot {
    color: #f87171;
}

.gs-top-panel__flame {
    flex: 0 0 12px;
    color: inherit;
}

.gs-top-panel__chevron {
    flex: 0 0 14px;
    color: var(--gs-top-muted, #888);
    opacity: 0.25;
    transition: opacity 0.15s cubic-bezier(0.2, 0, 0, 1), transform 0.15s cubic-bezier(0.2, 0, 0, 1);
}

.gs-top-panel__item:hover .gs-top-panel__chevron {
    opacity: 1;
    transform: translateX(2px);
}

@media (max-width: 600px) {
    .gs-top-panel__list .gs-top-panel__item:nth-child(n + 5) {
        display: none;
    }
}

html.dark .gs-top-panel {
    --gs-top-bg: #1c1f24;
    --gs-top-fg: #e6e6e6;
    --gs-top-muted: #8b8f97;
    --gs-top-hover: rgba(255, 255, 255, 0.06);
    --gs-top-active: rgba(255, 255, 255, 0.1);
    --gs-top-border: rgba(255, 255, 255, 0.08);
    --gs-top-divider: rgba(255, 255, 255, 0.06);
    --gs-top-chip-bg: rgba(255, 255, 255, 0.08);
    --gs-top-chip-color: rgba(255, 255, 255, 0.38);
    --gs-top-scrollbar: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.5);
}
