
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.search-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.search-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}


.search-modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.search-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
}

.search-modal-title {
    color: #8B5CF6;
    font-size: 22px;
    font-weight: bold;
    margin: 0;
}

.search-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: #333;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
}

.search-modal-close:hover {
    background-color: #e0e0e0;
    color: #8B5CF6;
    transform: rotate(90deg);
}


.search-modal-body {
    padding: 25px;
    overflow-y: auto;
}


.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input-icon {
    position: absolute;
    left: 15px;
    color: #999;
    pointer-events: none;
    z-index: 1;
}

.search-modal-input {
    flex: 1;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #333;
}

.search-modal-input:focus {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-modal-input::placeholder {
    color: #999;
}


.search-button {
    padding: 15px 30px;
    background-color: #8B5CF6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-button:hover {
    background-color: #7C3AED;
    transform: translateY(-1px);
}

.search-button:active {
    transform: translateY(0);
}


.search-results {
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
}

.search-results.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    padding: 40px 0;
}

.search-results.empty::before {
    content: 'Enter keywords to search for games...';
}


.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-result-item:hover {
    background-color: #f8f8f8;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-image {
    width: 60px;
    height: 45px;
    border-radius: 6px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.search-result-category {
    font-size: 13px;
    color: #999;
}


@media (max-width: 768px) {
    .search-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .search-modal-header {
        padding: 15px 20px;
    }
    
    .search-modal-title {
        font-size: 18px;
    }
    
    .search-modal-body {
        padding: 20px;
    }
    
    .search-modal-input {
        font-size: 14px;
        padding: 12px 12px 12px 40px;
    }
    
    .search-input-icon {
        left: 12px;
        width: 18px;
        height: 18px;
    }
    
    .search-button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

