/* Wspólna wyszukiwarka gier, trybów i aren. */

.game-search-overlay[hidden] {
    display: none !important;
}

.game-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(12px, 6vh, 64px) 16px 24px;
    background: rgba(5, 7, 18, 0.72);
    backdrop-filter: blur(10px);
}

.game-search-panel {
    width: min(100%, 720px);
    max-height: min(78vh, 760px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(700px 240px at 10% -10%, rgba(124, 108, 255, 0.22), transparent 60%),
        #111428;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
}

.game-search-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 4px 10px;
    border-bottom: 1px solid var(--line);
}

.game-search-glass {
    font-size: 1.1rem;
    opacity: 0.8;
}

.game-search-input {
    flex: 1;
    min-width: 0;
    padding: 12px 4px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 1.05rem;
}

.game-search-input::placeholder {
    color: var(--muted);
}

.game-search-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
}

.game-search-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.game-search-count {
    margin: 0;
    padding: 0 4px;
    color: var(--muted);
    font-size: 0.78rem;
}

.game-search-results {
    min-height: 80px;
    overflow-y: auto;
    padding: 2px 4px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.game-search-section {
    margin: 10px 2px 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.game-search-result {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.035);
    transition: background 0.14s, border-color 0.14s, transform 0.14s;
}

.game-search-result:hover,
.game-search-result:focus-visible {
    background: rgba(124, 108, 255, 0.14);
    border-color: rgba(124, 108, 255, 0.38);
    transform: translateX(2px);
    outline: none;
}

.game-search-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 1.15rem;
}

.game-search-result-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.game-search-result-name {
    font-size: 0.95rem;
}

.game-search-result-meta {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
}

.game-search-result-desc {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.game-search-empty {
    margin: 4px;
    padding: 18px 12px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
}

body.game-search-open {
    overflow: hidden;
}

@media (max-width: 560px) {
    .game-search-panel {
        max-height: 84vh;
        border-radius: 18px;
    }

    .game-search-result-desc {
        display: none;
    }
}
