.live-search-container { position: relative; width: 100%; max-width: 400px; }
.search-input-wrapper { position: relative; }
.search-input { width: 100%; padding: 12px 45px 12px 16px; border: 2px solid #e0e0e0; border-radius: 25px; font-size: 16px; background-color: #ffffff; color: #333333; transition: all 0.3s ease; }
.search-input::placeholder { color: #999999; }
.search-input:focus { outline: none; border-color: #00bcd4; box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2); background-color: #ffffff; }
.search-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #999999; pointer-events: none; }

/* Кнопка пошуку замість div */
.search-button {
    position: absolute; 
    right: 16px; 
    top: 50%; 
    transform: translateY(-50%); 
    background: none; 
    border: none; 
    color: #999999; 
    cursor: pointer; 
    padding: 0; 
    width: auto; 
    height: auto; 
    font-size: inherit;
    pointer-events: auto;
    transition: color 0.2s ease;
}

.search-button:hover {
    color: #00bcd4;
}

.search-button:focus {
    outline: none;
    color: #00bcd4;
}
.search-loader { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #00bcd4; }

/* Великий білий overlay як у FunPay */
.search-results { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background: rgba(0, 0, 0, 0.5); 
    z-index: 9999; 
    display: none;
    opacity: 0; 
    transition: opacity 0.2s ease;
}

.search-results.show { 
    opacity: 1; 
}

.search-results-content {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 900px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    padding: 20px;
}

.search-results-header { 
    border-bottom: 1px solid #e0e0e0; 
    padding-bottom: 15px; 
    margin-bottom: 20px; 
}

.search-results-header h3 {
    margin: 0;
    color: #333333;
    font-size: 18px;
    font-weight: 600;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.search-game-block {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
    transition: all 0.2s ease;
    cursor: pointer;
    grid-column: 1 / -1; /* Займає всю ширину */
}

.search-game-block:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.search-game-title {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 12px;
    text-decoration: none;
    display: block;
}

.search-game-title:hover {
    color: #00bcd4;
    text-decoration: none;
}

.search-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-category-link {
    font-size: 13px;
    color: #666666;
    text-decoration: none;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.search-category-link:hover {
    background: #00bcd4;
    color: #ffffff;
    text-decoration: none;
}

/* Виділення категорій що містять пошукове слово */
.category-highlight {
    background: #ffeb3b !important;
    color: #333333 !important;
    font-weight: 600;
}

.category-highlight:hover {
    background: #ffc107 !important;
    color: #333333 !important;
}

/* Скролбар для білого фону */
.search-results-content::-webkit-scrollbar { width: 8px; }
.search-results-content::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.search-results-content::-webkit-scrollbar-thumb { background: #cccccc; border-radius: 4px; }
.search-results-content::-webkit-scrollbar-thumb:hover { background: #999999; }

/* Видаляємо старі стилі */
.results-list { display: none; }

/* Grid item styles */
.search-result-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.search-result-item:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-result-item.selected {
    background: #e3f2fd;
    border-color: #2196f3;
}

.item-icon {
    font-size: 28px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-description {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 6px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-type {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    background: #e8e8e8;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

/* No results message */
.search-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.search-no-results p {
    font-size: 16px;
    margin: 0;
}

/* Error message */
.search-error {
    text-align: center;
    padding: 60px 20px;
    color: #d32f2f;
    grid-column: 1 / -1;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

@media (max-width: 768px) { 
    .search-results-content {
        top: 60px;
        width: 95%;
        max-height: calc(100vh - 80px);
        padding: 15px;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr;
    }
}
.no-results { text-align: center; padding: 24px 16px; color: #b0b0b0; }
.no-results-icon { font-size: 32px; margin-bottom: 8px; }
.no-results p { margin: 0; font-size: 14px; color: #b0b0b0; }
.show-all-container { padding: 12px 16px; border-top: 1px solid #3a3a3a; background-color: #333333; text-align: center; }
.show-all-btn { font-size: 14px; color: #00bcd4; padding: 0; text-decoration: none; background: none; border: none; cursor: pointer; }
.show-all-btn:hover { text-decoration: underline; color: #00acc1; }
.search-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999; background: transparent; }
/* Responsive */ 
@media (max-width: 768px) { .live-search-container { max-width: 100%; } .search-input { font-size: 16px; } .search-results { position: fixed; top: auto; left: 16px; right: 16px; max-height: 60vh; } }
/* Loading state */ 
.search-loading .search-icon { display: none; }
.search-loading .search-loader { display: block; }
/* Highlight search terms */ 
.search-highlight { background-color: #00bcd4; color: #000000; font-weight: 600; padding: 2px 4px; border-radius: 2px; }
/* Navbar integration styles */ 
.navbar-search .live-search-container { max-width: 300px; margin: 0 auto; }
.navbar-search .search-input { padding: 8px 35px 8px 12px; font-size: 14px; border-radius: 20px; background-color: rgba(45, 45, 45, 0.9); border: 1px solid #555; color: #ffffff; height: 42px; }
.navbar-search .search-input::placeholder { color: #999; font-size: 14px; }
.navbar-search .search-input:focus { border-color: #00bcd4; box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.2); background-color: rgba(60, 60, 60, 0.9); }
.navbar-search .search-icon { right: 12px; font-size: 14px; }
.navbar-search .search-loader { right: 12px; font-size: 14px; }
#navbarSearchInput.search-input {
    width: 400px !important;    /* або скільки треба */
    max-width: 100%;
}